Skip to content

Commit

Permalink
[IMP] pos_picking_delayed: allow do override delayed picking job sett…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
em230418 committed Jul 5, 2024
1 parent b8e027c commit 4a1a27d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pos_picking_delayed/models/pos_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ def create_from_ui(self, orders, draft=False):
orders, draft=draft
)

@api.model
def _delayed_picking_job_kwargs(self):
return {}

def _create_order_picking(self):
if self.env.context.get("create_from_ui", False):
orders = self.filtered(lambda x: not x.has_picking_delayed)
delayed_orders = self.filtered(lambda x: x.has_picking_delayed)
if delayed_orders:
delayed_orders.with_delay()._create_delayed_picking()
kw = self._delayed_picking_job_kwargs()
delayed_orders.with_delay(**kw)._create_delayed_picking()
else:
orders = self

Expand Down

0 comments on commit 4a1a27d

Please sign in to comment.