ir_ui_view.py 590 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. import logging
  3. from openerp import api, fields, models, _
  4. _logger = logging.getLogger(__name__)
  5. class View(models.Model):
  6. _inherit = 'ir.ui.view'
  7. @api.cr_uid_ids_context
  8. def render(self, *args, **kwargs):
  9. if len(args) >= 4:
  10. template_id = args[2]
  11. if template_id in ['web.login', 'web.webclient_bootstrap']:
  12. qcontext = args[3]
  13. qcontext["title"] = self.pool['ir.config_parameter'].get_param(args[0], args[1], "web.base.title", "")
  14. return super(View, self).render(*args, **kwargs)