Skip to content

Conversation

@alexey-pelykh
Copy link

Depends on #2996

mourad-ehm and others added 30 commits March 6, 2024 14:35
Currently translated at 7.4% (4 of 54 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_restricted_qty/it/
Currently translated at 100.0% (54 of 54 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_restricted_qty/it/
Currently translated at 100.0% (54 of 54 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_restricted_qty/it/
Currently translated at 100.0% (54 of 54 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_restricted_qty/it/
Currently translated at 100.0% (54 of 54 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_restricted_qty/it/
Currently translated at 100.0% (54 of 54 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_restricted_qty
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_restricted_qty/it/
@alexey-pelykh
Copy link
Author

@rousseldenis @rafaelbn prior to diving too deep, there are two ways I can tackle this:

A. Migrate to v17 and then refractor the hell out if this module.
B. Refactor the hell out of it in v14 and then migrate.

Either way, I want to get some feedback on the UX refactor itself first :)

@alexey-pelykh alexey-pelykh force-pushed the 17.0-imp-sale_restricted_qty branch 9 times, most recently from aca29aa to 961917d Compare March 27, 2024 10:07
@alexey-pelykh alexey-pelykh force-pushed the 17.0-imp-sale_restricted_qty branch from 961917d to 281db23 Compare April 5, 2024 11:09
@rafaelbn rafaelbn added this to the 17.0 milestone Apr 23, 2024
@rafaelbn
Copy link
Member

Hello @alexey-pelykh ,

I've never used this module 😢

Maybe the opinion of original author from Akretion are more valuable

@Amourad-ehm @victoralmau @sbiosca-s73 @SirAionTech @rvalyi

Best regards! 😄 ❤️

@bosd
Copy link
Contributor

bosd commented Oct 21, 2025

Just unlocked 🔓 a feature:
Have a SO which does not adhere to a multiple of 50 (e.g. 101 pce)
Go your product. Set the multiple to 50 and enforce restrict multiple.

No you will get an error message, unable to save the product.

@alexey-pelykh
Copy link
Author

Yep, by design - you can have either a warning or an error

@bosd
Copy link
Contributor

bosd commented Oct 21, 2025

Video_2025-10-21_18-02-04.mp4

Yep, by design - you can have either a warning or an error

aah. so this is intended behaviour?
Or someting you want to change?

My use case, client has a messy system. (rescue project)
Want to enforce a multiple, while there already are SO's which do not have a proper multiple.

@alexey-pelykh
Copy link
Author

@Bost you have Restrict selected as "yes" - this means it won't allow to save if validation fails, regardless if there was mistake before or no.

@BostX
Copy link

BostX commented Oct 22, 2025

No, I don't. But @bosd has 😜

@alexey-pelykh
Copy link
Author

Ahah, sorry, was typing from the phone :)

@bosd
Copy link
Contributor

bosd commented Oct 22, 2025

Hmm.. Looks like I;m still not getting this ux. Or I'm confused.
Can you please help me.
So, with this module, it is not possible to enforce a multiple quantity if you have historical orders?

What is the use case for checking the historical so's, when making changes to the product form?

Setting a restrict to no:
image
still allows me to set this on a SO.
image
But I've filled in a multiple. What is the use of setting a multiple, without using it?
The earlier version of this module mentioned in the description end of product life or selling old stock. But then, one could just easily remove the value from this field.

@alexey-pelykh
Copy link
Author

So, with this module, it is not possible to enforce a multiple quantity if you have historical orders?

It is possible, but you won't be able to save-after-edit those historical orders that violate the rule. That's the "enforcement" part. Historical orders mean "no change"

@alexey-pelykh
Copy link
Author

Restrict = No means that you'll get only the yellow warning highlight of the bad line

@bosd
Copy link
Contributor

bosd commented Oct 22, 2025

So, with this module, it is not possible to enforce a multiple quantity if you have historical orders?

It is possible, but you won't be able to save-after-edit those historical orders that violate the rule. That's the "enforcement" part. Historical orders mean "no change"

aah. are we talking about the same item? Having an historical order, which violate the rule now block saving of the product template. The error message shown is not very clear about that. And as end user it is quite confusing.
I would vote, to always be able to edit save your product. regardless what happened in the past.

A strong use case of this module, would be as described, MOQ went wrong in the past. They install, this module to prevent it from happening in the future.

Restrict = No means that you'll get only the yellow warning highlight of the bad line

Aaha, clear... That would be a valuable addition to the docs..

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.