From b5aaf0d527cdab794058ccbbf3cd5d215fd9a5af Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Mon, 21 Aug 2017 18:34:56 -0700 Subject: [PATCH] [FIX] point_of_sale: handle fiscal positions that remove taxes A tax can be mapped to nothing, so first check if _map_tax_fiscal_position actually returned something. Fixes #17963 --- addons/point_of_sale/static/src/js/models.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 5d7d96b5178..31c678e107c 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1360,6 +1360,9 @@ exports.Orderline = Backbone.Model.extend({ if (!no_map_tax){ tax = self._map_tax_fiscal_position(tax); } + if (!tax){ + return; + } if (tax.amount_type === 'group'){ var ret = self.compute_all(tax.children_tax_ids, price_unit, quantity, currency_rounding); total_excluded = ret.total_excluded;