Browse Source

[FIX] config_parameter must be readed with sudo

pull/576/head
Enric Tobella 7 years ago
parent
commit
1a0a972022
No known key found for this signature in database GPG Key ID: 1A2546A1B7BA2451
  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