mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Analytic account on writeoff should not be required
and be visible to group analytic only
This commit is contained in:
@@ -459,7 +459,7 @@ class banking_import_transaction(orm.Model):
|
||||
'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,
|
||||
|
||||
@@ -100,7 +100,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"
|
||||
|
||||
Reference in New Issue
Block a user