Odoo销售点+ Posbox:如何修改收据 [英] Odoo Point of Sale + Posbox : How to modify receipt
问题描述
我需要修改销售点的收据
I need to modify the receipt of Point of sale
在Odoo销售点,有两个用于打印收据的模板: XmlReceipt和PosTicket
In Odoo point of sale, the are two templates to print receipt : XmlReceipt and PosTicket
当我使用Posbox时,我想我必须修改XmlReceipt. 我想知道是否有一种方法可以继承原始模板吗? 我找到了有关如何使用PosTicket模板进行操作的示例,但Xmlreceipt似乎无法以相同的方式工作.
As I use a Posbox I guess I have to modify XmlReceipt. I wonder if there is a way to inherit the original template ? I found examples on how to do it with PosTicket template but Xmlreceipt doesnt seem to work the same way.
有什么想法吗?
谢谢.
推荐答案
我扩展模板"PosTicket",通过t-jquery查找元素,替换为我的数据(在产品名称中添加免费")
I extends template "PosTicket", find element by t-jquery, replace with my data (Add "Free" to product's name)
<templates id="template" >
<t t-extend="PosTicket">
<t t-jquery=".receipt-orderlines .product_line" t-operation="inner">
<t t-if="orderline.get_reward() and orderline.get_reward().type == 'gift'">Free </t>
<t t-esc="orderline.get_product().display_name"/>
</t>
</t>
这篇关于Odoo销售点+ Posbox:如何修改收据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!