[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:
committed by
Frédéric van der Essen
parent
18f698c952
commit
21b1cc3f89
@@ -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;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user