the transaction id is copied only on account move lines having the same account than the invoice's one (the payable / receivable)

pull/239/head
Guewen Baconnier 2014-03-05 10:03:44 +01:00 committed by Iryna Vyshnevska
parent 11951edebf
commit 2fb34c240d
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,9 @@ class AccountInvoice(Model):
def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines):
if invoice_browse.transaction_id:
invoice_account_id = invoice_browse.account_id.id
for line in move_lines:
# tuple (0, 0, {values})
line[2]['transaction_ref'] = invoice_browse.transaction_id
if invoice_account_id == line[2]['account_id']:
line[2]['transaction_ref'] = invoice_browse.transaction_id
return move_lines