From fd3ce46f21aa78d9b9caa6ffdd1b9f61d89dfa65 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Fri, 10 Oct 2025 10:42:39 +0700 Subject: select all and unselect all --- indoteknik_custom/models/partial_delivery.py | 26 ++++++++++++++++ indoteknik_custom/views/sale_order.xml | 45 ++++++++++++++++------------ 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/indoteknik_custom/models/partial_delivery.py b/indoteknik_custom/models/partial_delivery.py index c9b188ea..1204089b 100644 --- a/indoteknik_custom/models/partial_delivery.py +++ b/indoteknik_custom/models/partial_delivery.py @@ -41,6 +41,32 @@ class PartialDeliveryWizard(models.TransientModel): # res['line_ids'] = lines # return res + def action_select_all(self): + for line in self.line_ids: + line.selected = True + # return action supaya wizard gak nutup + return { + 'type': 'ir.actions.act_window', + 'res_model': self._name, + 'view_mode': 'form', + 'res_id': self.id, + 'target': 'new', + } + + def action_unselect_all(self): + for line in self.line_ids: + line.selected = False + # juga reload biar tetap di wizard + return { + 'type': 'ir.actions.act_window', + 'res_model': self._name, + 'view_mode': 'form', + 'res_id': self.id, + 'target': 'new', + } + + + @api.onchange('picking_id') def _onchange_picking_id(self): """Generate lines whenever picking_id is changed""" diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 9620bf50..82daa36f 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -516,33 +516,40 @@ partial.delivery.wizard.form partial.delivery.wizard -
- - - - - - - - - - - - - - - - - + + + + + + + + + +
+
+ + + + + + + + + + +
+ Mark As Cancel -- cgit v1.2.3