[FIX] account: Don't copy many2many when copying statement line

When duplicating confirmed bank statement lines,
the many2many `move_ids` links were preserved, and,
therefore, there were links between the duplicated
lines and the move entries of the original lines.

Closes #6617
This commit is contained in:
Matthieu Dietrich 2015-05-08 09:31:44 +02:00 committed by Denis Ledoux
parent 6e23b2a807
commit d1c4d16a3a
1 changed files with 7 additions and 0 deletions

View File

@ -577,6 +577,13 @@ class account_bank_statement_line(osv.osv):
'type': 'general',
}
def copy(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(
cr, uid, id, default=default, context=context)
account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: