-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f42baed
commit db6f799
Showing
17 changed files
with
430 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,16 @@ | |
"name": "Sync 🪬 Studio", | ||
"summary": """Join the Amazing 😍 Community ⤵️""", | ||
"category": "VooDoo ✨ Magic", | ||
"version": "16.0.11.0.1", | ||
"version": "16.0.13.0.0", | ||
"application": True, | ||
"author": "Ivan Kropotkin", | ||
"support": "[email protected]", | ||
"website": "https://sync_studio.t.me/", | ||
"license": "Other OSI approved licence", # MIT | ||
"depends": ["base_automation", "mail", "queue_job"], | ||
# The `partner_telegram` dependency is not directly needed, | ||
# but it plays an important role in the **Sync 🪬 Studio** ecosystem | ||
# and is added for the quick onboarding of new **Cyber ✨ Pirates**. | ||
"depends": ["base_automation", "mail", "queue_job", "partner_telegram"], | ||
"external_dependencies": {"python": ["markdown", "pyyaml"], "bin": []}, | ||
"data": [ | ||
"security/sync_groups.xml", | ||
|
@@ -25,6 +28,7 @@ | |
"views/sync_trigger_automation_views.xml", | ||
"views/sync_trigger_webhook_views.xml", | ||
"views/sync_trigger_button_views.xml", | ||
"views/sync_order_views.xml", | ||
"views/sync_task_views.xml", | ||
"views/sync_link_views.xml", | ||
"views/sync_project_views.xml", | ||
|
@@ -37,12 +41,6 @@ | |
}, | ||
"demo": [ | ||
"data/sync_project_unittest_demo.xml", | ||
# Obsolete | ||
# "data/sync_project_context_demo.xml", | ||
# "data/sync_project_telegram_demo.xml", | ||
# "data/sync_project_odoo2odoo_demo.xml", | ||
# "data/sync_project_trello_github_demo.xml", | ||
# "data/sync_project_context_demo.xml", | ||
], | ||
"qweb": [], | ||
"post_load": None, | ||
|
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
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
# Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev> | ||
from odoo import api, fields, models | ||
|
||
|
||
class SyncOrder(models.Model): | ||
_name = "sync.order" | ||
_description = "Sync Order" | ||
_inherit = ["mail.thread", "mail.activity.mixin"] | ||
_order = "id desc" | ||
|
||
name = fields.Char("Title") | ||
body = fields.Text("Order") | ||
sync_project_id = fields.Many2one("sync.project", related="sync_task_id.project_id") | ||
sync_task_id = fields.Many2one( | ||
"sync.task", | ||
ondelete="cascade", | ||
required=True, | ||
) | ||
description = fields.Html(related="sync_task_id.sync_order_description") | ||
record_id = fields.Reference( | ||
string="Record", | ||
selection="_selection_record_id", | ||
help="Optional extra information to perform this task", | ||
) | ||
|
||
partner_ids = fields.Many2many("res.partner", string="Partners") | ||
state = fields.Selection( | ||
[ | ||
("draft", "Draft"), | ||
("open", "In Progress"), | ||
("done", "Done"), | ||
("cancel", "Canceled"), | ||
], | ||
default="draft", | ||
) | ||
|
||
@api.model | ||
def _selection_record_id(self): | ||
mm = self.sync_task_id.sync_order_model_id | ||
if not mm: | ||
return [] | ||
return [(mm.model, mm.name)] | ||
|
||
def action_done(self): | ||
self.write({"state": "done"}) | ||
|
||
def action_confirm(self): | ||
self.write({"state": "open"}) | ||
|
||
def action_cancel(self): | ||
self.write({"state": "cancel"}) | ||
|
||
def action_refresh(self): | ||
# Magic | ||
pass |
Oops, something went wrong.