From dfd91f9ba44debcf9d5016f6398545bd11230c46 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/wizards/rma_add_stock_move.py | 16 +++++++++++ rma/wizards/rma_add_stock_move_view.xml | 37 +++++++++++++++++-------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/rma/wizards/rma_add_stock_move.py b/rma/wizards/rma_add_stock_move.py index a9425373..ce932a7b 100644 --- a/rma/wizards/rma_add_stock_move.py +++ b/rma/wizards/rma_add_stock_move.py @@ -58,6 +58,22 @@ class RmaAddStockMove(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 from Stock Move"), + "view_mode": "form", + "res_model": self._name, + "res_id": self.id, + "target": "new", + } + def _prepare_rma_line_from_stock_move(self, sm, lot=False): if self.env.context.get("customer"): operation = ( diff --git a/rma/wizards/rma_add_stock_move_view.xml b/rma/wizards/rma_add_stock_move_view.xml index cd35c0d3..9c4e02a9 100644 --- a/rma/wizards/rma_add_stock_move_view.xml +++ b/rma/wizards/rma_add_stock_move_view.xml @@ -34,18 +34,33 @@ -