Odoo Help


This community 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.


add new button in POS screen interface

on 3/3/16, 12:35 PM 409 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


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