[英]How to inherit and extend xml qweb view in odoo 15?
i am trying to extend a Qweb XML view in Odoo 15.我正在尝试在 Odoo 15 中扩展 Qweb XML 视图。
Here is what i tried.这是我试过的。
static.xml static.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="digital_sign_extend.sign_name_and_signature_extend" t-extend="web.sign_name_and_signature">
<t t-jquery=".card-header" t-operation="replace">
</t>
</t>
<t> // here i added this purposefully, to get an error, but nothing happened.
</templates>
manifest .py # - - coding: utf-8 - - { 'name': "digital_sign_extend",清单.py # - - 编码:utf-8 - - { 'name': "digital_sign_extend",
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",
'description': """
Long description of module's purpose
""",
'author': "My Company",
'website': "http://www.yourcompany.com",
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list
'category': 'Uncategorized',
'version': '0.1',
# any module necessary for this one to work correctly
'depends': ['base','web'],
# always loaded
'data': [
# 'security/ir.model.access.csv',
'views/views.xml',
'views/templates.xml',
],
'web.assets_qweb':[
'digital_sign_extend/static/src/xml/digital_sign.xml',
],
# only loaded in demonstration mode
'demo': [
'demo/demo.xml',
],
}
How can i solve this?我该如何解决这个问题?
You need to add web.asset_qweb list into ' assets ' dictionary.您需要将 web.asset_qweb 列表添加到“资产”字典中。 Below is an example:
下面是一个例子:
'assets': {
'web.assets_qweb':[
'digital_sign_extend/static/src/xml/digital_sign.xml',
],
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.