[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
This commit is contained in:
David
2019-01-28 15:07:57 +00:00
committed by lejeune quentin
parent a0074af212
commit 60748a95e2
+3 -1
View File
@@ -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);