diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 1b5c355445b..3d956db7ced 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -169,7 +169,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal },{ model: 'res.partner', fields: ['name','street','city','state_id','country_id','vat','phone','zip','mobile','email','ean13','write_date'], - domain: function(self){ return [['customer','=',true]]; }, + domain: [['customer','=',true]], loaded: function(self,partners){ self.partners = partners; self.db.add_partners(partners); @@ -270,7 +270,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal 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: function(self){ return [['sale_ok','=',true],['available_in_pos','=',true]]; }, + 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);