From b61ca10e6d5f49176cd8b1a8a00e7f1cc5b09729 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Tue, 24 Aug 2010 14:33:45 +0200 Subject: [PATCH] [IMP] account: ref field of account.move is now filled with better value when created from an invoice + small label change bzr revid: qdp-launchpad@tinyerp.com-20100824123345-x4c4btawbl6zurel --- addons/account/invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index c2fbe5f9293..2612fe80e2a 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -268,7 +268,7 @@ class account_invoice(osv.osv): 'invoice_line': fields.one2many('account.invoice.line', 'invoice_id', 'Invoice Lines', readonly=True, states={'draft':[('readonly',False)]}), 'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}), - 'move_id': fields.many2one('account.move', 'Invoice Movement', readonly=True, help="Links to the automatically generated Ledger Postings."), + 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, help="Links to the automatically generated Ledger Postings."), 'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Untaxed', store={ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), @@ -883,7 +883,7 @@ class account_invoice(osv.osv): line = self.finalize_invoice_move_lines(cr, uid, inv, line) move = { - 'ref': inv.number, + 'ref': inv.reference and inv.reference or inv.name, 'line_id': line, 'journal_id': journal_id, 'date': date,