Browse Source

[FIX][11.0] web_environment_ribbon (#806)

* [FIX] web_environment_ribbon: Fix to show the ribbon to every non-admin user

* [FIX] web_environment_ribbon: Version number
pull/1071/head
Xavier Jiménez 7 years ago
committed by Dennis Sluijk
parent
commit
e69311838a
  1. 2
      web_environment_ribbon/__manifest__.py
  2. 7
      web_environment_ribbon/models/web_environment_ribbon_backend.py

2
web_environment_ribbon/__manifest__.py

@ -6,7 +6,7 @@
{ {
'name': "Web Environment Ribbon", 'name': "Web Environment Ribbon",
'version': '11.0.1.0.0',
'version': '11.0.1.0.1',
'category': 'Web', 'category': 'Web',
'author': 'Francesco OpenCode Apruzzese, ' 'author': 'Francesco OpenCode Apruzzese, '
'Tecnativa, ' 'Tecnativa, '

7
web_environment_ribbon/models/web_environment_ribbon_backend.py

@ -17,7 +17,8 @@ class WebEnvironmentRibbonBackend(models.AbstractModel):
@api.model @api.model
def _prepare_ribbon_name(self): def _prepare_ribbon_name(self):
name_tmpl = self.env['ir.config_parameter'].get_param('ribbon.name')
name_tmpl = self.env['ir.config_parameter'].sudo().get_param(
'ribbon.name')
vals = self._prepare_ribbon_format_vals() vals = self._prepare_ribbon_format_vals()
return name_tmpl.format(**vals) return name_tmpl.format(**vals)
@ -31,7 +32,7 @@ class WebEnvironmentRibbonBackend(models.AbstractModel):
name = self._prepare_ribbon_name() name = self._prepare_ribbon_name()
return { return {
'name': name, 'name': name,
'color': ir_config_model.get_param('ribbon.color'),
'background_color': ir_config_model.get_param(
'color': ir_config_model.sudo().get_param('ribbon.color'),
'background_color': ir_config_model.sudo().get_param(
'ribbon.background.color'), 'ribbon.background.color'),
} }
Loading…
Cancel
Save