Files
odoo_source/addons/l10n_eu_service/models/res_config_settings.py
T
Ravi Gohil b4f0e758eb [IMP] l10n_xx: hide country specific fields from company/settings view
There are few fields added on settings and on company form view
by various l10n modules which are meant for particular country's
user and are of no use to others. Such fields should be hidden
from unrelated users. With this commit, it will be the case.

closes odoo/odoo#35755

Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
Related: odoo/enterprise#5158
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 06:59:35 +00:00

15 lines
555 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
l10n_eu_services_eu_country = fields.Boolean('Is European country?', compute='_compute_l10n_eu_services_european_country')
@api.depends('company_id')
def _compute_l10n_eu_services_european_country(self):
self.l10n_eu_services_eu_country = self.company_id.country_id in self.env.ref('base.europe').country_ids