[FIX] Analytic account on writeoff should not be required

This commit is contained in:
unknown
2014-01-06 12:56:31 +01:00
committed by Holger Brunn
2 changed files with 4 additions and 2 deletions

View File

@@ -521,7 +521,7 @@ class banking_import_transaction(osv.osv):
'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,

View File

@@ -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"