-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
[14.0][ADD] shopfloor_checkout_putinpack_restriction #783
[14.0][ADD] shopfloor_checkout_putinpack_restriction #783
Conversation
c6e1bdc
to
e423764
Compare
This is a replacement for #665 |
"selected_move_lines": self._data_for_move_lines(lines.sorted()), | ||
"picking": self.data.picking(picking), | ||
"packing_info": self._data_for_packing_info(picking), | ||
"no_package_enabled": not self.options.get("checkout__disable_no_package"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mark this option as deprecated (replaced by shopfloor_checkout_putinpack_restriction) and to drop in future versions?
cc @simahawk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, not tested
f785d48
to
4ec61c5
Compare
Rebased, squashed. |
if picking.put_in_pack_restriction == "no_package": | ||
res["package_allowed"] = False | ||
elif picking.put_in_pack_restriction == "with_package": | ||
res["no_package_enabled"] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make the rule clear here, without relying on the default value of shopfloor
.
if picking.put_in_pack_restriction == "no_package":
res["package_allowed"] = False
res["no_package_enabled"] = True
elif picking.put_in_pack_restriction == "with_package":
res["package_allowed"] = True
res["no_package_enabled"] = False
And when we'll remove the no_package_enabled
option we won't need to think too much.
This PR has the |
/ocabot merge minor |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 9208a73. Thanks a lot for contributing to OCA. ❤️ |
Related PR:
OCA/stock-logistics-workflow#1431
Has been merged.