odoo/odoo#205123
Created by fw-bot
Merged
at 3d6ad045b53b03ffad988fa66470adb90c8d2a72
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:18.0-17.0-opw-4681202-default_RR_route-lase-427779-fw
- head
- 7e226da95c8d69621415f2dea2ec3383f816191b
- merged
- 7 months ago by Bugfix, Lancelot Semal (lase)
| odoo/odoo | |
|---|---|
| 17.0 | #204449 |
| saas-17.4 | #204850 |
| 18.0 | #205123 |
| saas-18.1 | #205144 |
| saas-18.2 | #205159 |
| saas-18.3 | |
| saas-18.4 | |
| 19.0 | |
| master | #205188 |
[FW][FIX] stock: check product compatibility for the default RR route
Issue:
Currently, the default route set on an automatically created RR might not be set on the product.
Steps to reproduce:
- In the settings: enable Multi-Steps Routes
- On your warehouse set Manufacture in 3 steps
- Create a storable product without any set route
- Create a need for that product, for instance by creating and confirming an SO for 1 unit.
- Inventory > Operations > Procurement > Replenishment
> A reordering rule was automatically created for your product but the manufacture route is set by default.
Cause of the issue:
Entering the replenishment tab will create orderpoints and set their default routes:
https://github.com/odoo/odoo/blob/884130330b600b4356c640cb679c2bb8fdb833a0/addons/stock/models/stock_orderpoint.py#L478-L481 However, the _set_default_route_id does not check that the route found to match a given orderpoint is actually selected on the product of the orderpoint:
https://github.com/odoo/odoo/blob/884130330b600b4356c640cb679c2bb8fdb833a0/addons/stock/models/stock_orderpoint.py#L323-L336
opw-4681202
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr