[FIX] point_of_sale,pos_sale: import tax from orderline

Set up a [TEST] product with a tax A
Create a SO with [TEST] and a tax B and confirm
Open POS, import the created SO

[TEST] will be imported with tax A
while tax B should be pulled from the sale order line instead

opw-2699793

closes odoo/odoo#81580

X-original-commit: 0a5cbfeb7edcce6e6bb915d6e61c736491695ada
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2021-12-17 11:58:44 +00:00
parent 9540dc7772
commit f75abaf37e
2 changed files with 2 additions and 0 deletions
@@ -1815,6 +1815,7 @@ exports.Orderline = Backbone.Model.extend({
return;
}
this.product = options.product;
this.tax_ids = options.tax_ids;
this.set_product_lot(this.product);
this.set_quantity(1);
this.discount = 0;
@@ -147,6 +147,7 @@ odoo.define('pos_sale.SaleOrderManagementScreen', function (require) {
order: this.env.pos.get_order(),
product: this.env.pos.db.get_product_by_id(line.product_id[0]),
price: line.price_unit,
tax_ids: orderFiscalPos ? undefined : line.tax_id,
price_manually_set: true,
sale_order_origin_id: clickedOrder,
sale_order_line_id: line,