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

[14.0][ADD] shopfloor_checkout_putinpack_restriction #783

Merged

Conversation

TDu
Copy link
Member

@TDu TDu commented Nov 17, 2023

Related PR:
OCA/stock-logistics-workflow#1431
Has been merged.

@OCA-git-bot
Copy link
Contributor

Hi @sebalix, @simahawk, @guewen,
some modules you are maintaining are being modified, check this out!

@TDu TDu force-pushed the 14-sf-checkout-putinpack-restriction branch 3 times, most recently from c6e1bdc to e423764 Compare November 17, 2023 15:48
@TDu
Copy link
Member Author

TDu commented Nov 17, 2023

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"),
Copy link
Contributor

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

Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

LG, not tested

@TDu TDu force-pushed the 14-sf-checkout-putinpack-restriction branch from f785d48 to 4ec61c5 Compare December 4, 2023 10:25
@TDu
Copy link
Member Author

TDu commented Dec 4, 2023

Rebased, squashed.

Comment on lines +13 to +16
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
Copy link
Contributor

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.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@jbaudoux
Copy link
Contributor

jbaudoux commented Dec 8, 2023

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-783-by-jbaudoux-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d29c2af into OCA:14.0 Dec 8, 2023
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9208a73. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

4 participants