diff options
| author | Ravi Gohil <rgo@odoo.com> | 2020-03-24 06:23:07 +0000 |
|---|---|---|
| committer | Ravi Gohil <rgo@odoo.com> | 2020-03-24 06:51:22 +0000 |
| commit | d2bd6d69d647777fffe51c22cbb324e6d27a950f (patch) | |
| tree | b93922ddda29752723c2f0c20cc3b43e0ebfafa2 /addons/account/models/res_config_settings.py | |
| parent | fd9b2590261e6caf4a8952d17db6e1ca06778140 (diff) | |
[IMP] account{_check_printing}: Added 'Country Code' field
Many localization modules adds field 'l10n_xx_country_code' on
Company/Settings views with the purpose of using it to hide that
particular localization's fields from other country's users.
So, it is better to add a common field in account module so that
other localization can use that field instead of adding a new one
where ever it is required.
Also, one such field was already added from account_check_printing
module, so we removed it from there as it is not needed anymore.
Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
Diffstat (limited to 'addons/account/models/res_config_settings.py')
| -rw-r--r-- | addons/account/models/res_config_settings.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/account/models/res_config_settings.py b/addons/account/models/res_config_settings.py index 6557f4b907f..3ea53a26ea5 100644 --- a/addons/account/models/res_config_settings.py +++ b/addons/account/models/res_config_settings.py @@ -89,6 +89,9 @@ class ResConfigSettings(models.TransientModel): string='Default Terms & Conditions', config_parameter='account.use_invoice_terms') + # Technical field to hide country specific fields from accounting configuration + country_code = fields.Char(related='company_id.country_id.code', readonly=True) + def set_values(self): super(ResConfigSettings, self).set_values() if self.group_multi_currency: |
