From a35af81e6a64b45c84ee56f6309e784f6d846fcc Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 8 Jul 2015 09:38:48 +0200 Subject: [PATCH] [FIX] account_voucher: onchange_journal In the "Pay invoice" wizard, the period doesn't have to be change when the payment method is modified. opw:643791 --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 7c7a6215812..ae34b391c1b 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -898,7 +898,7 @@ class account_voucher(osv.osv): else: currency_id = journal.company_id.currency_id.id - period_ids = self.pool['account.period'].find(cr, uid, context=dict(context, company_id=company_id)) + period_ids = self.pool['account.period'].find(cr, uid, dt=date, context=dict(context, company_id=company_id)) vals['value'].update({ 'currency_id': currency_id, 'payment_rate_currency_id': currency_id,