今天在整理文件上传功能时,发现
odoo16的ir_ui_view.py中_render方法不见了,引用出错AttributeError: 'ir.ui.view' object has no attribute '_render'
def _render(self, values=None, engine='ir.qweb', minimal_qcontext=False):
assert isinstance(self.id, int)
qcontext = dict() if minimal_qcontext else self._prepare_qcontext()
qcontext.update(values or {})
return self.env[engine]._render(self.id, qcontext)
@api.model
def _prepare_qcontext(self):
""" Returns the qcontext : rendering context with website specific value (required
to render website layout template)
"""
qcontext = dict(
env=self.env,
user_id=