From 7185bf7c8c5db11ac3c8545322f6c847c7f6d4ea Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 31 Dec 2020 11:04:08 +0000 Subject: [PATCH] [FIX] point_of_sale: Multicompany tax Steps to reproduce the bug: - Create a multi-company environment with two companies A & B - Create two sales taxes TA & TB, one for company A & one for company B - Created a shared product P and assign both TA & TB - Login with user having access of both companies - Open POS session and select P Bug: A traceback was raised opw:2422866 closes odoo/odoo#68102 X-original-commit: c087868a9a2b0aed22e8418b120f849bf680f918 Signed-off-by: Simon Goffin (sig) --- addons/point_of_sale/static/src/js/models.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 52ae9e50981..6fcffa2044e 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2262,6 +2262,7 @@ exports.Orderline = Backbone.Model.extend({ var product = this.get_product(); var taxes_ids = this.tax_ids || product.taxes_id; + taxes_ids = _.filter(taxes_ids, t => t in this.pos.taxes_by_id); var taxes = this.pos.taxes; var taxdetail = {}; var product_taxes = [];