Browse Source

[FIX] config_parameter must be readed with sudo

14.0
Enric Tobella 7 years ago
committed by Luis Torres
parent
commit
4a91acbcc8
  1. 2
      partner_firstname/__manifest__.py
  2. 2
      partner_firstname/models/res_partner.py

2
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, "

2
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

Loading…
Cancel
Save