From 9ce5e22e97045e6a4fe6c6616b419f834d868044 Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Fri, 1 Jul 2022 13:53:14 +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 402c4145..6390281b 100644 --- a/rma/views/rma_order_line_view.xml +++ b/rma/views/rma_order_line_view.xml @@ -210,12 +210,18 @@ - + - + @@ -271,7 +277,11 @@ /> - + diff --git a/rma/wizards/rma_make_picking_view.xml b/rma/wizards/rma_make_picking_view.xml index 111a9ee2..d1902fdb 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" />