From 75ee662647d0209516997bdce7bed23afa1c32af Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Fri, 25 Jan 2013 17:07:11 +0100 Subject: [PATCH] [FIX] account_payment: imported payments from invoices on payment order do not reflect the reference type of the invoice lp bug: https://launchpad.net/bugs/1105067 fixed bzr revid: nh@agaplan.eu-20130125160711-cofis6ftzw3zvcza --- addons/account_payment/wizard/account_payment_order.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index 455475b0ae5..60b1bc9c1d1 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -88,6 +88,7 @@ class payment_order_create(osv.osv_memory): 'partner_id': line.partner_id and line.partner_id.id or False, 'communication': line.ref or '/', 'date': date_to_pay, + 'state': line.invoice and line.invoice.reference_type != 'none' and 'structured' or 'normal', 'currency': (line.invoice and line.invoice.currency_id.id) or line.journal_id.currency.id or line.journal_id.company_id.currency_id.id, }, context=context) return {'type': 'ir.actions.act_window_close'}