Skip to content

Commit

Permalink
[IMP] 优化 render_template,not values 的写法
Browse files Browse the repository at this point in the history
  • Loading branch information
USI-SHRD committed Jun 19, 2018
1 parent 4919ac8 commit 386ce52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app_odoo_customize/models/ir_ui_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class View(models.Model):
@api.model
def render_template(self, template, values=None, engine='ir.qweb'):
if template in ['web.login', 'web.webclient_bootstrap']:
if not values:
values = {}
values = values or {}
values["title"] = self.env['ir.config_parameter'].get_param("app_system_name", "odooApp")
return super(View, self).render_template(template, values=values, engine=engine)
return super(View, self).render_template(template, values=values, engine=engine)

0 comments on commit 386ce52

Please sign in to comment.