Skip to content

[16.0] mrp_unbuild_subcontracting: CI test failure due to test isolation issue #1705

Description

@AdrianaSaiz

Module

mrp_unbuild_subcontracting

Describe the bug

The test TestSubcontractingTracking.test_purchase_and_return_with_serial_numbers fails in CI (GitHub Actions) but passes consistently when run locally. The failure occurs even on clean upstream code with no modifications, suggesting a test isolation issue.

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Create a new branch from origin/16.0 with non-logic changes (e.g. adding a comment in a file)
  2. Push to trigger CI pipeline
  3. Observe that mrp_unbuild_subcontracting tests fail

We hace this empty pull request for example showing the issue

Something wrong must be happening in the CI

#1704

Expected behavior
Tests should pass as we aren´t changing code.

Additional context
Error message from CI:

File "mrp_unbuild_subcontracting/tests/test_mrp_unbuild_subcontracting.py", line 349, in test_purchase_and_return_with_serial_numbers
    mo.subcontracting_record_component()
  File "/opt/odoo/addons/mrp_subcontracting/models/mrp_production.py", line 75, in subcontracting_record_component
    raise UserError(_("You must indicate a non-zero amount consumed for at least one of your components"))
odoo.exceptions.UserError: You must indicate a non-zero amount consumed for at least one of your components
  • Running the same tests locally does not reproduce the issue
  • We verified this by testing on a clean branch with no code changes - the failure still occurs
  • This may be related to test execution order in CI or database/cache state not being properly cleaned up between test classes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions