[FIX] account: allow to reinitialize module
Account demo data try to add lines to payment terms. However when reinitializing the module similar lines are added and a constraint raises as there should not have duplicates. This commit voids payment terms before refilling them.
This commit is contained in:
@@ -24,13 +24,13 @@
|
||||
<record id="account_payment_term" model="account.payment.term">
|
||||
<field name="name">End of Following Month</field>
|
||||
<field name="note">Payment terms: End of Following Month</field>
|
||||
<field name="line_ids" eval="[(0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 0, 'option': 'last_day_following_month'})]"/>
|
||||
<field name="line_ids" eval="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 0, 'option': 'last_day_following_month'})]"/>
|
||||
</record>
|
||||
|
||||
<record id="account_payment_term_advance" model="account.payment.term">
|
||||
<field name="name">30% Advance End of Following Month</field>
|
||||
<field name="note">Payment terms: 30% Advance End of Following Month</field>
|
||||
<field name="line_ids" eval="[(0, 0, {'value': 'percent', 'value_amount': 30.0, 'sequence': 400, 'days': 0, 'option': 'day_after_invoice_date'}),
|
||||
<field name="line_ids" eval="[(5, 0), (0, 0, {'value': 'percent', 'value_amount': 30.0, 'sequence': 400, 'days': 0, 'option': 'day_after_invoice_date'}),
|
||||
(0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 0, 'option': 'last_day_following_month'})]"/>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user