From 8f6815857fa068635181e25b1c8d45063467c4fd Mon Sep 17 00:00:00 2001 From: nie Date: Mon, 19 Oct 2020 14:21:47 +0000 Subject: [PATCH] [FIX] sale_margin: confusing margin percentage in pivot Steps to reproduce the bug: - Activate Margins in Sales > Settings - Go to the pivot view of quotations - In Measures, click Margin (%) Bug: Margin percentages are aggregated by computing the sum of the margin sub-percentages instead of using the data of the aggregated row (i.e. agg. margin / agg. total). Explanation: This is one of the flaws of the pivot view. The best way to solve this would be to create a custom aggregation in PostgreSQL. This commit is just hiding the measure for now. opw:2349896 closes odoo/odoo#60354 X-original-commit: 1e3fc6894b13d51a3f6327653afbf8d5a316a21d Signed-off-by: backspac --- addons/sale_margin/views/sale_margin_view.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/sale_margin/views/sale_margin_view.xml b/addons/sale_margin/views/sale_margin_view.xml index c90dcec5a37..5c7ea8f0927 100644 --- a/addons/sale_margin/views/sale_margin_view.xml +++ b/addons/sale_margin/views/sale_margin_view.xml @@ -44,4 +44,15 @@ + + sale.order.margin.view.pivot + sale.order + + + + + + + +