diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-09-02 10:04:54 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2020-09-03 08:40:45 +0000 |
| commit | 3670c413c3aaa9aec01b4d1fc4019f238ab213fc (patch) | |
| tree | 37ffe9250e3d1ab98589c3b26c74c573820d552d /odoo | |
| parent | 710705b64c0134a5b568d998d0a3eb0df0f541c0 (diff) | |
[IMP] base: restrict countries creation/deletion
The modification of countries data should be restricted to knowledgeable users.
Indeed, by modifying, deleting and/or creating res.country records, the resulting
behavior generally won't be what you expect, breaking existing flows (delivery, taxes, VAT validation, ...)
in an open OR hidden way...
By restricting those modifications, we reduce the risks of users breaking their database through
'minor' changes unexpectingly triggering 'heavy' problems.
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/addons/base/security/ir.model.access.csv | 3 | ||||
| -rw-r--r-- | odoo/addons/base/views/res_country_views.xml | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/odoo/addons/base/security/ir.model.access.csv b/odoo/addons/base/security/ir.model.access.csv index 730b2ce6cf4..a57b05622d9 100644 --- a/odoo/addons/base/security/ir.model.access.csv +++ b/odoo/addons/base/security/ir.model.access.csv @@ -43,7 +43,8 @@ "access_res_country_group_all","res_country group_user_all","model_res_country",,1,0,0,0 "access_res_country_state_group_all","res_country_state group_user_all","model_res_country_state",,1,0,0,0 "access_res_country_group_group_all","res_country_group group_user_all","model_res_country_group",,1,0,0,0 -"access_res_country_group_user","res_country group_user","model_res_country","group_partner_manager",1,1,1,1 +"access_res_country_group_user","res_country group_user","model_res_country","group_partner_manager",1,0,0,0 +"access_res_country_group_system","res_country_group_system","model_res_country","group_system",1,1,1,1 "access_res_country_state_group_user","res_country_state group_user","model_res_country_state","group_partner_manager",1,1,1,1 "access_res_country_group_group_user","res_country_group group_user","model_res_country_group","group_partner_manager",1,1,1,1 "access_res_currency_group_all","res_currency group_all","model_res_currency",,1,0,0,0 diff --git a/odoo/addons/base/views/res_country_views.xml b/odoo/addons/base/views/res_country_views.xml index 4b9673a797b..00fd602556b 100644 --- a/odoo/addons/base/views/res_country_views.xml +++ b/odoo/addons/base/views/res_country_views.xml @@ -8,7 +8,7 @@ <field name="name">res.country.tree</field> <field name="model">res.country</field> <field name="arch" type="xml"> - <tree string="Country"> + <tree string="Country" create="0" delete="0"> <field name="name"/> <field name="code"/> </tree> @@ -19,7 +19,7 @@ <field name="name">res.country.form</field> <field name="model">res.country</field> <field name="arch" type="xml"> - <form> + <form create="0" delete="0"> <sheet> <div class="oe_button_box"> </div> |
