Skip to content

Conversation

@erl-odoo
Copy link
Contributor

@erl-odoo erl-odoo commented Nov 17, 2023

From Odoo version 14.0 transient models require access rights instead of
implicit access (see related odoo/odoo#43306). This can lead to access
errors in custom_module_field_as_manual, particularly in the upgrade
TestCrawler, leading to blocked upgrades.

To reproduce:

  • have a v13 db with a custom menu which opens a custom model's view,
    having a relational field (e.g. one2many) to a custom transient model,
    and have existing records
  • run the upgrade test prepare
  • upgrade to v14
  • run the upgrade test check, the TestCrawler will fail with an
    AccessError

To fix that, create temporary access rights for custom transient models
while using the context manager.

upg-1157201

@erl-odoo erl-odoo requested a review from aj-fuentes November 17, 2023 13:13
@robodoo
Copy link
Contributor

robodoo commented Nov 17, 2023

@erl-odoo
Copy link
Contributor Author

@aj-fuentes
Related to specific PR https://github.com/odoo/upgrade-specific/pull/9944, example access error in comments there

@aj-fuentes aj-fuentes requested a review from KangOl November 17, 2023 13:56
@KangOl
Copy link
Contributor

KangOl commented Nov 17, 2023

upgradeci retry with always only base

@erl-odoo erl-odoo force-pushed the master-custom-transient-models-access-erl branch from 177b790 to 6591347 Compare November 17, 2023 15:23
@erl-odoo erl-odoo force-pushed the master-custom-transient-models-access-erl branch from 6591347 to 95140d5 Compare November 20, 2023 08:59
From Odoo version 14.0 transient models require access rights instead of
implicit access (see related odoo/odoo#43306). This can lead to access
errors in `custom_module_field_as_manual`, particularly in the upgrade
TestCrawler, leading to blocked upgrades.

To reproduce:
- have a v13 db with a custom menu which opens a custom model's view,
having a relational field (e.g. one2many) to a custom transient model,
and have existing records
- run the upgrade test prepare
- upgrade to v14
- run the upgrade test check, the TestCrawler will fail with an
AccessError

To fix that, create temporary access rights for custom transient models
while using the context manager.

upg-1157201
@erl-odoo erl-odoo force-pushed the master-custom-transient-models-access-erl branch from 95140d5 to 9dd61af Compare November 20, 2023 09:01
Copy link
Contributor

@aj-fuentes aj-fuentes left a comment

Choose a reason for hiding this comment

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

LGTM @KangOl ?

@KangOl
Copy link
Contributor

KangOl commented Nov 20, 2023

@robodoo r+

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.

4 participants