From f75abaf37e6853cfc948408b71fef1e40463632e Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Fri, 3 Dec 2021 11:17:39 +0000 Subject: [PATCH] [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 Signed-off-by: Grazioso Andrea (agr) --- addons/point_of_sale/static/src/js/models.js | 1 + .../src/js/OrderManagementScreen/SaleOrderManagementScreen.js | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 5d5da0099d3..172eebe46a8 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -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; diff --git a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js index 7e0482728be..c91a8c30715 100644 --- a/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js +++ b/addons/pos_sale/static/src/js/OrderManagementScreen/SaleOrderManagementScreen.js @@ -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,