[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
This commit is contained in:
Joren Van Onder
2017-08-26 15:25:35 -07:00
parent dedff1842b
commit b5aaf0d527
@@ -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;