Skip to Content
Menu
This question has been flagged
1 Reply
2545 Views

How can I alter the pos receipt by adding product category after product name in odoo 13? Can anybody help me to solve this?


Avatar
Discard
Best Answer

Hi ,
The field categ_id already loaded by Odoo .In odoo 13 there for just rewrite export_for_printing function in js by including category field.

product_categ: this.get_product().categ_id 

Finally you have to xpath your field in your xml file.

Product category :<t t-esc=line.product_categ’/>

In case of your custom field you have to load the field by using

models.load_fields("table name", [ ' field_name ' ]);

You can extend the pos ticket by using following method

 <templates id="template" xml:space="preserve">
   <t t-extend="PosTicket">
        new code here...

Regards

Avatar
Discard