[FIX] point_of_sale: prevent taxes of another company to be loaded
As admin every tax is loaded, which is wrong anyway. When the admin opens a session a change the cashier in the POS interface, every order is made with every tax ever (on the product) which could lead to major faulty records See the case on OPW 786803 which is critical
This commit is contained in:
@@ -203,7 +203,7 @@ exports.PosModel = Backbone.Model.extend({
|
||||
},{
|
||||
model: 'account.tax',
|
||||
fields: ['name','amount', 'price_include', 'include_base_amount', 'amount_type', 'children_tax_ids'],
|
||||
domain: null,
|
||||
domain: function(self) {return [['company_id', '=', self.company && self.company.id || false]]},
|
||||
loaded: function(self, taxes){
|
||||
self.taxes = taxes;
|
||||
self.taxes_by_id = {};
|
||||
|
||||
Reference in New Issue
Block a user