odoo/enterprise#47475

Created by Security, Martin Trigaux (mat)
Merged at 215749b7f70a151277b518547863630f061f8b67

Statuses:

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