[FIX] point_of_sale: only load cashier belonging to the pos's company, cashier without PINs could not be set

Conflicts:
	addons/point_of_sale/static/src/js/models.js
This commit is contained in:
Frederic van der Essen
2014-11-26 12:11:58 +01:00
committed by Frédéric van der Essen
parent 18f698c952
commit 21b1cc3f89
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
},{
model: 'res.users',
fields: ['name','pos_security_pin','groups_id','barcode'],
domain: function(self){ return ['|', ['groups_id','=', self.config.group_pos_manager_id[0]],['groups_id','=', self.config.group_pos_user_id[0]]]; },
domain: function(self){ return [['company_id','=',self.user.company_id[0]],'|', ['groups_id','=', self.config.group_pos_manager_id[0]],['groups_id','=', self.config.group_pos_user_id[0]]]; },
loaded: function(self,users){
// we attribute a role to the user, 'cashier' or 'manager', depending
// on the group the user belongs.
@@ -1056,7 +1056,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
});
return ret;
}
} else {
return user;
}
});
},