Sunday, April 12, 2026
1 change · 19.0
Resolved issues and error corrections
A manufacturing test was corrected so it uses the right way to find related production orders in this Odoo version. This prevents a false test failure and helps keep manufacturing workflows stable during validation.
Original PR description
### Issue Running `TestMrpOrderPostInstall.test_basic_flow_with_minimal_access_rigths` on 19.0 fails with: ``` AttributeError: 'mrp.production' object has no attribute 'backorder_ids' File…
### Issue
Running `TestMrpOrderPostInstall.test_basic_flow_with_minimal_access_rigths` on 19.0 fails with:
```
AttributeError: 'mrp.production' object has no attribute 'backorder_ids'
File "addons/mrp/tests/test_order.py", line 5508, in test_basic_flow_with_minimal_access_rigths
self.assertRecordValues(mo.backorder_ids.sorted('state'), [
```
### Cause
The test was introduced on 19.0 via commit e8ce2d842dd95ee1626f346ee0025abb55beb94e (backport of b5c7d5fed2d893bcd5ea2c2c5ed1cb9d8dfa2424). On 19.0 the `mrp.production` model does not have a `backorder_ids` field — the backorder relation is reached through the `mrp.production.group`, via `production_group_id.production_ids`. The assertion was therefore broken from the moment the test was added.
### Fix
Use `mo.production_group_id.production_ids` in the assertion so that the original MO and its backorder are both checked, which is the intent of the test.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr