From bea603f86561b2f67dbcf1d6b3b3e55cf4c138de Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Thu, 28 Mar 2024 09:49:46 -0700 Subject: [PATCH] [FIX] l10n_br_sales: show price_total on lines This module was introduced in saas-16.4. In that version the sale order report and portal template displayed both price_subtotal and price_total for each sale order line. 655d375af83dd49bbbd5f5818e319c3b0e9778c1 removed price_total. Because this module removes price_subtotal we end up with no line total at all on the default Brazilian quotation PDF and portal view (just 3 columns: description, quantity and unit price). Loosely inspired by l10n_cl [1], this commit changes our approach to turn the two places where we use price_subtotal into price_total. The aforementioned commit also changed the heading of this column from "Subtotal" to a more generic "Amount", so there's no inconsistency there. Although this is a bit of a mess, I can't think of a better solution. [1] https://github.com/odoo/odoo/blob/655d375af83dd49bbbd5f5818e319c3b0e9778c1/addons/l10n_cl/views/report_invoice.xml#L173-L175 closes odoo/odoo#159794 Related: odoo/enterprise#59703 Signed-off-by: Josse Colpaert --- addons/l10n_br_sales/report/sale_order_templates.xml | 10 ++++++---- addons/l10n_br_sales/views/sale_portal_templates.xml | 12 ++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/addons/l10n_br_sales/report/sale_order_templates.xml b/addons/l10n_br_sales/report/sale_order_templates.xml index ec87a1119bb..778b7c660ee 100644 --- a/addons/l10n_br_sales/report/sale_order_templates.xml +++ b/addons/l10n_br_sales/report/sale_order_templates.xml @@ -13,12 +13,14 @@ diff --git a/addons/l10n_br_sales/views/sale_portal_templates.xml b/addons/l10n_br_sales/views/sale_portal_templates.xml index 50f6d218ac5..0c75e23bb05 100644 --- a/addons/l10n_br_sales/views/sale_portal_templates.xml +++ b/addons/l10n_br_sales/views/sale_portal_templates.xml @@ -5,17 +5,17 @@ - - - - + + current_subtotal + line.price_total + + + line.price_total +
- -