Odoo Help


Add new field to POS ticket of the restaurant module

on 2/26/16, 6:57 AM 1,039 views

I want to add a new field that contains the name of the table that had that order in the pos receip of the resaturant module so I don't know which file to modify, I already have searched for similar examples but couldn't solve this 

I first added the variable that containes the name of the table in the models fields (this variable is in the restaurant_table class so I have done an inheritance to the restaurant_printer class) :


model: 'restaurant.printer',

fields: ['name','proxy_ip','product_categories_ids','name_table'],

seconde I have added this line in the pos_restaurant\static\src\xml\printbill.xml

<div id="name_table" style="text-align:center;"></div>

but nothing had changed in the ticket any ideas please?

On 3/2/16, 4:35 AM

for all people who have interest in this I figured out how to add that field so first I thought that only the pos restaurant module files that needs to be modified so I was wrong and it's what it was all about,so the main file that should be modified is the addons\point_of_sale\static\src\xml\pos.xml ,to specifiy it's the PosTicket template,so the modification showed up right away because after all that restaurant module depends on the main point of sale 

 I added my code just after the shop widget like :

Table: <t t-esc="widget.pos.table.name"/><br />

and name of the table was added in the printed ticket 

hope this helps you

How do you manage to add a custom auto-increment variable for POS tickets? I've posted my intent here: https://www.odoo.com/forum/help-1/question/how-to-create-manage-a-auto-increment-pos-ticket-value-125522

Marcio Valenzuela P
on 10/28/17, 7:39 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/26/16, 6:57 AM
Seen: 1039 times
Last updated: 3/2/16, 4:35 AM