Can be simplified a bit by using the newer features of `tools.file_open()` and `tools.file_path()`. Let's do it since the PR is touching these lines anyway for the change of resource paths. closes odoo/odoo#69614 Related: odoo/enterprise#17855 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>