-
-
Notifications
You must be signed in to change notification settings - Fork 723
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] stock_reserve: Substract Forecasted Quantity from products according to configuration option #1859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing the tests, it seems the initial intention is that the quantities to be substracted from the forecasted quantity which I don't see before.
This is something reasonable for reservation in sales quotations, where you want to already have less quantity. There are 2 ways then:
- Add an option to substract or not, global by company or per reservation (this second one is more flexible, but more difficult to be implemented).
- Do this for our custom case apart from the standard OCA, as we will have only the case of not substracting.
I think we are going to the point 2 in this occasion.
…rding to configuration option TT43413
005b430
to
d2a8906
Compare
Changes done. |
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=14.0 | ||
:alt: Try me on Runboat | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/153/14.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have an outdated README generator. Please update your local maintainer-tools installation
"""Add location reservation for avoiding reservations to be substracted on | ||
the forecasted quantity. | ||
""" | ||
company = self.company_id or self.env.company |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not valid, as products by default don't have company, so this is always going to take the main company, which is not what is needed, specially on things coming from OdooBot. Argument company_id
is not filled? If any doubt about the company passed, please go back to what I asked to put this on custom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, taking into account what you indicate, we add this to custom (subtract always) and leave this PR to implement option 1 (more difficult to implement)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it won't be valid if the company is not perfectly guessed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With option 1 yes: Define for each reservation whether to subtract or not (auto-defining the value of a new field according to the company configuration), but the filter to be performed would be more complex than just by location.
Let's abort this, as it's not easily done. |
Substract Forecasted Quantity from products according to configuration option.
Example use case:
Please @pedrobaeza can you review it?
@Tecnativa TT43413