From 6e9163150ee4335622ca65c62637fa62b22a7e1e Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Tue, 2 May 2017 11:36:47 +0200 Subject: [PATCH] [IMP] account: make currency_exchange_journal_id field visible in settings --- addons/account/models/res_config.py | 6 ++++++ addons/account/views/res_config_view.xml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/addons/account/models/res_config.py b/addons/account/models/res_config.py index 34145cf1a70..e6b705c86cd 100644 --- a/addons/account/models/res_config.py +++ b/addons/account/models/res_config.py @@ -14,6 +14,12 @@ class AccountConfigSettings(models.TransientModel): default=lambda self: self.env.user.company_id) currency_id = fields.Many2one('res.currency', related="company_id.currency_id", required=True, string='Currency', help="Main currency of the company.") + currency_exchange_journal_id = fields.Many2one( + 'account.journal', + related='company_id.currency_exchange_journal_id', + string="Exchange Gain or Loss Journal", + domain=[('type', '=', 'general')], + help='The accounting journal where automatic exchange differences will be registered') has_chart_of_accounts = fields.Boolean(compute='_compute_has_chart_of_accounts', string='Company has a chart of accounts') chart_template_id = fields.Many2one('account.chart.template', string='Template', domain="[('visible','=', True)]") diff --git a/addons/account/views/res_config_view.xml b/addons/account/views/res_config_view.xml index 44c22a45d09..6186b611e0e 100644 --- a/addons/account/views/res_config_view.xml +++ b/addons/account/views/res_config_view.xml @@ -128,6 +128,10 @@
+
+