From c278ebf2feae649de3bfc51ec3ad0e5378816a88 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 20 Jan 2017 12:01:47 +0100 Subject: [PATCH] [FIX] sale,account: do not reference to not declared yet group The group sale.group_discount_per_so_line is used in account but declared in sale. As the has_group method ignores unexistant fields, this field was never displayed until somebody install sale. In account, replace the discount group with debug mode. Remove it from the report as it was only displayed when at least one discount was set (not possible if the discount field is not displayed). In sale, makes xpath to use the correct group. Fixes 15094 --- addons/account/views/account_invoice_view.xml | 8 ++--- addons/account/views/report_invoice.xml | 4 +-- addons/sale/views/sale_views.xml | 29 +++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index e1da859f9d0..500044ecc96 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -46,7 +46,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -410,7 +410,7 @@ - + diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index 7226d27aae9..8e3779d5fd2 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -61,7 +61,7 @@ Source Document Quantity Unit Price - Disc.(%) + Disc.(%) Taxes Tax Excluded Price @@ -77,7 +77,7 @@ - + diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index aaca6ab18b8..6f5dab1225d 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -668,6 +668,19 @@ + + account.invoice.line.tree + account.invoice.line + + + + + sale.group_discount_per_so_line + + + + + account.invoice.line.form account.invoice.line @@ -677,6 +690,22 @@ + + sale.group_discount_per_so_line + + + + + + + account.invoice.supplier.form + account.invoice + + + + + sale.group_discount_per_so_line +