[18.0] [MIG] sale_order_line_chained_move#3590
Conversation
The `__find_origin_moves` function doesn't take into account loops in
the chains of origin moves. Fix this by adding a "visited" record set
which will make sure that any move that has already be expanded won't be
processed again.
This will allow updating the modules (`odoo-bin -u all`) even when there
is existing data which has cycles in their origin graph. The error for
that case looked like this:
INFO odoo odoo.modules.loading: Loading module sale_order_line_chained_move (185/225)
...
File ".../thirdparty/odoo/addons/sale_order_line_chained_move/hooks.py", line 10, in __find_origin_moves
all_moves |= __find_origin_moves(move.move_orig_ids)
[Previous line repeated 978 more times]
File ".../thirdparty/odoo/addons/sale_order_line_chained_move/hooks.py", line 9, in __find_origin_moves
if move.move_orig_ids:
...
RecursionError: maximum recursion depth exceeded
69cd275 to
673a994
Compare
|
Ping @rousseldenis |
|
/ocabot migration sale_order_line_chained_move |
FrancoMaxime
left a comment
There was a problem hiding this comment.
LGTM: code review
Great job!
|
@rousseldenis This could be merged so that we remove the test-requirements in OCA/purchase-workflow#2575 (comment) |
|
/ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
@rousseldenis your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-3590-by-rousseldenis-bump-nobump. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
|
@marielejeune I'm on test problem. |
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
@rousseldenis your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-3590-by-rousseldenis-bump-nobump. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
|
/ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at ff10356. Thanks a lot for contributing to OCA. ❤️ |
Migration from v15.
Delete demo data and properly define test data inside setUpClass