From b903872c8e9221ab9d3a120c110ec90bb43928c3 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 17 Jan 2014 16:07:46 +0100 Subject: [PATCH] comment, if we can't find an invoice, we leave the original ref --- account_statement_transactionid_completion/statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/account_statement_transactionid_completion/statement.py b/account_statement_transactionid_completion/statement.py index f283e12e..a44d20a0 100644 --- a/account_statement_transactionid_completion/statement.py +++ b/account_statement_transactionid_completion/statement.py @@ -113,8 +113,9 @@ class AccountStatementCompletionRule(Model): invoice = invoice_obj.browse(cr, uid, invoice_id[0], context=context) res['partner_id'] = invoice.partner_id.id - # should have the same ref than the invoice's move - # what TODO if the invoice is no yet validated + # we want the move to have the same ref than the found + # invoice's move, thus it will be easier to link them for the + # accountants if invoice.move_id: res['ref'] = invoice.move_id.ref st_vals = st_obj.get_values_for_line(