summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-10-10 10:42:39 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-10-10 10:42:39 +0700
commitfd3ce46f21aa78d9b9caa6ffdd1b9f61d89dfa65 (patch)
treede54d6c23f1f86c217836ba3a3aebed0bd80c32a /indoteknik_custom/models
parent137e812a5d96e1d5a82ceffbdf6a0938358e4d07 (diff)
select all and unselect all
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/partial_delivery.py26
1 files changed, 26 insertions, 0 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"""