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

[9.0] sale/purchase: Create dummy product #1599

Open
pedrobaeza opened this issue Nov 2, 2018 · 4 comments
Open

[9.0] sale/purchase: Create dummy product #1599

pedrobaeza opened this issue Nov 2, 2018 · 4 comments
Milestone

Comments

@pedrobaeza
Copy link
Member

pedrobaeza commented Nov 2, 2018

@StefanRijnhart in the commit 85f767c, you add a method for setting a dummy product in all sale lines without product (method link: 85f767c#diff-daefd2062eec09f4b6a6f29c1233b276R38).

What is the reason behind this? Why they can remain empty?

This is very harmful for several reasons:

  • You don't explicitly set no company, so in a multi-company environment, this breaks sales orders in several companies that are not from the admin company. This can be fixed any way setting the extra value 'company_id': False.
  • If lines have different uom, you will get errors on some computed fields and reports.

cc @Tecnativa

@pedrobaeza pedrobaeza added this to the 9.0 milestone Nov 2, 2018
@pedrobaeza
Copy link
Member Author

@StefanRijnhart can you say anything about this?

@StefanRijnhart
Copy link
Member

The reason is that product_id is required on the sale order line in 9.0. Leaving it out causes all kinds of problems. But you are right, that a more advanced setup with multiple products and the correct company setting can be required in some cases.

@legalsylvain
Copy link
Contributor

@pedrobaeza : can we close this one ?

@pedrobaeza
Copy link
Member Author

Well, the underlying problem is still there, as we don't separate products by UoM, but nobody has solved it.

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