summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-10-27 08:53:02 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-10-27 08:53:02 +0700
commitdbb3e64d43a5e5752a31879bc7be88d54c67d11c (patch)
tree220ff70629367c8633747b195b4e96218472e479 /indoteknik_custom/models/sale_order.py
parenta54e68d0ccf84de5edb602744cf2de399c26ba49 (diff)
push fix bug partial delivery
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 5c8f34c6..e254ef41 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -399,21 +399,21 @@ class SaleOrder(models.Model):
)
def action_open_partial_delivery_wizard(self):
- raise UserError("Fitur ini sedang dalam pengembangan")
- # self.ensure_one()
- # pickings = self.picking_ids.filtered(lambda p: p.state not in ['done', 'cancel'] and p.name and 'BU/PICK/' in p.name)
- # return {
- # 'type': 'ir.actions.act_window',
- # 'name': 'Partial Delivery',
- # 'res_model': 'partial.delivery.wizard',
- # 'view_mode': 'form',
- # 'target': 'new',
- # 'context': {
- # 'default_sale_id': self.id,
- # # kasih langsung list of int biar ga ribet di wizard
- # 'default_picking_ids': pickings.ids,
- # }
- # }
+ # raise UserError("Fitur ini sedang dalam pengembangan")
+ self.ensure_one()
+ pickings = self.picking_ids.filtered(lambda p: p.state not in ['done', 'cancel'] and p.name and 'BU/PICK/' in p.name)
+ return {
+ 'type': 'ir.actions.act_window',
+ 'name': 'Partial Delivery',
+ 'res_model': 'partial.delivery.wizard',
+ 'view_mode': 'form',
+ 'target': 'new',
+ 'context': {
+ 'default_sale_id': self.id,
+ # kasih langsung list of int biar ga ribet di wizard
+ 'default_picking_ids': pickings.ids,
+ }
+ }
@api.depends('partner_id.is_cbd_locked')