From 71e454d3b64893ff9026223ef4f79b2cea0f8abe Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Thu, 13 Apr 2017 16:39:48 +0200 Subject: [PATCH] [FIX] Issue #611 - do not copy move_ids on duplicate of statement. The overriden copy() for account.bank.statement.line is not called when the copy() for account.bank.statement is called. By setting move_ids to [] in copy_data, this is active on direct copy of line, or through copy of complete statement. --- addons/account/account_bank_statement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index b469c49deb250..199d43eafdc72 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -577,11 +577,11 @@ def onchange_type(self, cr, uid, line_id, partner_id, type, context=None): 'type': 'general', } - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = dict(default, move_ids=[]) - return super(account_bank_statement_line, self).copy( + return super(account_bank_statement_line, self).copy_data( cr, uid, id, default=default, context=context) account_bank_statement_line()