Skip to content

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

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
camptocamp:18.0-fix-exc_record_rule
Apr 16, 2026
Merged

[18.0][FIX] edi_core_oca: fix record rule#251
OCA-git-bot merged 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!

Comment thread edi_core_oca/__manifest__.py Outdated
Comment thread edi_core_oca/README.rst
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
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.

@JordiMForgeFlow could you pls have a look at this?

Copy link
Copy Markdown
Contributor

@JordiMForgeFlow JordiMForgeFlow left a comment

Choose a reason for hiding this comment

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

it was always a bit annoying when you had these cases, thanks for the fix!

@simahawk
Copy link
Copy Markdown
Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-251-by-simahawk-bump-patch, awaiting test results.

@simahawk
Copy link
Copy Markdown
Contributor

@SilvioC2C can you fwd port to 19?

@OCA-git-bot OCA-git-bot merged commit 829a3ed into OCA:18.0 Apr 16, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 8365818. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants