Skip to content

[FIX] queue_job: validate JobSerialized base_type again - #985

Open
HoloborodkoBohdan wants to merge 1 commit into
OCA:19.0from
HoloborodkoBohdan:19.0-fix-queue_job-setup_attrs
Open

HoloborodkoBohdan wants to merge 1 commit into
OCA:19.0from
HoloborodkoBohdan:19.0-fix-queue_job-setup_attrs

Conversation

@HoloborodkoBohdan

Copy link
Copy Markdown

Odoo 19 renamed Field._setup_attrs to _setup_attrs__ (odoo/orm/fields.py), and the old name has no remaining reference in core. JobSerialized still overrode _setup_attrs, so the override was never called and an unsupported base_type was silently accepted instead of raising ValueError.

This renames the override and adds a test: base_type=dict sets up fine, base_type=int raises. The test fails on the current 19.0 branch.

All JobSerialized fields in the repository use dict, tuple or models.BaseModel, so re-enabling the check does not affect existing fields.

Odoo 19 renamed Field._setup_attrs to _setup_attrs__, so the override
was no longer called and an unsupported base_type was silently accepted.
@oca-cla-bot

oca-cla-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @guewen, @sbidoul,
some modules you are maintaining are being modified, check this out!

@Jordi-Buitrago Jordi-Buitrago left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

The fix looks correct and the regression test covers the issue.
Tested locally.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants