From 1cb170634804932e80bf4a76251e86cd5780c21b Mon Sep 17 00:00:00 2001 From: Yannik Lieblinger Date: Wed, 14 Jan 2026 12:46:37 +0100 Subject: [PATCH 1/9] [MIG] sync: Migration to 18.0 --- sync/__manifest__.py | 2 +- sync/lib/tools/safe_eval.py | 6 ++--- sync/models/sync_project_demo.py | 2 +- sync/views/ir_logging_views.xml | 22 +++++++-------- sync/views/sync_job_views.xml | 20 +++++++------- sync/views/sync_link_views.xml | 10 +++---- sync/views/sync_order_views.xml | 18 +++++-------- sync/views/sync_project_views.xml | 28 ++++++++++---------- sync/views/sync_task_views.xml | 20 +++++++------- sync/views/sync_trigger_automation_views.xml | 10 +++---- sync/views/sync_trigger_button_views.xml | 8 +++--- sync/views/sync_trigger_cron_views.xml | 10 +++---- sync/views/sync_trigger_webhook_views.xml | 8 +++--- 13 files changed, 79 insertions(+), 85 deletions(-) diff --git a/sync/__manifest__.py b/sync/__manifest__.py index 9d2a9410..f296b5cc 100644 --- a/sync/__manifest__.py +++ b/sync/__manifest__.py @@ -7,7 +7,7 @@ "name": "Sync ๐Ÿชฌ Studio", "summary": """Join the Amazing ๐Ÿ˜ Community โคต๏ธ""", "category": "VooDoo โœจ Magic", - "version": "17.0.14.0.0", + "version": "18.0.1.0.0", "application": True, "author": "Ivan Yelizariev", "support": "info@odoomagic.com", diff --git a/sync/lib/tools/safe_eval.py b/sync/lib/tools/safe_eval.py index 28f2f21a..213f5553 100644 --- a/sync/lib/tools/safe_eval.py +++ b/sync/lib/tools/safe_eval.py @@ -26,8 +26,6 @@ from psycopg2 import OperationalError import odoo -from odoo.tools.misc import ustr - unsafe_eval = eval __all__ = ["test_expr", "safe_eval", "const_eval"] @@ -522,7 +520,7 @@ def safe_eval__MAGIC( raise except Exception as e: raise ValueError( - '%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr) + '%s: "%s" while evaluating\n%r' % (ustr(type(e))(e), expr) ) @@ -545,7 +543,7 @@ def test_python_expr__MAGIC(expr, mode="eval"): error["error_line"], ) else: - msg = ustr(err) + msg = err return msg return False diff --git a/sync/models/sync_project_demo.py b/sync/models/sync_project_demo.py index 32c853ba..44a139d8 100644 --- a/sync/models/sync_project_demo.py +++ b/sync/models/sync_project_demo.py @@ -131,7 +131,7 @@ def _trello(secrets): if not getattr(secrets, key): raise Exception("{} is not set".format(key)) - # https://github.com/sarumont/py-trello/tree/master/trello + # https://github.com/sarumont/py-trello/list/master/trello from trello import TrelloClient from trello.exceptions import ResourceUnavailable diff --git a/sync/views/ir_logging_views.xml b/sync/views/ir_logging_views.xml index 182494a2..81419b6a 100644 --- a/sync/views/ir_logging_views.xml +++ b/sync/views/ir_logging_views.xml @@ -3,10 +3,10 @@ License MIT (https://opensource.org/licenses/MIT). --> - ir.logging.tree + ir.logging.list ir.logging - - + @@ -88,13 +88,13 @@ Logs ir.logging - tree,form + list,form [('sync_job_id', '!=', False)] @@ -108,37 +108,37 @@ Project Logs ir.logging - tree,form + list,form [('sync_project_id', '=', active_id)] Task Logs ir.logging - tree,form + list,form [('sync_task_id', '=', active_id)] Job Logs ir.logging - tree,form + list,form [('sync_job_id', '=', active_id)] diff --git a/sync/views/sync_job_views.xml b/sync/views/sync_job_views.xml index 53adddc5..1d451223 100644 --- a/sync/views/sync_job_views.xml +++ b/sync/views/sync_job_views.xml @@ -3,10 +3,10 @@ License MIT (https://opensource.org/licenses/MIT). --> - sync.job.tree + sync.job.list sync.job - - + @@ -97,7 +97,7 @@ readonly="1" editable="bottom" > - - +
@@ -116,7 +116,7 @@ - - + @@ -171,21 +171,21 @@ Project Jobs sync.job - tree,form + list,form [('project_id', '=', active_id)] Task Jobs sync.job - tree,form + list,form [('task_id', '=', active_id)] Jobs sync.job - tree,form + list,form - sync.link.tree + sync.link.list sync.link - + @@ -15,7 +15,7 @@ - + @@ -78,13 +78,13 @@ Links sync.link - tree,form + list,form Links sync.link - tree,form + list,form [('project_id', '=', active_id)] {'default_project_id': active_id, 'active_test': False} diff --git a/sync/views/sync_order_views.xml b/sync/views/sync_order_views.xml index 6f1eee22..cdd1b4d2 100644 --- a/sync/views/sync_order_views.xml +++ b/sync/views/sync_order_views.xml @@ -3,14 +3,14 @@ License MIT (https://opensource.org/licenses/MIT). --> - sync.order.tree + sync.order.list sync.order - + - + @@ -65,12 +65,12 @@ - + - + @@ -88,18 +88,14 @@ -
- - - -
+
Sync Orders sync.order - tree,form + list,form [('sync_project_id', '=', active_id)]
diff --git a/sync/views/sync_project_views.xml b/sync/views/sync_project_views.xml index 9022ff71..7165d5ae 100644 --- a/sync/views/sync_project_views.xml +++ b/sync/views/sync_project_views.xml @@ -6,17 +6,17 @@ Sync Projects sync.project - tree,form + list,form {"active_test": False} - sync.project.tree + sync.project.list sync.project - + - + @@ -165,7 +165,7 @@ - +