Commit 4958d6b
committed
[FIX] util/orm.py: fix
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
closes #8
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>custom_module_field_as_manual transient access1 parent 522c48e commit 4958d6b
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
427 | 448 | | |
428 | 449 | | |
429 | 450 | | |
| |||
596 | 617 | | |
597 | 618 | | |
598 | 619 | | |
| 620 | + | |
| 621 | + | |
599 | 622 | | |
600 | 623 | | |
601 | 624 | | |
| |||
0 commit comments