Merge lp:~akretion-team/account-financial-tools/7-account-journal-sale-refund-link-cde into lp:~account-core-editors/account-financial-tools/7.0

Proposed by Chafique DELLI
Status: Rejected
Rejected by: Nicolas Bessi - Camptocamp
Proposed branch: lp:~akretion-team/account-financial-tools/7-account-journal-sale-refund-link-cde
Merge into: lp:~account-core-editors/account-financial-tools/7.0
Diff against target: 191 lines (+166/-0)
5 files modified
account_journal_sale_refund_link/__init__.py (+25/-0)
account_journal_sale_refund_link/__openerp__.py (+45/-0)
account_journal_sale_refund_link/account.py (+34/-0)
account_journal_sale_refund_link/account_invoice_refund.py (+41/-0)
account_journal_sale_refund_link/account_view.xml (+21/-0)
To merge this branch: bzr merge lp:~akretion-team/account-financial-tools/7-account-journal-sale-refund-link-cde
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review Approve
Akretion Team Pending
Review via email: mp+223037@code.launchpad.net

Commit message

add module 'account_journal_sale_refund_link'

Description of the change

add module 'account_journal_sale_refund_link' who was in the branch 'lp:account-extra-addons' in the version 6.1 and i ported in the version 7.0

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM. Thanks.

Regards.

review: Approve (code review)
2. By Chafique DELLI

[IMP] add description of module

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

The project has moved to Github https://github.com/OCA/account-financial-tools.
Please resubmit your MP on github using following procedure https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub.

I put this MP in rejected in the meanwhile.

Regards

Unmerged revisions

2. By Chafique DELLI

[IMP] add description of module

1. By Chafique DELLI

[ADD]: add module account_journal_sale_refund_link

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'account_journal_sale_refund_link'
=== added file 'account_journal_sale_refund_link/__init__.py'
--- account_journal_sale_refund_link/__init__.py 1970-01-01 00:00:00 +0000
+++ account_journal_sale_refund_link/__init__.py 2014-06-16 08:19:46 +0000
@@ -0,0 +1,25 @@
1# -*- encoding: utf-8 -*-
2#################################################################################
3#
4# account_journal_sale_refund_link for OpenERP
5# Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
6# 2014 Akretion Chafique DELLI <chafique.delli@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21#################################################################################
22
23
24from . import account
25from . import account_invoice_refund
026
=== added file 'account_journal_sale_refund_link/__openerp__.py'
--- account_journal_sale_refund_link/__openerp__.py 1970-01-01 00:00:00 +0000
+++ account_journal_sale_refund_link/__openerp__.py 2014-06-16 08:19:46 +0000
@@ -0,0 +1,45 @@
1# -*- encoding: utf-8 -*-
2#################################################################################
3#
4# account_journal_sale_refund_link for OpenERP
5# Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
6# 2014 Akretion Chafique DELLI <chafique.delli@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21#################################################################################
22
23
24{
25 'name': 'account_journal_sale_refund_link',
26 'version': '0.1',
27 'category': 'Generic Modules/Others',
28 'license': 'AGPL-3',
29 'description': """
30 Account Journal Sale Refund Link
31 ================================
32
33 Binds a sale journal with a refund journal
34
35 """,
36 'author': 'Akretion',
37 'website': 'http://www.akretion.com/',
38 'depends': ['account'],
39 'data': [
40 'account_view.xml',
41 ],
42 'demo': [],
43 'installable': True,
44 'active': False,
45}
046
=== added file 'account_journal_sale_refund_link/account.py'
--- account_journal_sale_refund_link/account.py 1970-01-01 00:00:00 +0000
+++ account_journal_sale_refund_link/account.py 2014-06-16 08:19:46 +0000
@@ -0,0 +1,34 @@
1# -*- encoding: utf-8 -*-
2#################################################################################
3#
4# account_journal_sale_refund_link for OpenERP
5# Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
6# 2014 Akretion Chafique DELLI <chafique.delli@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21#################################################################################
22
23from openerp.osv import fields, orm
24
25
26class AccountJournal(orm.Model):
27
28 _inherit = "account.journal"
29
30
31 _columns = {
32 'refund_journal_id':fields.many2one('account.journal', 'Refund Journal',
33 domain=[('type', '=', 'sale_refund')]),
34 }
035
=== added file 'account_journal_sale_refund_link/account_invoice_refund.py'
--- account_journal_sale_refund_link/account_invoice_refund.py 1970-01-01 00:00:00 +0000
+++ account_journal_sale_refund_link/account_invoice_refund.py 2014-06-16 08:19:46 +0000
@@ -0,0 +1,41 @@
1# -*- encoding: utf-8 -*-
2#################################################################################
3#
4# account_journal_sale_refund_link for OpenERP
5# Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
6# 2014 Akretion Chafique DELLI <chafique.delli@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21#################################################################################
22
23from openerp.osv import orm
24
25
26class AccountInvoiceRefund(orm.TransientModel):
27
28 _inherit = "account.invoice.refund"
29
30 def _get_journal(self, cr, uid, context=None):
31 invoice_id = context.get('invoice_ids', [context['active_id']])[0]
32 invoice = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
33 refund_journal_id = invoice.journal_id.refund_journal_id
34 if refund_journal_id:
35 return refund_journal_id.id
36 else:
37 return super(AccountInvoiceRefund, self)._get_journal(cr, uid, context)
38
39 _defaults = {
40 'journal_id': _get_journal,
41 }
042
=== added file 'account_journal_sale_refund_link/account_view.xml'
--- account_journal_sale_refund_link/account_view.xml 1970-01-01 00:00:00 +0000
+++ account_journal_sale_refund_link/account_view.xml 2014-06-16 08:19:46 +0000
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<openerp>
4 <data>
5
6 <record id="account_journal_sale_refund_link_account_journal_view_form" model="ir.ui.view">
7 <field name="model">account.journal</field>
8 <field name="inherit_id" ref="account.view_account_journal_form" />
9 <field eval="16" name="priority"/>
10 <field name="type">form</field>
11 <field name="arch" type="xml">
12 <data>
13 <field name="type" position="after">
14 <field name="refund_journal_id" attrs="{'invisible' : [('type', '!=', 'sale')]}"/>
15 </field>
16 </data>
17 </field>
18 </record>
19
20 </data>
21</openerp>

Subscribers

People subscribed via source and target branches