[FIX] point_of_sale: apply fiscal position

Commit https://github.com/odoo/odoo/commit/5afb5ecd04cf49be6bedb655b187b19a65e1e02d#diff-1c14accbe350f7a177b3e81e5846861bL1363
removed the call to `_map_tax_fiscal_position`. Fiscal positions are not
applied anymore...

Instead of applying the fiscal position in the `compute_all` method as
it used to be, we apply it just before the call. This mimics the
behavior of SO/PO/Invoices, where the taxes are changed directly on the
order line.
This commit is contained in:
Nicolas Martinelli
2017-10-25 09:37:32 +02:00
parent 37003c89ef
commit 6366150484
@@ -1482,6 +1482,7 @@ exports.Orderline = Backbone.Model.extend({
return t.id === el;
}));
});
product_taxes = _.map(product_taxes, this._map_tax_fiscal_position.bind(this));
var all_taxes = this.compute_all(product_taxes, price_unit, this.get_quantity(), this.pos.currency.rounding);
_(all_taxes.taxes).each(function(tax) {