Skip to content

Auditlog: Patching Causes Failures in Other Unit Tests #3439

@AungKoKoLin1997

Description

@AungKoKoLin1997

Describe the Bug

When auditlog creates a rule during tests (e.g., for res.partner), it monkey-patches methods like res.partner.write and keeps a snapshot of the then-current implementation (usually the base method). If another addon (e.g., partner_contact_address_default) overrides write(), that override is skipped in tests and the call goes to the older base implementation. This causes other addons’ test cases to fail. In normal UI/server runs, everything works as expected; the problem appears only in test runs.

Impacted Versions

  • 16.0

Haven't checked in other versions

To Reproduce

Run tests together with auditlog and other addons (for example, partner_contact_address_default).

A similar issue is also occurring with the base_user_role module, as described in OCA/server-backend#321 (comment).

@qrtl QT5614

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions