From 6318ff667504ead9eeec286f319ea1fc49f34f4e Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 12 Sep 2017 17:11:14 +0200 Subject: [PATCH] [FIX] account_voucher: default currency - Go to Accounting > Configuration > Journals. - In the form view of a journal, click on Action > Voucher Entries - Click on Create => traceback opw-771415 --- addons/account_voucher/models/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/models/account_voucher.py b/addons/account_voucher/models/account_voucher.py index 48b38c90487..467ed1c4533 100644 --- a/addons/account_voucher/models/account_voucher.py +++ b/addons/account_voucher/models/account_voucher.py @@ -82,7 +82,7 @@ class AccountVoucher(models.Model): @api.model def _get_currency(self): - journal = self.env['account.journal'].browse(self._context.get('journal_id', False)) + journal = self.env['account.journal'].browse(self.env.context.get('default_journal_id', False)) if journal.currency_id: return journal.currency_id.id return self.env.user.company_id.currency_id.id