From 15f5819a8f43612932b5843aaf4c74b75b21c72e Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 2 Jan 2023 10:22:03 +0100 Subject: [PATCH] [IMP] rma: rma group supplier form view as a inherited view. The goal is to simplify view defintion and do not duplicate things, requiring to do view changes in two places. The same change was done from rma lines some time ago. --- rma/views/rma_order_view.xml | 189 ++++++------------------ rma/wizards/rma_add_serial_views.xml | 2 + rma/wizards/rma_add_stock_move_view.xml | 2 + 3 files changed, 48 insertions(+), 145 deletions(-) diff --git a/rma/views/rma_order_view.xml b/rma/views/rma_order_view.xml index d5ef1d1a..d951b8c6 100644 --- a/rma/views/rma_order_view.xml +++ b/rma/views/rma_order_view.xml @@ -97,6 +97,10 @@ string="Customer" colspan="4" /> + - + + + @@ -192,151 +199,43 @@ rma.order.supplier.form rma.order + + primary -
-
- -
- - - -
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- + rma.group_rma_supplier_user + + + Supplier + {'res_partner_search_mode': 'supplier'} + + + + - -
- + + + + + { + 'form_view_ref':'rma.view_rma_line_supplier_form', + 'default_rma_id': active_id, + 'default_partner_id': partner_id, + 'supplier': 1, + 'hide_title': True} + + diff --git a/rma/wizards/rma_add_serial_views.xml b/rma/wizards/rma_add_serial_views.xml index bd03e5a3..186818ba 100644 --- a/rma/wizards/rma_add_serial_views.xml +++ b/rma/wizards/rma_add_serial_views.xml @@ -55,6 +55,7 @@ name="%(action_rma_add_serial_wiz_customer)d" string="Add Lot/Serial Numbers" type="action" + attrs="{'invisible':[('type', '!=', 'customer')]}" /> @@ -92,6 +93,7 @@ name="%(action_rma_add_serial_wiz_supplier)d" string="Add Lot/Serial numbers" type="action" + attrs="{'invisible':[('type', '!=', 'supplier')]}" /> diff --git a/rma/wizards/rma_add_stock_move_view.xml b/rma/wizards/rma_add_stock_move_view.xml index 9c4e02a9..bd9d1270 100644 --- a/rma/wizards/rma_add_stock_move_view.xml +++ b/rma/wizards/rma_add_stock_move_view.xml @@ -101,6 +101,7 @@ name="%(action_rma_add_stock_move_customer)d" string="Add From Stock Move" type="action" + attrs="{'invisible':[('type', '!=', 'customer')]}" /> @@ -155,6 +156,7 @@ name="%(action_rma_add_stock_move_supplier)d" string="Add From Stock Move" type="action" + attrs="{'invisible':[('type', '!=', 'supplier')]}" />