[10.0] Make server_environment_files optional - #1425
Conversation
ec092d5 to
ff3d867
Compare
|
|
||
| try: | ||
| from odoo.addons import server_environment_files | ||
| _dir = os.path.dirname(server_environment_files.__file__) |
There was a problem hiding this comment.
What about using
ck_path = odoo.modules.module.get_resource_path('server_environment_files', system_base_config['running_env'])?
Another question, if I'm not using this module but it is declared in the addons-path then will raise an error?
There was a problem hiding this comment.
@moylop260 Thank you for the review. The change is a backport of a commit from 11.0 (OCA/server-env@d9ad47f)
What about using
ck_path = odoo.modules.module.get_resource_path('server_environment_files', system_base_config['running_env'])?
system_base_config['running_env']will fail since the section is only required when you use server_environment_files.
Another question, if I'm not using this module but it is declared in the addons-path then will raise an error?
IMO Yes it will raise an error.
https://travis-ci.org/OCA/server-auth/jobs/454436281#L747
|
@OCA/server-environment-maintainers Someone to review this one? |
|
I don't think I can count @sbidoul double approval to merge right now 😉 Nevertheless I will fast track it as it is a backport. |
[t141292] avoid m2m multi-company issue
Backport of OCA/server-env@d9ad47f
On 9.0 the same kind of change has been implemented by f0b8682