Odoo Help


How i can modify JS method in POS?

valentin chemiere
on 4/17/13, 8:01 AM 2,242 views

Hello everybody,

I want to modify the method which display the product's price in list price. To do that i followed the answer posted in another question (not enough karma to post link sorry) but it's not work with my code:

openerp.openerp_pos_models_ttc = function(instance) {
    instance.openerp_pos_models_ttc = {};
    var module = instance.point_of_sale;
    var _super_ = module.Orderline.prototype.get_display_price;
    module.Orderline.prototype.get_display_price = function(){
        console.log('display price');
        return 1000;


What am i doing wrong?

There is my __openerp__.py :

'name': 'pos_ttc',
    'version': '1.0',
    'category': 'Sales Management',
    'description': """
    'depends': ['point_of_sale'],
    'data': [
    'js': [

I work on OpenERP 7.


What are you trying to do? What error you get? Because your code work for me, when I push an article I got in the order list that article with price 1000. Be aware that this method don't modify the price value in the item box, but in the buy item list.

on 4/17/13, 8:38 AM

I just want to include the product tax in the price in order list (the calculation will do in second step when i have inherit a javascript method with success) . I don't have any error, it just do nothing. When put a breakpoint in openerp_pos_models_ttc function he never stop on it, like he never pass into this function, and when i try step by step he just jump at the end of the function.

valentin chemiere
on 4/17/13, 9:55 AM
valentin chemiere
On 4/17/13, 12:11 PM

Finally i found why it won't work: I have created a main.js and his line in __openerp__.py but I commented it with my last sample of code which don't need it. Unfortunally this file is still active or something that because when i just delete it, my module work perfectly as I expected.

Sorry for the inconvenience.

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

0 follower(s)


Asked: 4/17/13, 8:01 AM
Seen: 2242 times
Last updated: 3/16/15, 8:10 AM