Odoo Help


POS product price based on contract.

abdul aziz yaakup
on 10/13/14, 10:30 PM 1,150 views

I have a customized sale's contract which define the product and the price. The price will be  different from the normal price which defined at the product itself. Besides, each customer will also have a different price per product based on the agreement (which define in contract) . If I using Point Of Sale UI, how can I generate the pos order along with the product's price which already define at the contract and not the price which define at the product itself?   

I already create onchange function and it works well only if I generate the order using the normal view but not from POS UI. Can anyone help me?


Nirav Jani
On 10/14/14, 1:14 AM


can you give selection for customer in POS UI ?

Hi Nirav Jani, what do you mean by selection for customer? FYI, right now, I'm using POS enhanced module to choose customer from POS UI. I get it from here : http://thierry-godin.developpez.com/openerp/openerp-module-pos-enhanced-en/ .

abdul aziz yaakup
on 10/14/14, 1:29 AM

Yes, If you want change the product price which right side in POS UI based on select customer,you need more change in JS file.

Nirav Jani
on 10/14/14, 1:57 AM

Right now, I can see that in JS file, the price for the product is from this code (correct me if i'm wrong): then(function(categories){ self.db.add_categories(categories); return self.fetch( 'product.product', ['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code', 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description', 'is_pack'], [['sale_ok','=',true],['available_in_pos','=',true]], {pricelist: self.get('shop').pricelist_id[0]} // context for price ); and, module.Orderline = Backbone.Model.extend({ initialize: function(attr,options){ this.price = options.product.get('price'); Let say I need to get the new product price which define at account.analytic.account (contract), does it require a lot of changes or just a minor changes?

abdul aziz yaakup
on 10/14/14, 2:31 AM

It is more change require because of when POS session start set single pricelist. In this case we set mutiple price for single product so that more changes require.

Nirav Jani
on 10/14/14, 2:47 AM

I tried to call on_change function in JS file. This function work fine if I create the order from the normal UI. But when I create the order through POS UI, I got this error: TypeError: onchange_partner() takes at least 5 arguments (4 given) Here is how I call the function: new instance.web.Model('sale.order').call('onchange_partner',[ids]).then(function(id){}); Do I call the function wrongly or I need to configure something else to make it work?

abdul aziz yaakup
on 10/17/14, 6:34 AM

I forgot to mention that this onchange function use to get the product's price from the contract.

abdul aziz yaakup
on 10/17/14, 6:38 AM

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: 10/13/14, 10:30 PM
Seen: 1150 times
Last updated: 3/16/15, 8:10 AM