Skip to content

Commit b9b099a

Browse files
committed
[FIX] stock_move_location: fill with stock
Always compute put-aways
1 parent f9c7665 commit b9b099a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

stock_move_location/models/stock_picking.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright Jacques-Etienne Baudoux 2016 Camptocamp
1+
# Copyright 2016 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
22
# Copyright Iryna Vyshnevska 2020 Camptocamp
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
44

@@ -19,6 +19,7 @@ def button_fillwithstock(self):
1919
"active_model": "stock.quant",
2020
"planned": True,
2121
}
22+
# FIXME: this action should not bypass the call to action_assign !!!
2223
move_wizard = (
2324
self.env["wiz.stock.move.location"]
2425
.with_context(**context)
@@ -28,6 +29,7 @@ def button_fillwithstock(self):
2829
"origin_location_id": self.location_id.id,
2930
"picking_type_id": self.picking_type_id.id,
3031
"picking_id": self.id,
32+
"apply_putaway_strategy": True,
3133
}
3234
)
3335
)

stock_move_location/readme/ROADMAP.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ ACSONE):
99
- Nice to have: add a magic button on locations that with context
1010
creates a new picking of that type with the origin location already
1111
filled in.
12+
13+
Note from Jacques-Etienne Baudoux (BCIM)
14+
- The fill with stock action on stock.picking should not create manually the
15+
move lines but instead call `action_assign()`. There are many modules hooking
16+
`action_assign` that are not called due to this.

0 commit comments

Comments
 (0)