Merge lp:~therp-nl/banking-addons/ba61-fix_writeoff_analytic into lp:banking-addons/6.1

Proposed by Stefan Rijnhart (Opener) on 2013-11-17
Status: Merged
Merged at revision: 191
Proposed branch: lp:~therp-nl/banking-addons/ba61-fix_writeoff_analytic
Merge into: lp:banking-addons/6.1
Diff against target: 27 lines (+4/-2)
2 files modified
account_banking/banking_import_transaction.py (+1/-1)
account_banking/wizard/banking_transaction_wizard.xml (+3/-1)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba61-fix_writeoff_analytic
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review 2013-11-17 Approve on 2013-12-02
Review via email: mp+195522@code.launchpad.net

Commit message

[FIX] Analytic account on writeoff should not be required
 and be visible to group analytic only

To post a comment you must log in.
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking/banking_import_transaction.py'
2--- account_banking/banking_import_transaction.py 2013-09-05 21:44:46 +0000
3+++ account_banking/banking_import_transaction.py 2013-11-17 20:15:49 +0000
4@@ -521,7 +521,7 @@
5 'writeoff_amount': writeoff,
6 'payment_option': transaction.payment_option,
7 'writeoff_acc_id': transaction.writeoff_account_id.id,
8- 'analytic_id': transaction.writeoff_analytic_id.id,
9+ 'analytic_id': transaction.writeoff_analytic_id.id or False,
10 'date': st_line.date,
11 'date_due': st_line.date,
12 'period_id': period_id,
13
14=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
15--- account_banking/wizard/banking_transaction_wizard.xml 2013-05-02 15:13:33 +0000
16+++ account_banking/wizard/banking_transaction_wizard.xml 2013-11-17 20:15:49 +0000
17@@ -108,7 +108,9 @@
18 <label string="Choose what you want to do with the eventual difference between the paid amount and the sum of allocated amounts. You can either choose to keep open this difference on the partner's account, or reconcile it with the payment." colspan="2"/>
19 <field name="payment_option" />
20 <field name="writeoff_account_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
21- <field name="writeoff_analytic_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
22+ <field name="writeoff_analytic_id"
23+ groups="analytic.group_analytic_accounting"
24+ attrs="{'invisible':[('payment_option','=','without_writeoff')]}" />
25 <button colspan="1"
26 name="trigger_write"
27 type="object"

Subscribers

People subscribed via source and target branches