Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing from upstream itpp-labs/sync-addons (16.0) #288

Merged
merged 17 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/DINAR-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
# limitations under the License.
name: "DINAR: update repo's readme"

on:
push:
paths:
- ".DINAR/build-date.txt"
- ".DINAR/config.yaml"
- ".github/workflows/DINAR-readme.yml"
- "*/__manifest__.py"
# disabled
on: false

#on:
# push:
# paths:
# - ".DINAR/build-date.txt"
# - ".DINAR/config.yaml"
# - ".github/workflows/DINAR-readme.yml"
# - "*/__manifest__.py"
jobs:
repo_readme:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude: |
# Maybe reactivate this when all README files include prettier ignore tags?
^README\.md$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
/lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts
Expand Down
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
[![[email protected]](https://itpp.dev/images/infinity-readme.png)](mailto:[email protected])
# [16.0] Odoo Integration Modules
<h1 align="center">¡Welcome!</h1>

:open_file_folder: Get a **.zip** file with all needed dependencies:
<p align="center"> <b>Sync 🪬 Studio</b> is a groundbreaking meta-application<br/>that empowers you to build <b>Odoo ✨ Connectors</b> in just a few hours. </p>

:heavy_check_mark: [base_api](https://apps.odoo.com/apps/modules/16.0/base_api/)
<br/>:heavy_check_mark: [base_automation_webhook](https://apps.odoo.com/apps/modules/16.0/base_automation_webhook/)
<br/>:heavy_check_mark: [multi_livechat](https://apps.odoo.com/apps/modules/16.0/multi_livechat/)
<br/>:heavy_check_mark: [openapi](https://apps.odoo.com/apps/modules/16.0/openapi/)
<br/>:heavy_check_mark: [sync](https://apps.odoo.com/apps/modules/16.0/sync/)
<div align="center">
<a target="_blank" href="https://odoomagic.com/"><img src="https://github.com/itpp-labs/sync-addons/assets/186131/b7ae8ced-44f4-498d-b111-2fc4e3d1171b" alt="Sync 🪬 Studio"/></a>
</div>
<p align="center"><em>Click the image for a quick introduction.</em></p>

:star: Star this repo if you **like** it!
# Is It Magic?

Other Addons
============

| Repository | Versions |
|------------|----------|
| [itpp-labs/**pos-addons**](https://github.com/itpp-labs/pos-addons) | [[17.0]](https://github.com/itpp-labs/pos-addons/tree/17.0#readme) [[16.0]](https://github.com/itpp-labs/pos-addons/tree/16.0#readme) [[15.0]](https://github.com/itpp-labs/pos-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/pos-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/pos-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/pos-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/pos-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/pos-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/pos-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/pos-addons/tree/8.0#readme) [[7.0]](https://github.com/itpp-labs/pos-addons/tree/7.0#readme) |
| [itpp-labs/**sync-addons**](https://github.com/itpp-labs/sync-addons) | [[17.0]](https://github.com/itpp-labs/sync-addons/tree/17.0#readme) [[16.0]](https://github.com/itpp-labs/sync-addons/tree/16.0#readme) [[15.0]](https://github.com/itpp-labs/sync-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/sync-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/sync-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/sync-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/sync-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/sync-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/sync-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/sync-addons/tree/8.0#readme) |
| [itpp-labs/**access-addons**](https://github.com/itpp-labs/access-addons) | [[17.0]](https://github.com/itpp-labs/access-addons/tree/17.0#readme) [[16.0]](https://github.com/itpp-labs/access-addons/tree/16.0#readme) [[15.0]](https://github.com/itpp-labs/access-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/access-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/access-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/access-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/access-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/access-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/access-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/access-addons/tree/8.0#readme) |
Not quite. **Sync 🪬 Studio** harnesses the power of AI to generate safe, reusable code, making connector development as simple as copy-pasting. Let your imagination and **Sync 🪬 Studio** work together to create seamless integrations effortlessly.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# generated from manifests external_dependencies
bravado_core
jsonschema<4
markdown
pyyaml
swagger_spec_validator
9 changes: 2 additions & 7 deletions sync/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@ Few more steps requires to use https connection (e.g. telegram api works with ht
Questions?
==========

To get an assistance on this module contact us by email :arrow_right: [email protected]
To get an assistance on this module contact us by email :arrow_right: [email protected]

Further information
===================

Odoo Apps Store: https://apps.odoo.com/apps/modules/14.0/sync/


Notifications on updates: `via Atom <https://github.com/itpp-labs/sync-addons/commits/15.0/sync.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/itpp-labs/sync-addons/commits/15.0/sync.atom>`_

Tested on `Odoo 15.0 <https://github.com/odoo/odoo/commit/77e62b56ce57edf621e4c7ed42d6b53a98fc044f>`_
Tested on `Odoo 16.0 <https://github.com/odoo/odoo/commit/6565502494aa1c00104beb59698e359b8769553f>`__
1 change: 0 additions & 1 deletion sync/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# License MIT (https://opensource.org/licenses/MIT).

from . import models
from . import wizard
from . import controllers
from . import lib
from . import tools
34 changes: 19 additions & 15 deletions sync/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Copyright 2020-2021 Ivan Yelizariev <https://twitter.com/yelizariev>
# Copyright 2020-2021,2024 Ivan Yelizariev <https://twitter.com/yelizariev>
# Copyright 2020-2021 Denis Mudarisov <https://github.com/trojikman>
# Copyright 2021 Ilya Ilchenko <https://github.com/mentalko>
# License MIT (https://opensource.org/licenses/MIT).

{
"name": """Sync Studio""",
"summary": """Synchronize something with anything: SystemX↔Odoo, Odoo1↔Odoo2, SystemX↔SystemY. ETL/ESB tool similar to OCA/connector, but more flexible""",
"category": "Extra Tools",
"images": ["images/sync-studio.jpg"],
"version": "16.0.6.2.0",
"name": "Sync 🪬 Studio",
"summary": """Join the Amazing 😍 Community ⤵️""",
"category": "VooDoo ✨ Magic",
"version": "16.0.7.0.0",
"application": True,
"author": "IT Projects Labs, Ivan Yelizariev",
"support": "[email protected]",
"author": "Ivan Kropotkin",
"support": "[email protected]",
"website": "https://sync_studio.t.me/",
"license": "Other OSI approved licence", # MIT
"depends": ["base_automation", "mail", "queue_job"],
"external_dependencies": {"python": [], "bin": []},
"external_dependencies": {"python": ["markdown", "pyyaml"], "bin": []},
"data": [
"security/sync_groups.xml",
"security/ir.model.access.csv",
Expand All @@ -29,16 +28,21 @@
"views/sync_task_views.xml",
"views/sync_project_views.xml",
"views/sync_link_views.xml",
"wizard/sync_make_module_views.xml",
"data/queue_job_function_data.xml",
],
"assets": {
"web.assets_backend": [
"sync/static/src/scss/src.scss",
],
},
"demo": [
"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_unittest_demo.xml",
"data/sync_project_context_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,
Expand Down
4 changes: 2 additions & 2 deletions sync/data/sync_project_unittest_demo.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2020 Ivan Yelizariev <https://twitter.com/yelizariev>
<!-- Copyright 2020,2024 Ivan Yelizariev <https://twitter.com/yelizariev>
Copyright 2021 Denis Mudarisov <https://github.com/trojikman>
Copyright 2021 Ilya Ilchenko <https://github.com/mentalko>
License MIT (https://opensource.org/licenses/MIT). -->
Expand All @@ -20,7 +20,7 @@
<![CDATA[
def handle_db(records):
for r in records:
r.set_link(params.PARTNER_RELATION, r.id)
r.set_link(PARAMS.PARTNER_RELATION, r.id)
]]>
</field>
</record>
Expand Down
90 changes: 90 additions & 0 deletions sync/doc/MAGIC.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
This document describes `MAGIC.*` tools available on Project Code evaluation (core code, library code, task code)


Base
====

* ``MAGIC.env``: Odoo Environment
* ``MAGIC.log(message, level=MAGIC.LOG_INFO)``: logging function to record debug information

log levels:

* ``MAGIC.LOG_DEBUG``
* ``MAGIC.LOG_INFO``
* ``MAGIC.LOG_WARNING``
* ``MAGIC.LOG_ERROR``

* ``MAGIC.log_transmission(recipient_str, data_str)``: report on data transfer to external recipients

Links
=====

* ``MAGIC.get_link(...)``
* ``MAGIC.set_link(...)``

These methods are documented separetely in `<links.rst>`__.

Sync Helpers
============

* ``MAGIC.sync_odoo2x(...)``
* ``MAGIC.sync_x2odoo(...)``
* ``MAGIC.sync_external(...)``

These methods are documented separetely in `<sync.rst>`__.

Event
=====

* ``MAGIC.trigger_name``: available in tasks' code only
* ``MAGIC.user``: user related to the event, e.g. who clicked a button

Asynchronous work
=================

* ``MAGIC.add_job(func_name, **options)(*func_args, **func_kwargs)``: call a function asynchronously; options are similar to ``with_delay`` method of ``queue_job`` module:

* ``priority``: Priority of the job, 0 being the higher priority. Default is 10.
* ``eta``: Estimated Time of Arrival of the job. It will not be executed before this date/time.
* ``max_retries``: maximum number of retries before giving up and set the job
state to 'failed'. A value of 0 means infinite retries. Default is 5.
* ``description`` human description of the job. If None, description is
computed from the function doc or name
* ``identity_key`` key uniquely identifying the job, if specified and a job
with the same key has not yet been run, the new job will not be added.


Attachments
===========

* ``attachment._public_url()``: generates access url. Can be used to pass attachments to an external system as url, instead of direct uploading the content.

Libs
====

* ``MAGIC.json``
* ``MAGIC.time``
* ``MAGIC.datetime``
* ``MAGIC.dateutil``
* ``MAGIC.timezone``
* ``MAGIC.b64encode``
* ``MAGIC.b64decode``

Tools
=====

* ``MAGIC.url2base64``
* ``MAGIC.url2bin``
* ``MAGIC.get_lang(env, lang_code=False)``: returns `res.lang` record
* ``MAGIC.html2plaintext``
* ``MAGIC.type2str``: get type of the given object
* ``MAGIC.DEFAULT_SERVER_DATETIME_FORMAT``
* ``MAGIC.AttrDict``: Extended dictionary that allows for attribute-style access

Exceptions
==========

* ``MAGIC.UserError``
* ``MAGIC.ValidationError``
* ``MAGIC.RetryableJobError``: raise to restart job from beginning; e.g. in case of temporary errors like broken connection
* ``MAGIC.OSError``
5 changes: 5 additions & 0 deletions sync/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
`7.0.0`
-------

- **New:** Dramatic improvement on Sync Studio API

`6.2.0`
-------

Expand Down
Loading
Loading