From 077e97c5d8b621183b0f15b76fab48fcf4f717ea Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Mon, 15 Dec 2008 12:41:34 +0100 Subject: [PATCH 1/2] Bugfix: 'account.move.line': trying to create one without 'name' bzr revid: olt@tinyerp.com-20081215114134-anj9f1yu70n8yg2i --- addons/account/invoice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 8f33c013bd0..b1694169646 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -839,6 +839,10 @@ class account_invoice(osv.osv): 'ref':invoice.number, } + name = invoice.invoice_line[0].name + l1['name'] = name + l2['name'] = name + lines = [(0, 0, l1), (0, 0, l2)] move = {'ref': invoice.number, 'line_id': lines, 'journal_id': pay_journal_id, 'period_id': period_id, 'date': date} move_id = self.pool.get('account.move').create(cr, uid, move) From 4297d5a743766328d9de02df8a6b20c6508bf7f7 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Mon, 15 Dec 2008 12:46:57 +0100 Subject: [PATCH 2/2] wrong identifier: frags -> fargs bzr revid: olt@tinyerp.com-20081215114657-7do9gloamn3esv9y --- addons/account/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 18c9930b244..ef63c5e6890 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -273,7 +273,7 @@ class account_move_line(osv.osv): while i < len(args): fargs = args[i][0].split('.', 1) if len(fargs) > 1: - args[i] = (frags[0], 'in', invoice_obj.search(cursor, user, + args[i] = (fargs[0], 'in', invoice_obj.search(cursor, user, [(fargs[1], args[i][1], args[i][2])])) i += 1 continue