Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4664 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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

https://odooforyou.wordpress.com/

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
dub 15
6400
1
dub 24
2013
0
čvn 22
1817
1
úno 22
5228
2
pro 16
5525