From c9a15982ac2b8a4b92613284d39f66eab86daa52 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 11 Dec 2007 15:46:02 +0000 Subject: [PATCH] Fix refund supplier invoice to have the same journal bzr revid: ced-56ae7c13ee54a4a7776147ad025c86254dfd8d09 --- 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 188ccd4bfdc..3f24b8aab17 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -632,7 +632,7 @@ class account_invoice(osv.osv): return map(lambda x: (0,0,x), lines) def refund(self, cr, uid, ids): - invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line']) + invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id']) new_ids = [] for invoice in invoices: @@ -664,7 +664,7 @@ class account_invoice(osv.osv): # take the id part of the tuple returned for many2one fields for field in ('address_contact_id', 'address_invoice_id', 'partner_id', - 'account_id', 'currency_id', 'payment_term'): + 'account_id', 'currency_id', 'payment_term', 'journal_id'): invoice[field] = invoice[field] and invoice[field][0] # create the new invoice