From e2e27b41ad2b132595836f9b03ae9a25a4951c66 Mon Sep 17 00:00:00 2001 From: Julien Castiaux Date: Wed, 27 Mar 2019 09:57:35 +0000 Subject: [PATCH] [FIX] sale: subtotal computation and display Steps to reproduce: - Install Accounting and Sale - Enable the developer mode. - Go to Settings > Users & Comp > Your user, edit to check both "Tax Display B2B" and "Tax Display B2C" boxes. - Go to Settings > General Settings > Accounting > Reporting, check the "Add totals below sections" box. - Create a sale order in the sale module, the sale order must have at least one section with several products. - Print the sale order. The subtotal amounts are wrong. There are two different subtotals amount to compute, one for the *Amount* column and one for the *Total Price*. The actual computation did not store the two amount in different variables. Multiple template are broken in the same way. Fine tunning of 716ff76 Co-authored-by: Nans Lefevre opw-1950833 closes odoo/odoo#32148 Signed-off-by: Nans Lefebvre (len) --- addons/account/views/report_invoice.xml | 39 +++++++++++-------- addons/sale/report/sale_report_templates.xml | 39 +++++++++++-------- addons/sale/views/sale_portal_templates.xml | 41 +++++++++++--------- 3 files changed, 67 insertions(+), 52 deletions(-) diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index c32413a4f1d..1c57b6892c9 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -51,29 +51,26 @@ - - + + - + + - - + + @@ -92,20 +89,23 @@ - + - - + + - @@ -113,12 +113,17 @@ - diff --git a/addons/sale/report/sale_report_templates.xml b/addons/sale/report/sale_report_templates.xml index edce182dcfc..28a5d105dfc 100644 --- a/addons/sale/report/sale_report_templates.xml +++ b/addons/sale/report/sale_report_templates.xml @@ -70,29 +70,26 @@
Description Source Document Quantity Unit Price Disc.(%) - Taxes - Amount - Total Price - AmountTotal Price
- - + + + + + +
+ Subtotal + |
- - + + - + + - - + + @@ -110,20 +107,23 @@ - + - - + + - @@ -131,12 +131,17 @@ - diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml index e91882591d2..40bd6c27414 100644 --- a/addons/sale/views/sale_portal_templates.xml +++ b/addons/sale/views/sale_portal_templates.xml @@ -428,29 +428,26 @@
Description Quantity Unit Price Disc.(%) - Taxes - Amount - Total Price - AmountTotal Price
- - + + + + + +
+ Subtotal + |
- - + + - + + - - + + @@ -481,20 +478,23 @@ - + - - + + - @@ -502,12 +502,17 @@ -
Products Quantity Unit Price Discount - Taxes - Amount - Total Price - AmountTotal Price
- - + + + + + +
+ Subtotal + |