From 4a91acbcc84bf056805be5f55f3986e551178fb9 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 014d46917..1b3e52fb8 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 2f146fd71..359a13336 100644 --- a/partner_firstname/models/res_partner.py +++ b/partner_firstname/models/res_partner.py @@ -87,7 +87,7 @@ class ResPartner(models.Model): """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