From 7df6f0081cbadcfbd37514c35d62d74bb545cfdd Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 21 Mar 2018 17:17:58 +0100 Subject: [PATCH] [FIX] config_parameter must be readed with sudo --- partner_firstname/__manifest__.py | 2 +- partner_firstname/models/res_partner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/partner_firstname/__manifest__.py b/partner_firstname/__manifest__.py index 014d46917d6..1b3e52fb818 100644 --- a/partner_firstname/__manifest__.py +++ b/partner_firstname/__manifest__.py @@ -7,7 +7,7 @@ { 'name': 'Partner first name and last name', 'summary': "Split first name and last name for non company partners", - 'version': '11.0.1.0.0', + 'version': '11.0.1.0.1', 'author': "Camptocamp, " "Grupo ESOC IngenierĂ­a de Servicios, " "Tecnativa, " diff --git a/partner_firstname/models/res_partner.py b/partner_firstname/models/res_partner.py index 2f146fd714d..359a1333647 100644 --- a/partner_firstname/models/res_partner.py +++ b/partner_firstname/models/res_partner.py @@ -87,7 +87,7 @@ def _get_names_order(self): """Get names order configuration from system parameters. You can override this method to read configuration from language, country, company or other""" - return self.env['ir.config_parameter'].get_param( + return self.env['ir.config_parameter'].sudo().get_param( 'partner_names_order', self._names_order_default()) @api.model