From a248d56c8da5c8d3888f042f248fcd6d3a2b5e9a Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Fri, 24 Jun 2022 10:56:42 +0200 Subject: [PATCH] [IMP] Make rma order view cleaner for user Hide button and fields depending on the policy chosen on the rma line --- rma/views/rma_order_line_view.xml | 16 +++++++++++++--- rma/wizards/rma_make_picking_view.xml | 8 ++++---- rma_account/views/rma_order_line_view.xml | 11 +++++++++-- rma_account/wizards/rma_refund.xml | 4 ++-- rma_sale/views/rma_order_line_view.xml | 12 ++++++++---- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/rma/views/rma_order_line_view.xml b/rma/views/rma_order_line_view.xml index cf596b95..d7559f11 100644 --- a/rma/views/rma_order_line_view.xml +++ b/rma/views/rma_order_line_view.xml @@ -217,12 +217,18 @@ - + - + @@ -278,7 +284,11 @@ /> - + diff --git a/rma/wizards/rma_make_picking_view.xml b/rma/wizards/rma_make_picking_view.xml index 6e1d094f..8fe64e56 100644 --- a/rma/wizards/rma_make_picking_view.xml +++ b/rma/wizards/rma_make_picking_view.xml @@ -108,26 +108,26 @@ name="%(action_rma_picking_in)d" string="Create Incoming Shipment" class="oe_highlight" - attrs="{'invisible':['|', ('qty_to_receive', '=', 0), ('state', '!=', 'approved')]}" + attrs="{'invisible':['|', '|', ('qty_to_receive', '=', 0), ('state', '!=', 'approved'), ('receipt_policy', '=', 'no')]}" type="action" />