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

product_category_code_unique: Select different restrictions #1750

Open
manuelregidor opened this issue Oct 24, 2024 · 4 comments
Open

product_category_code_unique: Select different restrictions #1750

manuelregidor opened this issue Oct 24, 2024 · 4 comments

Comments

@manuelregidor
Copy link
Contributor

In the current version of the module product_category_code_unique (https://github.com/OCA/product-attribute/tree/14.0/product_category_code_unique), the only restrictions available is checking that the code is unique within the whole system. However, some people might have other needs in terms of restrictions of codes. That is why I suggest improving the module in order to be able to select between different types of restrictions:

  • Restriction 1: Code field must be unique. If this restriction is selected, it will not be possible to have a duplicated code in the system (this is the currently available restriction).
  • Restriction 2: Code field cannot be duplicated in parent nodes or son nodes.
  • Restriction 3: Code field must be unique for product categories with the same parent category.

Only one of theseoptions could be selected and right after selecting a new option it will be checked whether the restriction can be applied or not.

If I add this feature to the module, do you think it will be interesting enough?

Thank you

@manuelregidor
Copy link
Contributor Author

@HaraldPanten @rousseldenis @legalsylvain Could you have a look at my proposal, please? Thank you.

@HaraldPanten
Copy link

@manuelregidor I think it's interesting, yes.

I have a couple of questions:

1- The restrictions would be optional, right?
2- In which version are you planning to make these changes?

@manuelregidor
Copy link
Contributor Author

@HaraldPanten
1.- Yes, the module could be used with no restrictions at all.
2.- I woul make it for v16, but it could be easily migrated.

@HaraldPanten
Copy link

@manuelregidor OK! go then 👍

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

No branches or pull requests

2 participants