From 3d19d7dcd667eed452e8a064f69f5b64f5f167af Mon Sep 17 00:00:00 2001 From: Yolann Sabaux Date: Thu, 24 Nov 2022 08:25:55 +0000 Subject: [PATCH] [FIX] barcodes_gs1_nomenclature: access record with portal Steps to reproduce: (Activate Project, Timesheets, Sales, and Inventory) - connect with portal - open Projects - try to open project "AGR - S00021 - Sales Order" Issue: Access Error Cause: We want to access to the field "is_gs1_nomenclature" for which Portal has no access. Note: On the main Runbot (all apps) it does work because the subcontractin_portal adds the Barcode Nomenclature access to Portal user opw-3073064 closes odoo/odoo#106493 X-original-commit: e0fec5af209229546061c70509c834bb28dd1336 Signed-off-by: Adrien Widart Signed-off-by: Yolann Sabaux (yosa) --- addons/barcodes_gs1_nomenclature/models/ir_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/barcodes_gs1_nomenclature/models/ir_http.py b/addons/barcodes_gs1_nomenclature/models/ir_http.py index 58b95bfefdc..9a42eb94a72 100644 --- a/addons/barcodes_gs1_nomenclature/models/ir_http.py +++ b/addons/barcodes_gs1_nomenclature/models/ir_http.py @@ -9,7 +9,7 @@ class IrHttp(models.AbstractModel): def session_info(self): res = super().session_info() - nomenclature = self.env.company.nomenclature_id + nomenclature = self.env.company.sudo().nomenclature_id if not nomenclature.is_gs1_nomenclature: return res res['gs1_group_separator_encodings'] = nomenclature.gs1_separator_fnc1