← Back to team overview

banking-addons-team team mailing list archive

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

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/ba61-fix_writeoff_analytic into lp:banking-addons/6.1.

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

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba61-fix_writeoff_analytic/+merge/195522

7.0 version here: https://code.launchpad.net/~therp-nl/banking-addons/ba70-fix_writeoff_analytic/+merge/195523
-- 
https://code.launchpad.net/~therp-nl/banking-addons/ba61-fix_writeoff_analytic/+merge/195522
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~therp-nl/banking-addons/ba61-fix_writeoff_analytic into lp:banking-addons/6.1.
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py	2013-09-05 21:44:46 +0000
+++ account_banking/banking_import_transaction.py	2013-11-17 20:15:49 +0000
@@ -521,7 +521,7 @@
             'writeoff_amount': writeoff,
             'payment_option': transaction.payment_option,
             'writeoff_acc_id': transaction.writeoff_account_id.id,
-            'analytic_id': transaction.writeoff_analytic_id.id,
+            'analytic_id': transaction.writeoff_analytic_id.id or False,
             'date': st_line.date,
             'date_due': st_line.date,
             'period_id': period_id,

=== modified file 'account_banking/wizard/banking_transaction_wizard.xml'
--- account_banking/wizard/banking_transaction_wizard.xml	2013-05-02 15:13:33 +0000
+++ account_banking/wizard/banking_transaction_wizard.xml	2013-11-17 20:15:49 +0000
@@ -108,7 +108,9 @@
                                     <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"/>
                                     <field name="payment_option" />
                                     <field name="writeoff_account_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
-                                    <field name="writeoff_analytic_id" attrs="{'required':[('payment_option','=','with_writeoff')],'invisible':[('payment_option','=','without_writeoff')]}" />
+                                    <field name="writeoff_analytic_id"
+                                           groups="analytic.group_analytic_accounting"
+                                           attrs="{'invisible':[('payment_option','=','without_writeoff')]}" />
                                     <button colspan="1"
                                             name="trigger_write"
                                             type="object"


Follow ups