Skip to Content
Menu
This question has been flagged
2288 Views

Hi All ,

Currently I am working in POS V10 .The issue i am facing here is there is custom many2many field in product .My requirement is the product in POS UI shold be seaarchable by the inputs in that many2many field .


What i have done so far is  :


I have loaded the values in  POS :


{       

model:  'product.product',       

fields: ['display_name', 'list_price','price','pos_categ_id', 'taxes_id', 'barcode', 'default_code',                  'to_weight', 'uom_id', 'description_sale', 'description',                 'product_tmpl_id','tracking','manufacturer','product_barcodes'],       

order:  ['sequence','default_code','name'],        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);
        },    }

where product_barcodes is many2many field .

While loading the product_barcodes is a list .So i cannot search the product by product_barcodes value .


This is the JSON Data in the Browser .

[{"tracking":"none","list_price":1,"description":false,"uom_id":[1,"Unit(s)"],"price":1,"barcode":"123456","product_tmpl_id":1,"pos_categ_id":false,"product_barcodes":[1,2,3,4],"default_code":"001","to_weight":false,"display_name":"Miscellaneous","manufacturer":"2016","description_sale":false,"id":1,"taxes_id":[]},{"tracking":"none","list_price":0,"description":false,"uom_id":[1,"Unit(s)"],"price":0,"barcode":"987654","product_tmpl_id":8,"pos_categ_id":false,"product_barcodes":[7,8,9,10],"default_code":"TEST786","to_weight":false,"display_name":"Test Pro","manufacturer":"2017","description_sale":false,"id":8,"taxes_id":[1]},{"tracking":"none","list_price":1,"description":false,"uom_id":[1,"Unit(s)"],"price":1,"barcode":false,"product_tmpl_id":6,"pos_categ_id":false,"product_barcodes":[],"default_code":false,"to_weight":false,"display_name":"Add-On Costs","manufacturer":"2018","description_sale":false,"id":6,"taxes_id":[1]}]


Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
46
1
Dec 24
176
0
Nov 24
90
1
Nov 24
153
1
Nov 24
187