odoo/enterprise#47475
Created by Security, Martin Trigaux (mat)
Merged
at 215749b7f70a151277b518547863630f061f8b67
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Overridden by @mart-e
- ci/l10n: (runtime 2513s)
Linked pull requests
- label
- odoo-dev:master-deprecate-module-paths-mat
- head
- 23b7768dcc331686fa443f39c28272063aba7a19
- merged
- 2 years ago by Security, Martin Trigaux (mat)
odoo/odoo | odoo/enterprise | odoo/upgrade | |
---|---|---|---|
master | #135607 | #47475 | #5187 |
[IMP] *: use file_path and file_open
Enterprise part of odoo/odoo#135607
Replace all the calls to get_resource_path
to the better file_path
or directly use file_open
when possilbe.
file_open
is already checking that the file exists and is within the addons-path. Code like:
path = get_resource_path('base', 'static/img', 'avatar.png')
file_open(path)
was checking twice that the file exists and made redundant checks