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

[fix] sale_by_packaging: update can_be_sold on change #3252

Closed

Conversation

henrybackman
Copy link

When changing the packaging type, the can_be_sold checkbox did not update on user form to match the selected type

Added onchange function to resolve this.

@henrybackman henrybackman force-pushed the 14-update-can-be-sold-on-change branch 2 times, most recently from 156af78 to 5ccc38c Compare July 26, 2024 14:03
Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

weird, indeed..

@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). 🤖

This shouldn't be required due to the compute method.
However, we experienced some cases where nested form inside the product
form fails to update the flag without this onchange.
@simahawk simahawk force-pushed the 14-update-can-be-sold-on-change branch from 5ccc38c to 5c73c98 Compare July 31, 2024 10:22
@simahawk simahawk changed the title [IMP] sale_by_packaging: update can_be_sold on change [fix] sale_by_packaging: update can_be_sold on change Jul 31, 2024
@henrybackman
Copy link
Author

After further investigation, this change is not anymore needed. There was a missing @api.depends() on a compute function override that was causing the values not to update on the form. Closing this PR.

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.

5 participants