From dbe6aa4292dc3190987855f4b59a737503d1f7f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= <tde@odoo.com>
Date: Fri, 31 Mar 2017 14:22:43 +0200
Subject: [PATCH] [FIX] account: finally allows to reinit the module

Otherwise a constraint is raised because new line are added to the
payment term instead of recreating them from scratch. This constraint
blocks people from reinitializing the module, which is quite boring
when developing.
---
 addons/account/data/account_data.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml
index e245314448ad..f2bd9b1c8e89 100644
--- a/addons/account/data/account_data.xml
+++ b/addons/account/data/account_data.xml
@@ -28,7 +28,7 @@
         <record id="account_payment_term_15days" model="account.payment.term">
             <field name="name">15 Days</field>
             <field name="note">Payment terms: 15 Days</field>
-            <field name="line_ids" eval="[(0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 15, 'option': 'day_after_invoice_date'})]"/>
+            <field name="line_ids" eval="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 15, 'option': 'day_after_invoice_date'})]"/>
         </record>
 
         <record forcecreate="True" id="decimal_payment" model="decimal.precision">
@@ -39,7 +39,7 @@
         <record id="account_payment_term_net" model="account.payment.term">
             <field name="name">30 Net Days</field>
             <field name="note">Payment terms: 30 Net Days</field>
-            <field name="line_ids" eval="[(0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 30, 'option': 'day_after_invoice_date'})]"/>
+            <field name="line_ids" eval="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 30, 'option': 'day_after_invoice_date'})]"/>
         </record>
 
         <!--
-- 
GitLab