Tuesday, July 8, 2025
1 change · saas-17.4
Resolved issues and error corrections
This fix prevents manufacturing orders from being created with duplicate names when reordering rules trigger multi-step manufacturing flows. It helps avoid scheduler failures and keeps production planning running reliably.
Original PR description
__Issue:__ Condition used for MOs triggered under the `pbm_sam` manufacturing flow only checks the start of the group name, not the whole name, which could fail in case triggered by reordering rules where the origin might be a compound string such as: "OP/00001,WH/MO/00001" __Steps to reproduce:__ 1.) Install sales; inventory; manufacturing 2.) Enable multi-step routes 3.) Unarchive MTO 4.) Set warehouse manufacture steps to: Pick components, manufacture, then store products (3 steps) (manufacture_steps == 'pbm_sam') 5.) Create product A-bom (enable manufacture and mto routes) 6.) Create product B (enable manufacture) 7.) Add Product A as bom for product B 8.) Add a reordering rule (manufacture) for product B 9.) run SA Procurement: run scheduler Error: duplicate key value violates unique constraint opw-4866263 bug found: [#c50cb9d][1] [1] : https://github.com/odoo/odoo/commit/c50cb9d552f352bde4e3b8d92e8509476f194830