From c5d13e59985a13cad73be7c40ad0bd817f71fc26 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 26 Mar 2021 09:47:39 +0100 Subject: [PATCH 1/7] [FIX] rma_repair: under_warranty cannot be editable as it is only editable in draft state in the related RMA, therefore when you have created a repair order, the field `under_warranty` is not editable anymore. --- rma_repair/models/repair.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rma_repair/models/repair.py b/rma_repair/models/repair.py index 5917299d..90da8bc4 100644 --- a/rma_repair/models/repair.py +++ b/rma_repair/models/repair.py @@ -11,7 +11,7 @@ class RepairOrder(models.Model): comodel_name="rma.order.line", string="RMA", ondelete="restrict" ) under_warranty = fields.Boolean( - related="rma_line_id.under_warranty", readonly=False + related="rma_line_id.under_warranty", ) payment_state = fields.Selection( related="invoice_id.payment_state", string="Payment Status" From 290c6166f9774407bdd8533e5e60d150acbf63d6 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 26 Mar 2021 09:53:18 +0100 Subject: [PATCH 2/7] [FIX] rma: toggle archive button removed in favor of web_ribbon. --- rma/views/rma_operation_view.xml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/rma/views/rma_operation_view.xml b/rma/views/rma_operation_view.xml index 39d992b3..e2e363e3 100644 --- a/rma/views/rma_operation_view.xml +++ b/rma/views/rma_operation_view.xml @@ -20,22 +20,16 @@
-
- -
+ +
+ From c800b0a4443fe6bcdd625097e867ffca0c24774b Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 26 Mar 2021 11:27:15 +0100 Subject: [PATCH 3/7] [IMP] rma: Do not highlight all action buttons and simplify rma.line views, supplier view is an extension of customer one. This makes easier to edit common elements in both views and ease maintenance. --- rma/views/rma_order_line_view.xml | 370 +++++------------- rma/wizards/rma_make_picking_view.xml | 30 +- .../rma_order_line_make_supplier_rma_view.xml | 3 +- 3 files changed, 101 insertions(+), 302 deletions(-) diff --git a/rma/views/rma_order_line_view.xml b/rma/views/rma_order_line_view.xml index 6a7b9fe3..85c4b96b 100644 --- a/rma/views/rma_order_line_view.xml +++ b/rma/views/rma_order_line_view.xml @@ -48,242 +48,6 @@ - - rma.order.line.supplier.form - rma.order.line - - -
-
- -
- - - -
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- -
-
- rma.order.line.form rma.order.line @@ -303,7 +67,6 @@ type="object" string="Back to Draft" attrs="{'invisible':[('state', '=', 'draft')]}" - class="oe_highlight" groups="rma.group_rma_customer_user,rma.group_rma_supplier_user" />
- + - + + + + + + + @@ -408,6 +177,7 @@ groups="stock.group_production_lot" attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}" /> + @@ -437,44 +207,7 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -489,13 +222,58 @@ + + + + + + + + + + + + + + + + + + @@ -510,8 +288,8 @@ string="Company" groups="base.group_multi_company" > - - + +
@@ -527,6 +305,40 @@
+ + rma.order.line.supplier.form + rma.order.line + + primary + + + Customer RMA + + + Supplier + {'res_partner_search_mode': 'supplier'} + + + 1 + + + [('picking_id.partner_id', '=', partner_id), + ('location_id.usage', '=', 'supplier'), + ('state', '=', 'done')] + + + [('type','=','supplier')] + + + + rma.order.line.select rma.order.line diff --git a/rma/wizards/rma_make_picking_view.xml b/rma/wizards/rma_make_picking_view.xml index bf488bbb..6e1d094f 100644 --- a/rma/wizards/rma_make_picking_view.xml +++ b/rma/wizards/rma_make_picking_view.xml @@ -106,40 +106,28 @@
- -
- - - rma.order.line.supplier.form - rma.order.line - - -
diff --git a/rma/wizards/rma_order_line_make_supplier_rma_view.xml b/rma/wizards/rma_order_line_make_supplier_rma_view.xml index f862c775..99a83aa2 100644 --- a/rma/wizards/rma_order_line_make_supplier_rma_view.xml +++ b/rma/wizards/rma_order_line_make_supplier_rma_view.xml @@ -67,9 +67,8 @@
From 21ddd8e96c9ce099589187eb50760a39441d0d6d Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 26 Mar 2021 11:32:22 +0100 Subject: [PATCH 4/7] [IMP] rma_account: adapt to simplification on rma.line form view. --- rma_account/views/rma_order_line_view.xml | 41 ++--------------------- rma_account/wizards/rma_refund.xml | 24 ++++--------- 2 files changed, 9 insertions(+), 56 deletions(-) diff --git a/rma_account/views/rma_order_line_view.xml b/rma_account/views/rma_order_line_view.xml index 20bc2aef..a0235fa9 100644 --- a/rma_account/views/rma_order_line_view.xml +++ b/rma_account/views/rma_order_line_view.xml @@ -5,25 +5,6 @@ rma.order.line - - - - - - - - - - - - - - - - - - - -
@@ -89,6 +51,7 @@ domain="[('move_id.move_type', '!=', 'entry'), '|', ('move_id.partner_id', '=', partner_id), ('move_id.partner_id', 'child_of', partner_id)]" + attrs="{'invisible':[('type', '!=', 'customer')]}" /> diff --git a/rma_account/wizards/rma_refund.xml b/rma_account/wizards/rma_refund.xml index 64b76089..1168bf1c 100644 --- a/rma_account/wizards/rma_refund.xml +++ b/rma_account/wizards/rma_refund.xml @@ -57,29 +57,19 @@ - - - - - - - - - - - - - - - - - - rma.order.line.form rma.order.line @@ -96,25 +60,15 @@
-
- - - rma.order.line.supplier.form - rma.order.line - - -
From e7f03f422d2b21247d2caed118d66248579e087f Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 26 Mar 2021 12:16:59 +0100 Subject: [PATCH 6/7] [IMP] rma_purchase: adapt to simplification on rma.line form view. --- rma_purchase/views/rma_order_line_view.xml | 35 +++++++++++----------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/rma_purchase/views/rma_order_line_view.xml b/rma_purchase/views/rma_order_line_view.xml index 55a900ba..9ac0496b 100644 --- a/rma_purchase/views/rma_order_line_view.xml +++ b/rma_purchase/views/rma_order_line_view.xml @@ -8,29 +8,28 @@ form,tree
- - rma.order.line.supplier.form - rma.order.line - - -
-
-
-
- rma.order.line.supplier.form rma.order.line +
+