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][IMP] product_tier_validation : force default state on create and improve _state_to #1269

Closed

Conversation

Kev-Roche
Copy link
Contributor

@Kev-Roche Kev-Roche commented Feb 15, 2023

When creating a new product, we can directly set a normal / sellable state on it, without validation. This PR avoid that by forcing the "_state_from" on product creation.

First commit is the failing test, second test fix it.

Last commit purpose is to improve _state_to value for products :
The base module "base_tier_validation" proposes "confirmed" as "_state_to" value, which is not a product state. Furthermore, we can create other product.state. In order to use this module out of the box and to take account of all the states created by users, we propose here to change the _state_to accordingly.

@OCA-git-bot
Copy link
Contributor

Hi @dreispt,
some modules you are maintaining are being modified, check this out!

@Kev-Roche Kev-Roche changed the title [14.0][IMP] test force default state on create [14.0][IMP] product_tier_validation : force default state on create Feb 15, 2023
@Kev-Roche Kev-Roche force-pushed the 14.0-imp-force_default_state_on_create branch 4 times, most recently from 81a0f82 to 07319a6 Compare February 15, 2023 15:36
@Kev-Roche
Copy link
Contributor Author

Kev-Roche commented Feb 15, 2023

Second commit fix it but need to set product_status as rebel module.

@Kev-Roche Kev-Roche force-pushed the 14.0-imp-force_default_state_on_create branch 3 times, most recently from 82d67e1 to 4705e0d Compare February 20, 2023 12:54
@Kev-Roche Kev-Roche force-pushed the 14.0-imp-force_default_state_on_create branch from 4705e0d to f78f00d Compare February 24, 2023 13:28
@Kev-Roche Kev-Roche changed the title [14.0][IMP] product_tier_validation : force default state on create [14.0][IMP] product_tier_validation : force default state on create and improve _state_to Feb 24, 2023
@Kev-Roche Kev-Roche force-pushed the 14.0-imp-force_default_state_on_create branch 10 times, most recently from 264afbb to 1cc46bf Compare February 27, 2023 14:06
@sebastienbeau sebastienbeau force-pushed the 14.0-imp-force_default_state_on_create branch from 1cc46bf to d386a14 Compare April 3, 2023 11:43
@github-actions
Copy link

github-actions bot commented Aug 6, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 6, 2023
@github-actions github-actions bot closed this Sep 10, 2023
@sebastienbeau sebastienbeau removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 21, 2023
@sebastienbeau
Copy link
Member

@gurneyalex @rousseldenis can you reopen this PR? (I do not have the right to do it)

Thanks

Copy link
Member

@sebastienbeau sebastienbeau left a comment

Choose a reason for hiding this comment

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

LGTM (code review) and tested

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.

3 participants