Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
918 Vizualizări

Hi,


How can I adjust the order_receipt.xml / order_receipt.js to print items in a SPECIFIC defined category? 


I have V18 Community edition installed on a Windows 11 machine. Just testing the waters with the software.


For example, no matter the order I select at POS to cart, I would like to print to follow a specific ORDER / FORMAT. Such as :


Appestisers

Starters

Mains

Sides

Drinks 


I wish to have the print in this format.Not sure about the props etc to use and which file in specific to work on. 

Imagine profil
Abandonează

Upon further review, Odoo already offers features like designating the POS as a Restaurant/Bar, grouping the cart by category, and having POS categories ready. Therefore, adding a sort sequence to the POS category should be sufficient.

Cel mai bun răspuns

There are mutiple approach to this requirements:
- Backend only: My preference. I'd just add a new sequence field to the pos order line and calculate the sequence based on the product category. We can even create small model for users to order the product category themselves instead of hardcoding them.
- Frontend only: The order_widget is the main component to display each order line. We need to be able to sort the props.lines before passing them to the template. Or we can modify the template to have hardcoded section such as apertisers: only print appestisers line.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

How would we go about doing this frontend / backend?

I have looked everywhere and such an option as default for sequence ordering does not exist?

Imagine profil
Abandonează