Odoo Help

1

How to inherit POS js file ?

By
Erhuvwu Akpobaro
on 4/5/15, 6:56 PM 1,066 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/

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.

Register

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

1 follower(s)

Stats

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