Skip to content

Commit

Permalink
stock_release_channel: assign channel
Browse files Browse the repository at this point in the history
When the move is not generated by a SO, also assign the release channel
  • Loading branch information
jbaudoux authored and lmignon committed Jan 11, 2023
1 parent 63637da commit 415cd2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
1 change: 0 additions & 1 deletion stock_release_channel/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from . import sale_order_line
from . import stock_move
from . import stock_picking
from . import stock_release_channel
22 changes: 0 additions & 22 deletions stock_release_channel/models/sale_order_line.py

This file was deleted.

7 changes: 7 additions & 0 deletions stock_release_channel/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ def release_available_to_promise(self):
res = super().release_available_to_promise()
self.picking_id.assign_release_channel()
return res

def _action_confirm(self, merge=True, merge_into=False):
moves = super()._action_confirm(merge=merge, merge_into=merge_into)
pickings = moves.filtered("need_release").picking_id
if pickings:
pickings._delay_assign_release_channel()
return moves

0 comments on commit 415cd2c

Please sign in to comment.