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

sale_import_base : product_code_unique #84

Open
bealdav opened this issue Apr 4, 2024 · 2 comments
Open

sale_import_base : product_code_unique #84

bealdav opened this issue Apr 4, 2024 · 2 comments

Comments

@bealdav
Copy link
Member

bealdav commented Apr 4, 2024

What is the problem

sale_import_base depends on product_code_unique.

This is rude because if you have a multi-company instance with not shared products, it doesn't work.

How to by pass the issue

Switch to a constrains with unique default_code by company_id

cc @clementmbr @sebastienbeau @florian-dacosta @kevinkhao

@sebastienbeau
Copy link
Member

hum, good catch.
Maybe the best is to remove the dependency and simply raise an error when we found several products ?
Then it's your responsibility to found the right solution to reduce the human error by dding the right constraint.
@florian-dacosta what do you think ?

@florian-dacosta
Copy link
Member

I am ok to remove the dependency and raise if multiple products are found (there already is a raise if no product is found).
I guess we can have this product_code_unique listed in the README as recommended, for none multi company cases.

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

No branches or pull requests

3 participants