From 60748a95e2ce5ba7a1bfed6f254b4a53f684883c Mon Sep 17 00:00:00 2001 From: David Date: Fri, 25 Jan 2019 13:05:43 +0000 Subject: [PATCH] [FIX] point_of_sale: wrong tax in fp if unmapped - If a fiscal position is set in the point of sale and a product tax isn't mapped in it, it wasn't applying any tax at all. After this fix, the tax defaults to the product one. closes odoo/odoo#30556 --- addons/point_of_sale/static/src/js/models.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 6f2e65654f0..a22f856ed61 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1695,10 +1695,12 @@ exports.Orderline = Backbone.Model.extend({ return fiscal_position_tax.tax_src_id[0] === tax.id; }); - if (tax_mappings) { + if (tax_mappings && tax_mappings.length) { _.each(tax_mappings, function(tm) { taxes.push(self.pos.taxes_by_id[tm.tax_dest_id[0]]); }); + } else{ + taxes.push(tax); } } else { taxes.push(tax);