Odoo Help


add new button in POS screen interface

on 3/3/16, 12:35 PM 677 views

I want to add a new button in the pos screen interface named waiter so I definded a class named waiter with it's views and when I try to add that button using this code in the pos.xml file it dosn't work so what to do any help would be greatful:


<button t-attf-class='button set-waiter #{ ( widget.pos.waiter.name and widget.pos.waiter.name.length > 10) ? "decentered" : "" }' >

<i class='fa fa-waiter' />

<t t-if="widget.pos.waiter">

<t t-esc="widget.pos.waiter.name" />


<t t-if="!widget.pos.waiter">




and here is the class:

class waiter(osv.osv) :

_name = "pos.waiter"

_description = "Waiter"

_columns = {

'name': fields.char('Nom serveur', required=True, translate=True),

'adrs': fields.char('Address'),

'tel': fields.integer('Téléphone'),



On 3/4/16, 5:53 AM

I added this but it seems not to be working the pos screen interface dosn't show for me ,what am I missing please?


model: 'pos.waiter',

fields: ['name'],

domain: null,

loaded: function(self, waiter){

self.waiter = waiter;



Thanh Loyal
On 3/4/16, 1:53 AM

"widget.pos.waiter"  <-- How can your 'waiter' get into 'widget.pos'?

Everything needs to be loaded before using. Please take a look at point_of_sale/static/src/js/models.js to see how data is fetched.

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

2 follower(s)


Asked: 3/3/16, 12:35 PM
Seen: 677 times
Last updated: 3/4/16, 5:53 AM