Odoo Help

Welcome!

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.

1

How to inherit POS js file ?

By
Erhuvwu Akpobaro
on 4/5/15, 6:56 PM 713 views

Hey all  ,


I am doing some point of sale customization however i am not sure how to inherit to the point of sale js file .


the current point of sale module js file code :


{

model: 'product.product',

fields: ['display_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',

'product_tmpl_id'],

domain: [['sale_ok','=',true],['available_in_pos','=',true]],

context: function(self){ return { pricelist: self.pricelist.id, display_default_code: false }; },

loaded: function(self, products){

self.db.add_products(products);

},

},

But  i want add a field in product.product , so for example : 


{

model: 'product.product',

fields: ['display_name', 'NEW_FIELD','list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code',

'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description',

'product_tmpl_id'],

domain: [['sale_ok','=',true],['available_in_pos','=',true]],

context: function(self){ return { pricelist: self.pricelist.id, display_default_code: false }; },

loaded: function(self, products){

self.db.add_products(products);

},

},


How can i go about inheriting this new field in with out completely overriding the point of sale / models.js

0
Anand
On 4/9/15, 10:40 AM

view this blog for some hint... pospopup post..

https://odooforyou.wordpress.com/

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

1 follower(s)

Stats

Asked: 4/5/15, 6:56 PM
Seen: 713 times
Last updated: 4/9/15, 10:40 AM