Hi there
I want to remove some fields and add others to the POS receipt
I found a way to add a field, but I can't remove anyone
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi there
I want to remove some fields and add others to the POS receipt
I found a way to add a field, but I can't remove anyone
Hi,
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('pos-receipt-contact')]" position="replace">
</xpath>
</t>
</template>
Please refer the above code.
POS receipt’s corresponding template is ‘OrderReceipt’. First of all, An XML file is added inside the static>src>xml folder, and adds the above XML code into that XML file.
In this XML code, first, you have to inherit the OrderReceipt template from pos by using t-inherit-mode=” extension” and owl=”1”.The owl=”1”, which denotes it is an owl template. Then you have to extend the corresponding class. In the XPath expression, you can mention the exact path of the field which you want to delete. And give the position as ‘replace’. Close the Xpath tag.
The qweb template is added in the assets section of ‘web.assets_qweb’ in the __manifest__.py file.
Regards
Hi @Topaz IT Services and Integrated Solutions
Hope you are doing Well.
Please find code in comment.
I Hope this will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
For making the changes to POS Receipt you will need to inherit the OrderReceipt template:
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
place your changes for fields to be removed and added.
</>
you could refer to the base modules for the inheritance.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 23
|
1120 | ||
|
0
Dec 15
|
2064 | ||
|
2
Mar 15
|
7769 | ||
point of sales development
Solved
|
|
3
Jan 24
|
12097 | |
|
0
May 23
|
1005 |