Merge lp:~camptocamp/banking-addons/bank-statement-reconcile-70-fix-on-change-voucher into lp:banking-addons/bank-statement-reconcile-70

Proposed by Nicolas Bessi - Camptocamp
Status: Superseded
Proposed branch: lp:~camptocamp/banking-addons/bank-statement-reconcile-70-fix-on-change-voucher
Merge into: lp:banking-addons/bank-statement-reconcile-70
Diff against target: 118 lines (+16/-25)
6 files modified
account_statement_ext/__init__.py (+1/-0)
account_statement_ext/__openerp__.py (+4/-1)
account_statement_ext/statement.py (+4/-2)
account_statement_ext_voucher/__init__.py (+0/-2)
account_statement_ext_voucher/__openerp__.py (+7/-3)
account_statement_ext_voucher/statement_voucher_view.xml (+0/-17)
To merge this branch: bzr merge lp:~camptocamp/banking-addons/bank-statement-reconcile-70-fix-on-change-voucher
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp Needs Fixing
Alexandre Fayolle - camptocamp code review, no test Approve
Review via email: mp+145824@code.launchpad.net

This proposal has been superseded by a proposal from 2013-02-01.

Description of the change

statement ext collide with voucher for some on change. As it almost impossible to have a finance installation without voucher, we may add voucher as a dependence on statement ext in order to fix on change, and silent unwanted voucher behavior.

Nicolas

To post a comment you must log in.
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

If an other module has the same trouble the account_statement_ext addon onchange_partner_id is not "polite" and will not support the fact to have a None profile_id, maybe I should let the original signature

Nicolas

79. By Alexandre Fayolle - camptocamp

[REF] small reindent of patch

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I reindented the patch a little bit.

LGTM.

review: Approve (code review, no test)
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

As discussed internally, we should always include the voucher as it depends on "sale". I suggest that I made the following modification:

- Mark the account_satement_ext_voucher as deprecated
- Take the little patch that is inside and add it to account_statement_ext
- Let the dependance on account_voucher in account_statement_ext

The thing is we can't get rid of the voucher anymore in version 7.0 :(

review: Needs Fixing
80. By Joël Grand-Guillaume @ camptocamp

[IMP] Added the voucher period computation in the account_statement_ext module while it know depends on the account_voucher module.
[MIGR] Mark the account_statement_ext_voucher as deprecated is it is no more used.

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

Missing voucher.py

81. By Joël Grand-Guillaume @ camptocamp

[ADD] Missing voucher.py file... Better with it, sorry.

82. By Nicolas Bessi - Camptocamp

[TYPO]

83. By Nicolas Bessi - Camptocamp

[FIX] version number

84. By Nicolas Bessi - Camptocamp

[IMP] dead code

85. By Nicolas Bessi - Camptocamp

[FIX] copyright year

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_statement_ext/__init__.py'
2--- account_statement_ext/__init__.py 2012-12-20 13:37:01 +0000
3+++ account_statement_ext/__init__.py 2013-02-01 08:46:21 +0000
4@@ -22,3 +22,4 @@
5 import statement
6 import report
7 import account
8+import voucher
9\ No newline at end of file
10
11=== modified file 'account_statement_ext/__openerp__.py'
12--- account_statement_ext/__openerp__.py 2012-12-20 13:37:01 +0000
13+++ account_statement_ext/__openerp__.py 2013-02-01 08:46:21 +0000
14@@ -27,7 +27,8 @@
15 'complexity': 'normal',
16 'depends': [
17 'account',
18- 'report_webkit'
19+ 'report_webkit',
20+ 'account_voucher'
21 ],
22 'description': """
23 Improve the basic bank statement, by adding various new features,
24@@ -62,6 +63,8 @@
25 all the erronous line in a same popup instead of raising and crashing on every step.
26
27 4) Remove the period on the bank statement, and compute it for each line based on their date instead.
28+ It also add this feature in the voucher in order to compute the period correctly.
29+
30
31 5) Cancelling a bank statement is much more easy and will cancel all related entries, unreconcile them,
32 and finally delete them.
33
34=== modified file 'account_statement_ext/statement.py'
35--- account_statement_ext/statement.py 2013-01-28 09:48:10 +0000
36+++ account_statement_ext/statement.py 2013-02-01 08:46:21 +0000
37@@ -551,7 +551,7 @@
38 res['account_id'] = receiv_account
39 return res
40
41- def onchange_partner_id(self, cr, uid, ids, partner_id, profile_id, context=None):
42+ def onchange_partner_id(self, cr, uid, ids, partner_id, profile_id=None, context=None):
43 """
44 Override of the basic method as we need to pass the profile_id in the on_change_type
45 call.
46@@ -571,7 +571,9 @@
47 type = 'customer'
48 res_type = self.onchange_type(cr, uid, ids, partner_id, type, profile_id, context=context) # Chg
49 if res_type['value'] and res_type['value'].get('account_id', False):
50- return {'value': {'type': type, 'account_id': res_type['value']['account_id']}}
51+ return {'value': {'type': type,
52+ 'account_id': res_type['value']['account_id'],
53+ 'voucher_id': False}}
54 return {'value': {'type': type}}
55
56 def onchange_type(self, cr, uid, line_id, partner_id, type, profile_id, context=None):
57
58=== modified file 'account_statement_ext_voucher/__init__.py'
59--- account_statement_ext_voucher/__init__.py 2012-06-20 14:10:01 +0000
60+++ account_statement_ext_voucher/__init__.py 2013-02-01 08:46:21 +0000
61@@ -18,5 +18,3 @@
62 # along with this program. If not, see <http://www.gnu.org/licenses/>.
63 #
64 ##############################################################################
65-
66-import statement_voucher
67
68=== modified file 'account_statement_ext_voucher/__openerp__.py'
69--- account_statement_ext_voucher/__openerp__.py 2013-01-10 15:09:55 +0000
70+++ account_statement_ext_voucher/__openerp__.py 2013-02-01 08:46:21 +0000
71@@ -30,8 +30,12 @@
72 'account_voucher'
73 ],
74 'description': """
75- This module is only needed when using account_bank_statement_ext with voucher in order to compute the period
76+ This module is deprecated. It was only needed when using account_bank_statement_ext with voucher in order to compute the period
77 correctly. This is mainly because with account_bank_statement_ext, the period is computed for each line.
78+
79+ Now, we include this in the account_statement_ext module and added a dependencies on account_voucher (mainly cause we can't get
80+ rid of the voucher in version 7.0).
81+
82 """,
83 'website': 'http://www.camptocamp.com',
84 'init_xml': [],
85@@ -40,9 +44,9 @@
86 ],
87 'demo_xml': [],
88 'test': [],
89- 'installable': True,
90+ 'installable': False,
91 'images': [],
92- 'auto_install': True,
93+ 'auto_install': False,
94 'license': 'AGPL-3',
95
96 }
97
98=== removed file 'account_statement_ext_voucher/statement_voucher_view.xml'
99--- account_statement_ext_voucher/statement_voucher_view.xml 2012-07-04 11:51:39 +0000
100+++ account_statement_ext_voucher/statement_voucher_view.xml 1970-01-01 00:00:00 +0000
101@@ -1,17 +0,0 @@
102-<?xml version="1.0" encoding="UTF-8"?>
103-<openerp>
104- <data>
105-
106- <record id="account_voucher.view_bank_statement_form_invoice" model="ir.ui.view">
107- <field name="name">account.bank.statement.invoice.form.inherit</field>
108- <field name="model">account.bank.statement</field>
109- <field name="type">form</field>
110- <field name="inherit_id" ref="account.view_bank_statement_form"/>
111- <field name="arch" type="xml">
112- <field name="currency" invisible="1" position="after">
113- </field>
114- </field>
115- </record>
116-
117- </data>
118-</openerp>

Subscribers

People subscribed via source and target branches