-
-
Notifications
You must be signed in to change notification settings - Fork 674
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_picking_type_force_move_type (was stock_picking_type_shipping policy
)
#1888
Open
sebalix
wants to merge
31
commits into
OCA:18.0
Choose a base branch
from
camptocamp:18-mig-stock_picking_type_shipping_policy
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[18.0][MIG] stock_picking_type_force_move_type (was stock_picking_type_shipping policy
)
#1888
sebalix
wants to merge
31
commits into
OCA:18.0
from
camptocamp:18-mig-stock_picking_type_shipping_policy
+890
−0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... stock_picking_group_by_partner_by_carrier (of OCA/stock-logistics-workflow). In stock_picking_group_by_partner_by_carrier, the override of the method _search_picking_for_assignation adds a domain on: ("move_type", "=", self.group_id.move_type) (self is the move to assign in a picking). When the move_type of the procurement group is "direct", the transfer is normally created with the move_type "direct": when a first move is assigned to a picking and none is found, it creates one with type "direct", the second move should find the same and be assigned to it. This is not what happens, with stock_picking_type_shipping_policy configured to "force_all_product_ready", as it changes the way the first stock.picking is created: def _get_new_picking_values(self): res = super()._get_new_picking_values() picking_type = self.mapped("picking_type_id") if picking_type.shipping_policy == "force_as_soon_as_possible": res["move_type"] = "direct" elif picking_type.shipping_policy == "force_all_products_ready": res["move_type"] = "one" return res The first stock.picking is created with a move_type of "one", so when the second move search a stock.picking, it can't find it as it looks for a "direct" one. This glue module changes the domain of the grouping to take into account the picking type's shipping policy when both modules are installed.
Currently translated at 100.0% (4 of 4 strings) Translation: wms-13.0/wms-13.0-stock_picking_type_shipping_policy Translate-URL: https://translation.odoo-community.org/projects/wms-13-0/wms-13-0-stock_picking_type_shipping_policy/es_MX/
Currently translated at 100.0% (4 of 4 strings) Translation: wms-13.0/wms-13.0-stock_picking_type_shipping_policy Translate-URL: https://translation.odoo-community.org/projects/wms-13-0/wms-13-0-stock_picking_type_shipping_policy/es_AR/
Currently translated at 100.0% (4 of 4 strings) Translation: wms-16.0/wms-16.0-stock_picking_type_shipping_policy Translate-URL: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-stock_picking_type_shipping_policy/it/
Currently translated at 100.0% (4 of 4 strings) Translation: wms-17.0/wms-17.0-stock_picking_type_shipping_policy Translate-URL: https://translation.odoo-community.org/projects/wms-17-0/wms-17-0-stock_picking_type_shipping_policy/it/
95555c3
to
484686f
Compare
484686f
to
3d7824d
Compare
jbaudoux
approved these changes
Feb 28, 2025
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.
Can you regenerate auto-generated files ?
c1ee188
to
ca21d4f
Compare
Was stock_picking_type_shipping_policy in Odoo 17.0 (hosted in OCA/wms).
ca21d4f
to
ca30519
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup of OCA/wms#988 , move module in OCA/stock-logistics-workflow.
Notes:
shipping_policy
field is replaced byforce_move_type
boolean fieldmove_type
based on the value of previousshipping_policy
+ setforce_move_type
to Truestock.move
and switched to an override of<stock.picking>._compute_move_type