Skip to content

Commit

Permalink
Merge branch '14.0-dev' into 14.0-t4055-access-levels-variables-add-f…
Browse files Browse the repository at this point in the history
…eature

Signed-off-by: Dmitry Meita <[email protected]>
  • Loading branch information
tendil authored Jan 15, 2025
2 parents a70ce93 + 65a1c7a commit a943e9e
Show file tree
Hide file tree
Showing 54 changed files with 1,669 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.7.0-262-ga2c21e9
_commit: v1.7.0-266-gb1862bc
_src_path: https://github.com/cetmix/cetmix-addons-repo-template.git
additional_ruff_rules: []
ci: GitHub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ jobs:
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}

if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == '{{ org_slug }}' }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' }}

1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extend-select = [
"E501", # line too long (default 88)
"I", # isort
]
extend-safe-fixes = ["UP008"]
exclude = ["setup/*"]

[format]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[cetmix_tower_server](cetmix_tower_server/) | 14.0.0.4.2 | | Flexible Server Management directly from Odoo
[cetmix_tower_server](cetmix_tower_server/) | 14.0.0.4.4 | | Flexible Server Management directly from Odoo
[cetmix_tower_server_notify_backend](cetmix_tower_server_notify_backend/) | 14.0.1.0.0 | | Backend notifications for Cetmix Tower
[cetmix_tower_server_queue](cetmix_tower_server_queue/) | 14.0.1.0.3 | | OCA Queue implementation for Cetmix Tower Server
[cetmix_tower_yaml](cetmix_tower_yaml/) | 14.0.1.0.0 | | Cetmix Tower YAML export/import
Expand Down
2 changes: 1 addition & 1 deletion cetmix_tower_server/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Cetmix Tower Server Management
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:46e220fd464cf2a9911e7720baa63defb7aefd08bb9c32e684b63cc00b9ddd0e
!! source digest: sha256:b7a9d72e69a49390595260c339932330ab5ecfb46e56b3513c54f5dd94316a34
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
3 changes: 1 addition & 2 deletions cetmix_tower_server/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Cetmix Tower Server Management",
"summary": "Flexible Server Management directly from Odoo",
"version": "14.0.0.4.2",
"version": "14.0.0.4.4",
"category": "Productivity",
"website": "https://cetmix.com",
"author": "Cetmix",
Expand Down Expand Up @@ -42,7 +42,6 @@
"views/cx_tower_server_view.xml",
"views/cx_tower_os_view.xml",
"views/cx_tower_tag_view.xml",
"views/cx_tower_interpreter_view.xml",
"views/cx_tower_variable_view.xml",
"views/cx_tower_variable_value_view.xml",
"views/cx_tower_command_view.xml",
Expand Down
155 changes: 125 additions & 30 deletions cetmix_tower_server/demo/demo_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<record id="server_demo_1" model="cx.tower.server">
<field name="name">Demo Server #1</field>
<field name="color">1</field>
<field name="status">stopped</field>
<field name="ip_v4_address">localhost</field>
<field name="ssh_username">admin</field>
<field name="ssh_password">password</field>
Expand All @@ -59,6 +60,7 @@
<record id="server_demo_2" model="cx.tower.server">
<field name="color">2</field>
<field name="name">Demo Server #2</field>
<field name="status">running</field>
<field name="ip_v4_address">localhost</field>
<field name="ssh_username">admin</field>
<field name="ssh_password">password</field>
Expand Down Expand Up @@ -171,10 +173,15 @@
<field name="name">URL</field>
</record>
<record id="variable_demo_odoo_version" model="cx.tower.variable">
<field name="name">Odoo Version </field>
<field name="name">Odoo Version</field>
<field name="reference">odoo__version</field>
<field name="variable_type">o</field>
</record>
<record id="variable_demo_language" model="cx.tower.variable">
<field name="name">Language</field>
<field name="reference">language</field>
<field name="variable_type">o</field>
</record>
<record id="variable_demo_version" model="cx.tower.variable">
<field name="name">Version</field>
</record>
Expand All @@ -185,11 +192,92 @@
<record id="variable_demo_branch" model="cx.tower.variable">
<field name="name">Branch</field>
</record>
<!-- Variables Options for Odoo Version -->
<record id="option_odoo_version_14" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">14.0</field>
<field name="value_char">14.0</field>
<field name="sequence">10</field>
</record>
<record id="option_odoo_version_15" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">15.0</field>
<field name="value_char">15.0</field>
<field name="sequence">20</field>
</record>
<record id="option_odoo_version_16" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">16.0</field>
<field name="value_char">16.0</field>
<field name="sequence">30</field>
</record>
<record id="option_odoo_version_17" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">17.0</field>
<field name="value_char">17.0</field>
<field name="sequence">40</field>
</record>
<record id="option_odoo_version_18" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">18.0</field>
<field name="value_char">18.0</field>
<field name="sequence">50</field>
</record>
<!-- Variables Options for Language -->
<record id="option_language_en_us" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_language" />
<field name="name">English (US)</field>
<field name="value_char">en_us</field>
<field name="sequence">10</field>
</record>
<record id="option_language_it" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_language" />
<field name="name">Italian</field>
<field name="value_char">it</field>
<field name="sequence">20</field>
</record>
<record id="option_language_es_mx" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_language" />
<field name="name">Spanish (Mexican)</field>
<field name="value_char">es_mx</field>
<field name="sequence">30</field>
</record>
<record id="option_language_de" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_language" />
<field name="name">German</field>
<field name="value_char">de</field>
<field name="sequence">40</field>
</record>
<record id="option_language_de_ch" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_language" />
<field name="name">German (Switzerland)</field>
<field name="value_char">de_ch</field>
<field name="sequence">50</field>
</record>

<!-- Variable values -->
<record id="server_1_value_path" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_path" />
<field name="server_id" ref="server_demo_1" />
<field
name="value_char"
>/home/{{ tower.server.username }}/tower/{{ branch }}</field>
</record>
<record id="server_1_value_language" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_language" />
<field name="server_id" ref="server_demo_1" />
<field name="option_id" ref="option_language_es_mx" />
</record>
<record id="server_1_value_odoo_version" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="server_id" ref="server_demo_1" />
<field name="option_id" ref="option_odoo_version_16" />
</record>

<record id="server_2_value_path" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_path" />
<field name="server_id" ref="server_demo_2" />
<field name="value_char">/opt/cetmix-tower</field>
<field name="value_char">/opt/{{ tower.server.reference }}/cetmix-tower</field>
</record>
<record id="server_2_value_url" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_url" />
Expand All @@ -201,6 +289,17 @@
<field name="server_id" ref="server_demo_2" />
<field name="value_char">staging</field>
</record>
<record id="server_2_value_odoo_version" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="server_id" ref="server_demo_2" />
<field name="option_id" ref="option_odoo_version_17" />
</record>
<record id="server_2_value_language" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_language" />
<field name="server_id" ref="server_demo_2" />
<field name="option_id" ref="option_language_de" />
</record>

<record id="global_value_branch" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_branch" />
<field name="value_char">prod</field>
Expand Down Expand Up @@ -350,14 +449,19 @@ else:
<field name="plan_line_action_id" ref="plan_demo_1_line_1_action_1" />
<field name="value_char">production</field>
</record>
<record id="action_1_value_language" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_language" />
<field name="plan_line_action_id" ref="plan_demo_1_line_1_action_1" />
<field name="option_id" ref="option_language_en_us" />
</record>
<!-- Line -->
<record id="plan_demo_1_line_2" model="cx.tower.plan.line">
<field name="sequence">20</field>
<field name="plan_id" ref="plan_demo_1" />
<field name="command_id" ref="command_list_dir" />
<field
name="condition"
>{{ branch }} == 'prod' and {{ odoo_version }} == "17.0"</field>
>{{ tower.server.status }} == 'running' and {{ odoo_version }} == "17.0"</field>
</record>
<!-- Actions -->
<record id="plan_demo_1_line_2_action_1" model="cx.tower.plan.line.action">
Expand Down Expand Up @@ -467,13 +571,29 @@ else:
<record id="demo_server_template_1_value_path" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_path" />
<field name="server_template_id" ref="demo_server_template_1" />
<field name="value_char">/opt/cetmix-tower</field>
<field
name="value_char"
>/opt/{{ tower.server.reference }}/cetmix-tower/{{ branch }}</field>
</record>
<record id="demo_server_template_1_value_url" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_url" />
<field name="server_template_id" ref="demo_server_template_1" />
<field name="value_char">https://cetmix.com</field>
</record>
<record id="demo_server_template_1_value_language" model="cx.tower.variable.value">
<field name="variable_id" ref="variable_demo_language" />
<field name="server_template_id" ref="demo_server_template_1" />
<field name="option_id" ref="option_language_it" />
</record>
<record
id="demo_server_template_1_value_odoo_version"
model="cx.tower.variable.value"
>
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="server_template_id" ref="demo_server_template_1" />
<field name="option_id" ref="option_odoo_version_17" />
</record>

<!-- Server Log of type "command" -->
<record id="server_log_command_1" model="cx.tower.server.log">
<field name="name">Command Log for Server #1</field>
Expand Down Expand Up @@ -569,30 +689,5 @@ else:
<field name="plan_line_action_id" ref="plan_demo_1_line_2_action_1" />
<field name="value_char">final_value</field>
</record>
<!-- Variables Options -->
<record id="option_odoo_version_14" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">14.0</field>
<field name="sequence">10</field>
</record>
<record id="option_odoo_version_15" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">15.0</field>
<field name="sequence">20</field>
</record>
<record id="option_odoo_version_16" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">16.0</field>
<field name="sequence">30</field>
</record>
<record id="option_odoo_version_17" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">17.0</field>
<field name="sequence">40</field>
</record>
<record id="option_odoo_version_18" model="cx.tower.variable.option">
<field name="variable_id" ref="variable_demo_odoo_version" />
<field name="name">18.0</field>
<field name="sequence">50</field>
</record>

</odoo>
Loading

0 comments on commit a943e9e

Please sign in to comment.