嗨,我曾尝试在销售点模块中继承pos.xml,我想在“总计”和“税额”下方显示一个新数据。
我不知道我在做什么错
这是我的代码
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="attempt_inherit_pos_template" inherit_id="point_of_sale.template">
<xpath expr="//div[@class='subentry']" position="replace">
<div class='new_subentry'>Additional Discount: </div>
</xpath>
</template>
</data>
</odoo>
我"qweb" : ["static/src/xml/attempt_inherit_pos_qweb.xml",],
将此添加到清单文件中
我在POS会话屏幕上看不到任何更改
我究竟做错了什么?
您需要使用模板继承来更改OrderWidget
模板。
将内容更改attempt_inherit_pos_qweb.xml
为:
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="OrderWidget">
<!-- Taxes selector -->
<t t-jquery="div.subentry" t-operation="after">
<!-- Your xml code here -->
</t>
</t>
</templates>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句