-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
[18.0][MIG] stock_helper #2223
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_helper #2223
Conversation
The first method is: StockLocation.is_sublocation_of() This method is currently used in: * wms/stock_dynamic_routing * wms/shopfloor * wms/stock_move_source_relocate * stock-logistics-warehouse/stock_reserve_rule * ddmrp/ddmrp The goal will be to use this module as dependency instead of reimplementing the method in each. Other methods should follow in "stock_helper". Note: I opened odoo/odoo#53866 to propose a generic version of this method, expecting odoo's opinion, but got no answer.
Co-authored-by: Simone Orsi <[email protected]>
Currently translated at 100.0% (1 of 1 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_helper Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_helper/hr/
returns the next source location of a location by the given route and procure_method
Currently translated at 100.0% (1 of 1 strings) Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_helper Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_helper/it/
Since this change in v17 odoo/odoo@439ca89 _get_rule fallbacks to location's warehouse to check for routes. This makes that the receipt route is found by _get_source_location_from_route. However, this is the case only with `stock` module installed, because as soon as `mrp` or `purchase` is installed that first step of the receipt route get removed in favor of manufacture or purchase routes. See odoo/odoo@d25d320
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.
Thanks for the migration.
However such a module name should not continue to exist, it means nothing.
Can we rename to stock_location_is_sublocation
?
And move the route source location method to another module ?
You are missing commit 2fb24c5
) | ||
return res | ||
|
||
def _get_source_location_from_route(self, route, procure_method): |
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.
I find it strange to have that on stock.location
and not on stock.route
. We are asking the route to return a source location given an end location.
I would have moved that to a module like stock_route_location_source
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.
/ocabot migration stock_helper |
Yes i agree on that, there should be a dedicated addon per function. I should have done this when I outsourced the method. |
Standard Migration
@ForgeFlow