Skip to content

Commit

Permalink
Fix bug on move copy, reset package level
Browse files Browse the repository at this point in the history
On stock.move, the `package_level_id` field did not have a `copy=False`
attribute when version 13.0 of Odoo was released. So when we create
a new move, the package level of the move being copied was linked
as well to the new move.

It has been fixed recently in odoo in
odoo/odoo@ecf726a
but to be on the safe side if the code is not up-to-date,
it's anyway better to force a False value.
  • Loading branch information
guewen committed Jun 3, 2020
1 parent 54081be commit 6f0aa91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stock_dynamic_routing/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,4 +436,8 @@ def _prepare_routing_move_values(self, picking_type, source, destination):
"location_dest_id": destination.id,
"state": "waiting",
"picking_type_id": picking_type.id,
# copy=False was missing on this field up to
# https://github.com/odoo/odoo/commit/ecf726ae8221e6871c1e391294c633d8b6bcaa9a
# to be on the safe side, force it to False
"package_level_id": False
}

0 comments on commit 6f0aa91

Please sign in to comment.