-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from coopdevs/feat-odoo-server-wide-modules
Handle odoo server wide modules
- Loading branch information
Showing
5 changed files
with
84 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
- name: Generate server wide modules configuration (db_filter_from_header) | ||
set_fact: | ||
odoo_role_odoo_server_wide_modules: "{{ odoo_role_odoo_server_wide_modules + ['dbfilter_from_header'] }}" | ||
when: odoo_role_enable_dbfilter_from_header | bool | ||
tags: ['server-wide'] | ||
|
||
- name: Check requirements for db_filter (odoo_role_channels) | ||
ansible.builtin.fail: | ||
msg: "Role Error: odoo_role_channels var is needed when queue_job is activated" # not required. The customized message that is printed. If omitted, prints a generic message. | ||
when: odoo_role_enable_dbfilter_from_header | bool and odoo_role_channels is not defined | ||
tags: ['server-wide'] | ||
|
||
- name: Generate server wide modules configuration (queue_job) | ||
ansible.builtin.set_fact: | ||
odoo_role_odoo_server_wide_modules: "{{ odoo_role_odoo_server_wide_modules + ['queue_job'] }}" | ||
when: odoo_role_enable_queue_job | bool | ||
tags: ['server-wide'] | ||
|
||
- name: Check if server_wide modules are declared | ||
ansible.builtin.fail: | ||
msg: "Role Error: {{ item }} module is configured as a server wide module but it is not present in modules dict" | ||
with_items: "{{ odoo_role_odoo_server_wide_modules }}" | ||
when: (item not in all_modules) | ||
tags: ['server-wide'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters