From 5321dc6e30c384d55ca80020237e288f72d98ffd Mon Sep 17 00:00:00 2001 From: Christopher Ormaza Date: Fri, 28 Jan 2022 11:23:47 -0500 Subject: [PATCH] [IMP] rma, rma_sale: added select all, messages for UX --- rma_sale/wizards/rma_add_sale.py | 16 +++++++++++++ rma_sale/wizards/rma_add_sale.xml | 37 ++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/rma_sale/wizards/rma_add_sale.py b/rma_sale/wizards/rma_add_sale.py index c2b7fc14..c2a4ecc3 100644 --- a/rma_sale/wizards/rma_add_sale.py +++ b/rma_sale/wizards/rma_add_sale.py @@ -68,6 +68,22 @@ class RmaAddSale(models.TransientModel): comodel_name="stock.production.lot", string="Lots/Serials selected" ) + def select_all(self): + self.ensure_one() + self.write( + { + "lot_ids": [(6, 0, self.lot_domain_ids.ids)], + } + ) + return { + "type": "ir.actions.act_window", + "name": _("Add Sale Order"), + "view_mode": "form", + "res_model": self._name, + "res_id": self.id, + "target": "new", + } + def _prepare_rma_line_from_sale_order_line(self, line, lot=None): operation = line.product_id.rma_customer_operation_id if not operation: diff --git a/rma_sale/wizards/rma_add_sale.xml b/rma_sale/wizards/rma_add_sale.xml index 474a765b..75fbe70c 100644 --- a/rma_sale/wizards/rma_add_sale.xml +++ b/rma_sale/wizards/rma_add_sale.xml @@ -44,18 +44,33 @@ -