Skip to content

[ADD] Add warning to move SUPERUSER_ID to odoo.api#158

Open
jue-adhoc wants to merge 1 commit intoOCA:masterfrom
adhoc-dev:19.0-t-57439-jue
Open

[ADD] Add warning to move SUPERUSER_ID to odoo.api#158
jue-adhoc wants to merge 1 commit intoOCA:masterfrom
adhoc-dev:19.0-t-57439-jue

Conversation

@jue-adhoc
Copy link

Copilot AI review requested due to automatic review settings September 29, 2025 14:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a migration warning to alert developers about the relocation of SUPERUSER_ID from the odoo namespace to odoo.api in Odoo 18.0 to 19.0 migration.

  • Adds a new YAML configuration file for text warnings during 18.0 to 19.0 migration
  • Implements warning message directing developers to use api.SUPERUSER_ID instead of odoo.SUPERUSER_ID

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Thanks, this is useful. However, a false positive is triggered if module code contains api.SUPERUSER_ID, which works in Odoo 18 and probably in earlier versions as well. Is that something you can fix, for instance by limiting only to import statements?

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