Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] stock_picking_restrict_cancel_printed: allow moves merge #1834

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

jbaudoux
Copy link
Contributor

Support validation of picking with quantity in excess. Odoo creates an extra move that gets merged and then canceled. No need to allow this cancellation.

@santostelmo @rousseldenis @mt-software-de

@jbaudoux jbaudoux changed the title [16.0] stock_picking_restrict_cancel_printed: allow moves merge [16.0][FIX] stock_picking_restrict_cancel_printed: allow moves merge Jan 17, 2025
@jbaudoux jbaudoux force-pushed the 16-stock_picking_restrict_cancel_printed-fix_move_merge branch from 05e6dc8 to a1ff3c2 Compare January 17, 2025 11:59
Copy link
Contributor

@mt-software-de mt-software-de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the test needs to be changed?

This will trigger the creation of an extra move.
That extra gets merged and then canceled.
"""
self.picking.printed = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be restrict_cancel_if_printed set to true.
Otherwise it will always call super._action_cancel?

Suggested change
self.picking.printed = True
self.picking_type.restrict_cancel_if_printed = True
self.picking.printed = True

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a default=True, so should be the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants