diff --git a/l10n_eu_product_adr/__manifest__.py b/l10n_eu_product_adr/__manifest__.py
index 806d0e07..41d44865 100644
--- a/l10n_eu_product_adr/__manifest__.py
+++ b/l10n_eu_product_adr/__manifest__.py
@@ -19,6 +19,8 @@
"data/adr_label.xml",
"data/adr_packing_instruction.xml",
"data/adr_goods.xml",
+ "security/res_groups.xml",
+ "security/ir.model.access.csv",
"views/adr_class_views.xml",
"views/adr_goods_views.xml",
"views/adr_label_views.xml",
@@ -28,6 +30,5 @@
"views/product_template_views.xml",
"views/product_product_views.xml",
"views/stock_picking_views.xml",
- "security/ir.model.access.csv",
],
}
diff --git a/l10n_eu_product_adr/models/stock_move.py b/l10n_eu_product_adr/models/stock_move.py
index a3d97aad..aa272e8f 100644
--- a/l10n_eu_product_adr/models/stock_move.py
+++ b/l10n_eu_product_adr/models/stock_move.py
@@ -14,6 +14,7 @@ class StockMove(models.Model):
compute="_compute_adr_points",
string="ADR Points",
digits="Product Unit of Measure",
+ compute_sudo=True,
)
@api.depends("product_id", "product_uom_qty")
diff --git a/l10n_eu_product_adr/readme/CONFIGURE.rst b/l10n_eu_product_adr/readme/CONFIGURE.rst
index 21d73dd4..a0baed30 100644
--- a/l10n_eu_product_adr/readme/CONFIGURE.rst
+++ b/l10n_eu_product_adr/readme/CONFIGURE.rst
@@ -21,3 +21,7 @@ Goods*.
The number of ADR points on the picking is based on the product weight field
if it is filled in, or otherwise on the UoM quantity in the product's reference
UoM (presumably Liter or Kilogram).
+
+This module defines an ADR user group and an ADR admin group. Membership of
+one of these groups is required to access the product tab with the ADR info.
+By default, all inventory users are added to the ADR user group.
diff --git a/l10n_eu_product_adr/security/ir.model.access.csv b/l10n_eu_product_adr/security/ir.model.access.csv
index e16d6f23..ffeeee45 100644
--- a/l10n_eu_product_adr/security/ir.model.access.csv
+++ b/l10n_eu_product_adr/security/ir.model.access.csv
@@ -1,9 +1,9 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_adr_goods_user,access_adr_goods,model_adr_goods,stock.group_stock_user,1,0,0,0
-access_adr_goods_manager,access_adr_goods,model_adr_goods,base.group_erp_manager,1,1,1,1
-access_adr_class_user,access_adr_class,model_adr_class,stock.group_stock_user,1,0,0,0
-access_adr_class_manager,access_adr_class,model_adr_class,base.group_erp_manager,1,1,1,1
-access_adr_label_user,access_adr_label,model_adr_label,stock.group_stock_user,1,0,0,0
-access_adr_label_manager,access_adr_label,model_adr_label,base.group_erp_manager,1,1,1,1
-access_adr_packing_instruction_user,access_adr_packing_instruction,model_adr_packing_instruction,stock.group_stock_user,1,0,0,0
-access_adr_packing_instruction_manager,access_adr_packing_instruction,model_adr_packing_instruction,base.group_erp_manager,1,1,1,1
+access_adr_goods_user,access_adr_goods,model_adr_goods,group_adr_goods_user,1,0,0,0
+access_adr_goods_manager,access_adr_goods,model_adr_goods,group_adr_goods_admin,1,1,1,1
+access_adr_class_user,access_adr_class,model_adr_class,group_adr_goods_user,1,0,0,0
+access_adr_class_manager,access_adr_class,model_adr_class,group_adr_goods_admin,1,1,1,1
+access_adr_label_user,access_adr_label,model_adr_label,group_adr_goods_user,1,0,0,0
+access_adr_label_manager,access_adr_label,model_adr_label,group_adr_goods_admin,1,1,1,1
+access_adr_packing_instruction_user,access_adr_packing_instruction,model_adr_packing_instruction,group_adr_goods_user,1,0,0,0
+access_adr_packing_instruction_manager,access_adr_packing_instruction,model_adr_packing_instruction,group_adr_goods_admin,1,1,1,1
diff --git a/l10n_eu_product_adr/security/res_groups.xml b/l10n_eu_product_adr/security/res_groups.xml
new file mode 100644
index 00000000..f4786bac
--- /dev/null
+++ b/l10n_eu_product_adr/security/res_groups.xml
@@ -0,0 +1,20 @@
+
+
+
+ ADR Goods User
+
+
+
+ ADR Goods Administrator
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_eu_product_adr/views/product_product_views.xml b/l10n_eu_product_adr/views/product_product_views.xml
index 6f47c116..c2a8360e 100644
--- a/l10n_eu_product_adr/views/product_product_views.xml
+++ b/l10n_eu_product_adr/views/product_product_views.xml
@@ -4,6 +4,7 @@
Dangerous goods settings on variants
product.product
+
diff --git a/l10n_eu_product_adr/views/product_template_views.xml b/l10n_eu_product_adr/views/product_template_views.xml
index 6088aa58..acf7d4be 100644
--- a/l10n_eu_product_adr/views/product_template_views.xml
+++ b/l10n_eu_product_adr/views/product_template_views.xml
@@ -3,6 +3,7 @@
product.template.dangerous.class
product.template
+