[18.0] [MIG] stock_mts_mto_rule : migrate to 18.0#2425
Conversation
… procurement rules to handle the mts+mto scenario
Add explanation for finding this setting
Conforms to the latest README template: bugtracker, runbot etc. Fixes bugtracker URL on some modules. States OCA as maintainer, removes other contributors from the 'Maintainer' section.
…en warehouse is two/three steps delivery propagate move by mts-mto in pick/pack/out
OCA Transbot updated translations from Transifex
…least another procurement
There's a traceback when renaming warehouse code (without renaming warehouse name), as name argument is False.
OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex
This method is called from the write() method the one how support multiple records an api.multi method. I was making some test when I tried to activate the mto+mts option for multiple warehouse and the next error appears: ``ValueError: Expected singleton`` In order to fix this error I only added a loop to manage the multiple registers.
OCA Transbot updated translations from Transifex
Major changes to the way Warehouses update their routes/rules and self heal. Improved rule code to use `float_compare` and `float_is_zero`.
Currently translated at 11.8% (2 of 17 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_mts_mto_rule/fr_FR/
Currently translated at 100.0% (18 of 18 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_mts_mto_rule/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_mts_mto_rule/
Currently translated at 100.0% (13 of 13 strings) Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-stock_mts_mto_rule/it/
Currently translated at 100.0% (13 of 13 strings) Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-stock_mts_mto_rule/es/
Currently translated at 100.0% (13 of 13 strings) Translation: stock-logistics-warehouse-17.0/stock-logistics-warehouse-17.0-stock_mts_mto_rule Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-stock_mts_mto_rule/it/
|
/ocabot migration stock_mts_mto_rule |
| ] | ||
| ) | ||
| self.assertEqual(1, len(move_mts)) | ||
| # self.assertEqual(1, len(move_mts)) |
There was a problem hiding this comment.
Source reviewed and control reinstated
156798c to
9685e62
Compare
|
Something is broken somewhere, you changed the Odoo 14.0: graph LR
subgraph v14 [Odoo 14 Flow]
direction LR
V14_Vendor(Vendors)
V14_Stock(WH/Stock)
V14_Customer(Customers)
V14_Vendor -- "Move N+1<br/>(Supply)" --> V14_Stock
V14_Stock -- "Move N<br/>(Delivery)" --> V14_Customer
end
Odoo 18.0: graph LR
subgraph v18 [Odoo 18 Flow]
direction LR
V18_Vendor(Vendors)
V18_Stock(WH/Stock)
V18_Customer(Customers)
%% The main difference: Move N+1 points to Customer in location_dest_id
V18_Vendor -- "Move N+1<br/>(Supply)<br/>Dest: Customers" --> V18_Customer
%% The delivery move
V18_Stock -- "Move N<br/>(Delivery)" --> V18_Customer
%% Dotted line representing location_final_id
V18_Vendor -.-> |"Move N+1<br/>Final: WH/Stock"| V18_Stock
end
%% Highlight the changed path in red
linkStyle 0 stroke:#ffff00,stroke-width:3px,color:yellow;
linkStyle 2 stroke:#00AAff,stroke-width:2px,stroke-dasharray:
With Odoo 18.0, both moves have the same |
|
It looks like it is related to Odoo changes from odoo/odoo@11e6987 ([REF] stock: pull & push rules refactor) with introduction of the
|
| ) | ||
| == 0.0 | ||
| ): | ||
| getattr(self.env["stock.rule"], f"_run_{rule.mts_rule_id.action}")( |
There was a problem hiding this comment.
mts_rule_id -> mto_rule_id
| moves_to_assign._action_assign() | ||
|
|
||
| mto_procurement = procurement._replace(product_qty=needed_qty) | ||
| getattr(self.env["stock.rule"], f"_run_{rule.mts_rule_id.action}")( |
There was a problem hiding this comment.
mts_rule_id -> mto_rule_id
| rule_vals = { | ||
| "location_dest_id": self.env.ref("stock.stock_location_stock").id, | ||
| "location_src_id": self.env.ref("stock.stock_location_suppliers").id, | ||
| "action": "pull", | ||
| "warehouse_id": self.warehouse.id, | ||
| "picking_type_id": self.env.ref("stock.picking_type_out").id, | ||
| "name": "dummy rule", | ||
| "route_id": self.dummy_route.id, | ||
| } |
There was a problem hiding this comment.
Add:
"location_dest_from_rule": True,
Fix:
from supplier to stock => in
"picking_type_id": self.env.ref("stock.picking_type_in").id,
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
@BhaveshHeliconia, I made a new PR for this module: |

No description provided.