Odoo POS Pop Ups

In odoo retailers will be mostly concentrating on POS because that minimizes their effort to more extreme,….

Now on developer side it is tough work to customize that pos.. since it is collaboration of js, jquery with python…  Some times head ache.. 😛 🙂 ..

No problem now we will see how to create a pop up in odoo POS,,,,

For this you need some basic knowledge in

1) js, jquery


3)odoo qweb widgets

Now we are going to create a popup asking name to enter in pos….

create a module in odoo.. with init and openerp file…

Now normally on creation of wizard we used to create a form for pop right.. like that create one as below..

create model.py file with following code:

from openerp import api, fields, models
from openerp.osv import osv

class pos_model(models.Model):
_name = ‘pos.popup’


def okay_refresh(self,cr,uid,ids,context=None):





view.xml file has this:

<?xml version=”1.0″ encoding=”utf-8″?>
<record model=”ir.actions.act_window” id=”create_pop_up”>
<field name=”name”>Pop up</field>
<field name=”res_model”>pos.popup</field>
<field name=”view_mode”>form</field>

<record id=”create_pop_form” model=”ir.ui.view”>
<field name=”name”>Pop up</field>
<field name=”model”>pos.popup</field>
<field name=”type”>form</field>
<field name=”arch” type=”xml”>
<form string=”Pop up” version=”7.0″>

<br />
<h2>Enter the name:</h2>
<br /><br />
<label for=”name” style=”clear:left;text-align:right;padding-right:10px;float:left;padding-left:5em “/>
<field name=”name” nolable=”1″ style=”float:left;padding-left:5em “/><br /><br />

<br />
<br />


Now its turn for POS module change..

TO add button to POS.. create static–>src–>xml–>pop_up.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<template id=”payment_screen”>
<t t-extend=”PosWidget”>

<t t-jquery=”div.pos-branding” t-operation=”inner”>
<button class=”popup-misc” style=”position:absolute;left:300px; top:7px;width: 100px; height: 37px; font-size:15px;”>Name popup</button>


Now create a file static–>src–>js–>pos_pop.js

in that paste it

openerp.module_name = function(instance){

var module = instance.point_of_sale; 
var QWeb = instance.web.qweb;

build_widgets: function(){
var self = this;

type: ‘ir.actions.act_window’,
res_model: “pos.popup”,

views: [[false, ‘form’]],
target: ‘new’,
context: {},





create a file template.xml in that paste the following code


<template id=”assets_frontend” inherit_id=”web.assets_common”>
<xpath expr=”.” position=”inside”>



This will add your js to odoo frond end..

Finally add all the xml files in _openerp__.py…

Thats it.. popup is now okay…. Ping me if you get any dout or any suggestions…

Thank you… 🙂



Odoo Developer,



6 thoughts on “Odoo POS Pop Ups

  1. Hi, is possible to create a pop up window when you click/tap on an selected item of the receipt to add predefined notes? Like special requests for a dish for example. Would be very helpful!


    1. Got it superb requirement… It can be obtained by inheriting the whole poswidget via js and adding changes in jquery onclick event to create popup… add also adding a button in popup to create a record in model…


      1. Interesting but out of my reach! 😛
        I’m not an expert, I know just a little of xml and Python… But think on for one of your next posts!
        This one was very helpful!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s