copy the transaction_ref to the move lines from the invoice

pull/821/head
Guewen Baconnier 2014-01-17 14:32:52 +01:00 committed by Bhavesh Heliconia
parent f9d8182169
commit 8432bd3d5a
1 changed files with 7 additions and 0 deletions

View File

@ -39,3 +39,10 @@ class AccountInvoice(Model):
default['transaction_id'] = False default['transaction_id'] = False
return super(AccountInvoice, self).\ return super(AccountInvoice, self).\
copy_data(cr, uid, id, default=default, context=context) copy_data(cr, uid, id, default=default, context=context)
def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):
if invoice_browse.transaction_id:
for line in move_lines:
# tuple (0, 0, {values})
line[2]['transaction_ref'] = invoice_browse.transaction_id
return move_lines