flectra/addons/http_routing/models/ir_ui_view.py

17 lines
485 B
Python
Raw Normal View History

# -*- coding: ascii -*-
2018-01-16 11:34:37 +01:00
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
2018-01-16 11:34:37 +01:00
from flectra import api, models
from flectra.addons.http_routing.models.ir_http import slug, unslug_url
class IrUiView(models.Model):
_inherit = ["ir.ui.view"]
@api.model
def _prepare_qcontext(self):
qcontext = super(IrUiView, self)._prepare_qcontext()
qcontext['slug'] = slug
qcontext['unslug_url'] = unslug_url
return qcontext