Merge pull request #3803 from TheCloneMaster/patch-7

POS is loading all partners, not only customers
This commit is contained in:
Frédéric Van der Essen 2014-11-26 16:38:44 +01:00
commit 94aded554c
1 changed files with 2 additions and 2 deletions

View 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: null,
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);