Skip to content

[18.0][FIX] edi_core_oca: fix record rule#251

Open
SilvioC2C wants to merge 1 commit intoOCA:18.0from
camptocamp:18.0-fix-exc_record_rule
Open

[18.0][FIX] edi_core_oca: fix record rule#251
SilvioC2C wants to merge 1 commit intoOCA:18.0from
camptocamp:18.0-fix-exc_record_rule

Conversation

@SilvioC2C
Copy link
Copy Markdown
Contributor

Exchange Record's res_id is a Many2onReference field, which internally converts False-ish values to 0 before storing them to the cache and the DB.
The rule's domain old leaf ('res_id', '=', False) was instead converted to a SQL query clause WHERE "edi_exchange_record.res_id" IS NULL.
Since all edi_exchange_record rows contain a non-negative integer in the res_id column, the rule old domain leaf always failed to fetch any record.

Changing the leaf to ('res_id', '=', 0) fixes the issue, making such Exchange Records visible again for internal users.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @simahawk, @etobella,
some modules you are maintaining are being modified, check this out!

Copy link
Copy Markdown
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tnx for the fix!

Exchange Record's ``res_id`` is a ``Many2onReference`` field, which internally converts False-ish values to 0 before storing them to the cache and the DB.
The rule's domain old leaf ``('res_id', '=', False)`` was instead converted to a SQL query clause ``WHERE "edi_exchange_record.res_id" IS NULL``.
Since all ``edi_exchange_record`` rows contain a non-negative integer in the ``res_id`` column, the rule old domain leaf always failed to fetch any record.

Changing the leaf to ``('res_id', '=', 0)`` fixes the issue, making such Exchange Records visible again for internal users.
@SilvioC2C SilvioC2C force-pushed the 18.0-fix-exc_record_rule branch from 38b0b28 to 4e98519 Compare March 26, 2026 15:22
@SilvioC2C SilvioC2C requested a review from simahawk March 26, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants