[point_of_sale] Domain functions to literals
authorMario Arias Badila <the.clone.master@gmail.com>
Wed, 26 Nov 2014 14:32:33 +0000 (08:32 -0600)
committerMario Arias Badila <the.clone.master@gmail.com>
Wed, 26 Nov 2014 14:32:33 +0000 (08:32 -0600)
Replaced domain functions with literals where there are only constants

addons/point_of_sale/static/src/js/models.js

index 1b5c355..3d956db 100644 (file)
@@ -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);