From 16dc380c533980f33ccdeb20efcdf073e91b1b53 Mon Sep 17 00:00:00 2001 From: git_admin Date: Mon, 27 Apr 2026 08:32:59 +0000 Subject: [PATCH] Tower: upload cetmix_tower_yaml 16.0.3.1.0 (via marketplace) --- .../models/cx_tower_jet_template.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 addons/cetmix_tower_yaml/models/cx_tower_jet_template.py diff --git a/addons/cetmix_tower_yaml/models/cx_tower_jet_template.py b/addons/cetmix_tower_yaml/models/cx_tower_jet_template.py new file mode 100644 index 0000000..3dca470 --- /dev/null +++ b/addons/cetmix_tower_yaml/models/cx_tower_jet_template.py @@ -0,0 +1,42 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models + + +class CxTowerJetTemplate(models.Model): + _name = "cx.tower.jet.template" + _inherit = [ + "cx.tower.jet.template", + "cx.tower.yaml.mixin", + ] + + def _get_fields_for_yaml(self): + res = super()._get_fields_for_yaml() + res += [ + "name", + "note", + "tag_ids", + "limit_per_server", + "show_in_create_wizard", + "plan_install_id", + "plan_uninstall_id", + "plan_clone_same_server_id", + "plan_clone_different_server_id", + "variable_value_ids", + "action_ids", + "template_requires_ids", + "waypoint_template_ids", + "server_log_ids", + "scheduled_task_ids", + ] + return res + + def _get_deferred_x2m_import_fields(self): + """Return x2m child records resolved after the main import pass.""" + return { + "template_requires_ids": { + "child_model": "cx.tower.jet.template.dependency", + "deferred_field": "template_required_id", + "target_model": "cx.tower.jet.template", + } + }