-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by dreispt
- Loading branch information
Showing
21 changed files
with
923 additions
and
2 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ __pycache__/ | |
*.py[cod] | ||
/.venv | ||
/.pytest_cache | ||
/.ruff_cache | ||
|
||
# C extensions | ||
*.so | ||
|
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 @@ | ||
..\\..\\..\\..\\web_widget_mermaid |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
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,113 @@ | ||
======================== | ||
Mermaid flowchart widget | ||
======================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:136879c1f5cb11ecd5f2466b0b12748e10fa17e1a95bd0bc9296316444760a86 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github | ||
:target: https://github.com/OCA/web/tree/15.0/web_widget_mermaid | ||
:alt: OCA/web | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_mermaid | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=15.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds a basic widget for rendering text fields as flowcharts using | ||
`mermaid <https://mermaidjs.github.io>`_. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Put a ``widget="mermaid"`` attribute in relevant field tags in the view | ||
declaration:: | ||
|
||
<field name="flowchart" widget="mermaid"/> | ||
|
||
Optionally, use an ``options`` attribute to pass a JSON object with | ||
`mermaid configuration <https://mermaidjs.github.io/#/mermaidAPI?id=configuration>`_:: | ||
|
||
<field name="flowchart" | ||
widget="mermaid" | ||
options='{"theme": "forest", "gantt": {"fontSize": 14}}'/> | ||
|
||
The syntax for creating diagrams is described in | ||
`mermaid's documentation <https://mermaidjs.github.io/#/flowchart>`_. | ||
|
||
As an example, this text:: | ||
|
||
graph LR | ||
10.0 --> 11.0 | ||
11.0 --> 12.0 | ||
12.0 -.-> 13.0 | ||
|
||
Produces this flowchart: | ||
|
||
.. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_mermaid/static/description/flowchart_example.png | ||
:alt: Flowchart | ||
|
||
Demonstration | ||
============= | ||
|
||
In demo mode, the addon adds a flowchart field to users so you can try it. This shows up in Runbot instances. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_mermaid%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Therp BV | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Jan Verbeek <[email protected]> | ||
* RoboHeart <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/15.0/web_widget_mermaid>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) |
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,22 @@ | ||
# Copyright 2019 Therp BV <https://therp.nl> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) | ||
|
||
{ | ||
"name": "Mermaid flowchart widget", | ||
"category": "Web", | ||
"author": "Therp BV,Odoo Community Association (OCA)", | ||
"version": "15.0.1.0.0", | ||
"license": "AGPL-3", | ||
"summary": "Render mermaid markdown flowcharts", | ||
"website": "https://github.com/OCA/web", | ||
"depends": ["web"], | ||
"demo": [ | ||
"demo/res_users_flowchart.xml", | ||
], | ||
"assets": { | ||
"web.assets_common": [ | ||
"https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js", | ||
"web_widget_mermaid/static/src/js/web_widget_mermaid.js", | ||
], | ||
}, | ||
} |
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="res_users_flowchart" model="ir.model.fields"> | ||
<field name="name">x_flowchart</field> | ||
<field name="model_id" ref="base.model_res_users" /> | ||
<field name="field_description">Demo mermaid flowchart</field> | ||
<field name="ttype">char</field> | ||
</record> | ||
<record id="view_users_form_flowchart" model="ir.ui.view"> | ||
<field name="inherit_id" ref="base.view_users_form" /> | ||
<field name="model">res.users</field> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//notebook" position="inside"> | ||
<page name="mermaid_page" string="Mermaid flowchart"> | ||
<field name="x_flowchart" widget="mermaid" /> | ||
</page> | ||
</xpath> | ||
</field> | ||
</record> | ||
<record id="base.user_demo" model="res.users"> | ||
<field name="x_flowchart">graph TD | ||
A[This is an example flowchart] --> B{{Edit it}} | ||
B -. save it .-> C(See what happens)</field> | ||
</record> | ||
</odoo> |
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,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_widget_mermaid | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-02-17 13:45+0000\n" | ||
"Last-Translator: claudiagn <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: ca\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: web_widget_mermaid | ||
#: model:ir.model.fields,field_description:web_widget_mermaid.res_users_flowchart | ||
msgid "Demo mermaid flowchart" | ||
msgstr "Diagrama de flux de sirena de demostració" | ||
|
||
#. module: web_widget_mermaid | ||
#: model_terms:ir.ui.view,arch_db:web_widget_mermaid.view_users_form_flowchart | ||
msgid "Mermaid flowchart" | ||
msgstr "Diagrama de flux de sirena" |
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,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_widget_mermaid | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2020-09-16 14:00+0000\n" | ||
"Last-Translator: claudiagn <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 3.10\n" | ||
|
||
#. module: web_widget_mermaid | ||
#: model:ir.model.fields,field_description:web_widget_mermaid.res_users_flowchart | ||
msgid "Demo mermaid flowchart" | ||
msgstr "Diagrama de flujo de sirena de demostración" | ||
|
||
#. module: web_widget_mermaid | ||
#: model_terms:ir.ui.view,arch_db:web_widget_mermaid.view_users_form_flowchart | ||
msgid "Mermaid flowchart" | ||
msgstr "Diagrama de flujo de sirena" |
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,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_widget_mermaid | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-02-01 12:44+0000\n" | ||
"Last-Translator: Yann Papouin <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: fr\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n > 1;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: web_widget_mermaid | ||
#: model:ir.model.fields,field_description:web_widget_mermaid.res_users_flowchart | ||
msgid "Demo mermaid flowchart" | ||
msgstr "Organigramme de démonstration Mermaid" | ||
|
||
#. module: web_widget_mermaid | ||
#: model_terms:ir.ui.view,arch_db:web_widget_mermaid.view_users_form_flowchart | ||
msgid "Mermaid flowchart" | ||
msgstr "Organigramme Mermaid" |
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,27 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_widget_mermaid | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-03-15 06:45+0000\n" | ||
"Last-Translator: Marcel Savegnago <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: pt_BR\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n > 1;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: web_widget_mermaid | ||
#: model:ir.model.fields,field_description:web_widget_mermaid.res_users_flowchart | ||
msgid "Demo mermaid flowchart" | ||
msgstr "Fluxograma de demonstração do mermaid" | ||
|
||
#. module: web_widget_mermaid | ||
#: model_terms:ir.ui.view,arch_db:web_widget_mermaid.view_users_form_flowchart | ||
msgid "Mermaid flowchart" | ||
msgstr "Fluxograma Mermaid" |
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,25 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_widget_mermaid | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: web_widget_mermaid | ||
#: model:ir.model.fields,field_description:web_widget_mermaid.res_users_flowchart | ||
msgid "Demo mermaid flowchart" | ||
msgstr "" | ||
|
||
#. module: web_widget_mermaid | ||
#: model_terms:ir.ui.view,arch_db:web_widget_mermaid.view_users_form_flowchart | ||
msgid "Mermaid flowchart" | ||
msgstr "" | ||
|
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,2 @@ | ||
* Jan Verbeek <[email protected]> | ||
* RoboHeart <[email protected]> |
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,2 @@ | ||
This module adds a basic widget for rendering text fields as flowcharts using | ||
`mermaid <https://mermaidjs.github.io>`_. |
Oops, something went wrong.