Skip to content

[18.0][FIX] project_task_default_stage: Do not set user_id on default stages#1718

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
Tecnativa:18.0-fix-project_task_default_stage
Apr 30, 2026
Merged

[18.0][FIX] project_task_default_stage: Do not set user_id on default stages#1718
OCA-git-bot merged 1 commit intoOCA:18.0from
Tecnativa:18.0-fix-project_task_default_stage

Conversation

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor

Odoo has a global record rule that filters records based on user_id. Since this field has a default value of self.env.uid, these records become owned by the Odoo bot. If you try to access a record using self.env.ref("project_task_default_stage.project_tt_specification"), an error occurs.

https://github.com/odoo/odoo/blob/8a2eae27f46247a218facd3b8e27a67161934c8b/addons/project/security/project_security.xml#L122-L126

FWP of #1446

@pedrobaeza could you please review this

Odoo has a global record rule that filters records based on user_id. Since this field has a default value of self.env.uid, these records become owned by the Odoo bot. If you try to access a record using self.env.ref("project_task_default_stage.project_tt_specification"), an error occurs.

https://github.com/odoo/odoo/blob/8a2eae27f46247a218facd3b8e27a67161934c8b/addons/project/security/project_security.xml#L122-L126
@OCA-git-bot OCA-git-bot added series:18.0 mod:project_task_default_stage Module project_task_default_stage labels Apr 30, 2026
@pedrobaeza pedrobaeza added this to the 18.0 milestone Apr 30, 2026
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Fast-tracking the fw-port.

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-1718-by-pedrobaeza-bump-nobump, awaiting test results.

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

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

@pedrobaeza pedrobaeza deleted the 18.0-fix-project_task_default_stage branch April 30, 2026 17:40
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