From cc0953824ffc8421ced83ebdaca208b52859b6e3 Mon Sep 17 00:00:00 2001 From: Nicolas Bessi Date: Tue, 29 Apr 2014 13:43:35 +0200 Subject: [PATCH] [FIX] copy of account invoice did not reset related policy --- account_credit_control/invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_credit_control/invoice.py b/account_credit_control/invoice.py index 98b730b11..a8e90f024 100644 --- a/account_credit_control/invoice.py +++ b/account_credit_control/invoice.py @@ -44,13 +44,14 @@ class AccountInvoice(orm.Model): } def copy_data(self, cr, uid, id, default=None, context=None): - """Ensure that credit lines are not duplicated when copy""" + """Ensure that credit lines and policcy are not copied""" if default is None: default = {} else: default = default.copy() default = default.copy() default['credit_control_line_ids'] = False + default['credit_policy_id'] = False return super(AccountInvoice, self).copy_data( cr, uid, id, default=default, context=context)