mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[MIG] server_action_navigate: Migration to 16.0
This commit is contained in:
@@ -7,7 +7,7 @@ Server Actions - Navigate
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:2c2b8623b55720c69820ab8a7a26d3bc90897eb1f587f26f9e1a778f33f99448
|
||||
!! source digest: sha256:4a9e5951abe237615f48ea2a448610988368c99dca4aa6dc30e7150503ff6378
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
@@ -17,13 +17,13 @@ Server Actions - Navigate
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/server-backend/tree/14.0/server_action_navigate
|
||||
:target: https://github.com/OCA/server-backend/tree/16.0/server_action_navigate
|
||||
:alt: OCA/server-backend
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/server-backend-14-0/server-backend-14-0-server_action_navigate
|
||||
:target: https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-server_action_navigate
|
||||
: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/server-backend&target_branch=14.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -46,7 +46,7 @@ Configuration
|
||||
|
||||
* Create a new item
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/ir_actions_server_form.png
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/ir_actions_server_form.png
|
||||
|
||||
* Set a name that will be used for the Contextual Action
|
||||
|
||||
@@ -77,12 +77,11 @@ Usage
|
||||
|
||||
* click on 'Action' Button
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/sale_order_tree.png
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_users_tree.png
|
||||
|
||||
* then click on the name of the configured Action and see the results
|
||||
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/product_product_tree.png
|
||||
.. figure:: https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_partner_category_tree.png
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
@@ -90,7 +89,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/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/server-backend/issues/new?body=module:%20server_action_navigate%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20server_action_navigate%0Aversion:%2016.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.
|
||||
|
||||
@@ -132,6 +131,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-legalsylvain| |maintainer-ashishhirpara|
|
||||
|
||||
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/14.0/server_action_navigate>`_ project on GitHub.
|
||||
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/16.0/server_action_navigate>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
"name": "Server Actions - Navigate",
|
||||
"version": "14.0.1.0.2",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "GRAP, Odoo Community Association (OCA)",
|
||||
"summary": "Navigate between any items of any Odoo Models",
|
||||
"category": "Tools",
|
||||
|
||||
@@ -6,18 +6,16 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
-->
|
||||
<odoo>
|
||||
<record id="navigate_partner_2_tags" model="ir.actions.server">
|
||||
<field name="name">See tags of Partners</field>
|
||||
<field name="name">See Tags of Partners of Users</field>
|
||||
<field name="state">navigate</field>
|
||||
<field name="model_id" ref="base.model_res_users" />
|
||||
</record>
|
||||
<record id="navigate_line_1" model="ir.actions.server.navigate.line">
|
||||
<field name="action_id" ref="navigate_partner_2_tags" />
|
||||
<field name="sequence">1</field>
|
||||
<field name="field_id" ref="base.field_res_users__partner_id" />
|
||||
</record>
|
||||
<record id="navigate_line_2" model="ir.actions.server.navigate.line">
|
||||
<field name="action_id" ref="navigate_partner_2_tags" />
|
||||
<field name="sequence">2</field>
|
||||
<field name="field_id" ref="base.field_res_partner__category_id" />
|
||||
</record>
|
||||
<function model="ir.actions.server" name="create_action">
|
||||
|
||||
@@ -4,23 +4,21 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-02-25 14:25+0000\n"
|
||||
"PO-Revision-Date: 2023-07-17 14:09+0000\n"
|
||||
"Last-Translator: Yann Papouin <ypa@decgroupe.com>\n"
|
||||
"POT-Creation-Date: 2023-12-23 18:42+0000\n"
|
||||
"PO-Revision-Date: 2023-12-23 18:42+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \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.17\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__action_id
|
||||
msgid "Action"
|
||||
msgstr "Action"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__state
|
||||
@@ -44,8 +42,8 @@ msgstr "Créé le"
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server__navigate_action_id
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_cron__navigate_action_id
|
||||
msgid ""
|
||||
"Define here the action used when the navigation will be executed if empty, a "
|
||||
"generic action will be used."
|
||||
"Define here the action used when the navigation will be executed if empty, a"
|
||||
" generic action will be used."
|
||||
msgstr ""
|
||||
"Définir ici l'action qui sera utilisé lors que la navigation sera exécutée. "
|
||||
"Si le champs est vide, une action générique sera utilisée."
|
||||
@@ -56,7 +54,6 @@ msgid "Delete Last Line"
|
||||
msgstr "Supprimer la dernière ligne"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__display_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
@@ -67,18 +64,16 @@ msgid "Field"
|
||||
msgstr "Champ"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server_navigate_line__field_model
|
||||
msgid "For relationship fields, the technical name of the target model"
|
||||
msgstr "Pour les champs de relation, le nom technique du modèle cible"
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__field_domain_model_id
|
||||
msgid "Field Model"
|
||||
msgstr "Modèle du champ"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server____last_update
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
@@ -93,25 +88,6 @@ msgstr "Dernière mise à jour par"
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière mise à jour le"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__max_navigate_line_model
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__max_navigate_line_model
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__max_navigate_line_model
|
||||
msgid "Max Navigate Model in lines"
|
||||
msgstr "Modèle maximum des lignes"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__max_navigate_line_sequence
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__max_navigate_line_sequence
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__max_navigate_line_sequence
|
||||
msgid "Max Navigate sequence in lines"
|
||||
msgstr "Sequence maximum des lignes"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__field_model
|
||||
msgid "Model"
|
||||
msgstr "Modèle"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields.selection,name:server_action_navigate.selection__ir_actions_server__state__navigate
|
||||
msgid "Navigate"
|
||||
@@ -124,6 +100,13 @@ msgstr "Naviguer"
|
||||
msgid "Navigate Lines"
|
||||
msgstr "Lignes de navigation"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_model_technical_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_model_technical_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__navigate_model_technical_name
|
||||
msgid "Navigate Model Technical Name"
|
||||
msgstr "Nom technique du Modèle finale de navigation"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_action_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_action_id
|
||||
@@ -141,11 +124,6 @@ msgstr "Options de navigation"
|
||||
msgid "See tags of Partners"
|
||||
msgstr "Voir les catégories des partenaires"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__sequence
|
||||
msgid "Sequence"
|
||||
msgstr "Séquence"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model,name:server_action_navigate.model_ir_actions_server
|
||||
msgid "Server Action"
|
||||
@@ -157,6 +135,12 @@ msgid "Server Actions Navigation Lines"
|
||||
msgstr "Lignes de navigation de l'action-serveur"
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server_navigate_line__field_domain_model_id
|
||||
msgid "Technical field, used as a domain for the 'field' field."
|
||||
msgstr "Champ technique, utilisé comme un domaine pour le champ 'Champ'."
|
||||
|
||||
#. module: server_action_navigate
|
||||
#. odoo-python
|
||||
#: code:addons/server_action_navigate/models/ir_actions_server.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
@@ -173,45 +157,26 @@ msgstr ""
|
||||
msgid ""
|
||||
"Type of server action. The following values are available:\n"
|
||||
"- 'Execute Python Code': a block of python code that will be executed\n"
|
||||
"- 'Create': create a new record with new values\n"
|
||||
"- 'Create a new Record': create a new record with new values\n"
|
||||
"- 'Update a Record': update the values of a record\n"
|
||||
"- 'Execute several actions': define an action that triggers several other "
|
||||
"server actions\n"
|
||||
"- 'Send Email': automatically send an email (Discuss)\n"
|
||||
"- 'Execute several actions': define an action that triggers several other server actions\n"
|
||||
"- 'Send Email': post a message, a note or send an email (Discuss)\n"
|
||||
"- 'Add Followers': add followers to a record (Discuss)\n"
|
||||
"- 'Create Next Activity': create an activity (Discuss)"
|
||||
"- 'Create Next Activity': create an activity (Discuss)\n"
|
||||
"- 'Send SMS Text Message': send SMS, log them on documents (SMS)"
|
||||
msgstr ""
|
||||
"Type d'action serveur. Les valeurs suivantes sont disponibles :\n"
|
||||
"- 'Executer du code Python' : un bloc de code python qui sera exécuté\n"
|
||||
"- 'Créer' : créer un nouvel enregistrement avec de nouvelles valeurs\n"
|
||||
"- 'Mettre à jour un enregistrement' : mettre à jour les valeurs d'un "
|
||||
"enregistrement\n"
|
||||
"- 'Executer plusieurs actions' : définir une action qui déclenche plusieurs "
|
||||
"autres actions serveur\n"
|
||||
"- 'Mettre à jour un enregistrement' : mettre à jour les valeurs d'un enregistrement\n"
|
||||
"- 'Executer plusieurs actions' : définir une action qui déclenche plusieurs autres actions serveur\n"
|
||||
"- 'Envoyer E-Mail' : envoyer un e-mail automatiquement (Discutez)\n"
|
||||
"- 'Ajouter Abonnés' : ajouter des abonnés à un enregistrement (Discutez)\n"
|
||||
"- 'Créer une Nouvelle Activité' : créer une activité (Discutez)"
|
||||
|
||||
#~ msgid "Add Followers"
|
||||
#~ msgstr "Ajouter des abonnés"
|
||||
|
||||
#~ msgid "Create Next Activity"
|
||||
#~ msgstr "Créer une activité "
|
||||
|
||||
#~ msgid "Create a new Record"
|
||||
#~ msgstr "Créer un nouvel enregistrement"
|
||||
|
||||
#~ msgid "Execute Python Code"
|
||||
#~ msgstr "Exécuter le code Python"
|
||||
|
||||
#~ msgid "Execute several actions"
|
||||
#~ msgstr "Exécuter plusieurs actions"
|
||||
|
||||
#~ msgid "Send Email"
|
||||
#~ msgstr "Envoyer par courriel"
|
||||
|
||||
#~ msgid "Update the Record"
|
||||
#~ msgstr "Mettre à jour l'enregistrement"
|
||||
|
||||
#~ msgid "Line Number"
|
||||
#~ msgstr "Numéro de ligne"
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_model_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_model_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__navigate_model_id
|
||||
msgid "Final Navigation Model"
|
||||
msgstr "Modèle finale de navigation"
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-12-23 18:40+0000\n"
|
||||
"PO-Revision-Date: 2023-12-23 18:40+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -50,7 +52,6 @@ msgid "Delete Last Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__display_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
@@ -61,18 +62,16 @@ msgid "Field"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server_navigate_line__field_model
|
||||
msgid "For relationship fields, the technical name of the target model"
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__field_domain_model_id
|
||||
msgid "Field Model"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server____last_update
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
@@ -87,25 +86,6 @@ msgstr ""
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__max_navigate_line_model
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__max_navigate_line_model
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__max_navigate_line_model
|
||||
msgid "Max Navigate Model in lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__max_navigate_line_sequence
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__max_navigate_line_sequence
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__max_navigate_line_sequence
|
||||
msgid "Max Navigate sequence in lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__field_model
|
||||
msgid "Model"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields.selection,name:server_action_navigate.selection__ir_actions_server__state__navigate
|
||||
msgid "Navigate"
|
||||
@@ -118,6 +98,13 @@ msgstr ""
|
||||
msgid "Navigate Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_model_technical_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_model_technical_name
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__navigate_model_technical_name
|
||||
msgid "Navigate Model Technical Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_action_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_action_id
|
||||
@@ -135,11 +122,6 @@ msgstr ""
|
||||
msgid "See tags of Partners"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__sequence
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model,name:server_action_navigate.model_ir_actions_server
|
||||
msgid "Server Action"
|
||||
@@ -151,6 +133,12 @@ msgid "Server Actions Navigation Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server_navigate_line__field_domain_model_id
|
||||
msgid "Technical field, used as a domain for the 'field' field."
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#. odoo-python
|
||||
#: code:addons/server_action_navigate/models/ir_actions_server.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
@@ -165,10 +153,18 @@ msgstr ""
|
||||
msgid ""
|
||||
"Type of server action. The following values are available:\n"
|
||||
"- 'Execute Python Code': a block of python code that will be executed\n"
|
||||
"- 'Create': create a new record with new values\n"
|
||||
"- 'Create a new Record': create a new record with new values\n"
|
||||
"- 'Update a Record': update the values of a record\n"
|
||||
"- 'Execute several actions': define an action that triggers several other server actions\n"
|
||||
"- 'Send Email': automatically send an email (Discuss)\n"
|
||||
"- 'Send Email': post a message, a note or send an email (Discuss)\n"
|
||||
"- 'Add Followers': add followers to a record (Discuss)\n"
|
||||
"- 'Create Next Activity': create an activity (Discuss)"
|
||||
"- 'Create Next Activity': create an activity (Discuss)\n"
|
||||
"- 'Send SMS Text Message': send SMS, log them on documents (SMS)"
|
||||
msgstr ""
|
||||
|
||||
#. module: server_action_navigate
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_base_automation__navigate_model_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server__navigate_model_id
|
||||
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_cron__navigate_model_id
|
||||
msgid "Final Navigation Model"
|
||||
msgstr ""
|
||||
|
||||
@@ -13,85 +13,74 @@ class IrActionsServer(models.Model):
|
||||
selection_add=[("navigate", "Navigate")], ondelete={"navigate": "set default"}
|
||||
)
|
||||
|
||||
navigate_action_id = fields.Many2one(
|
||||
string="Navigation Action",
|
||||
comodel_name="ir.actions.act_window",
|
||||
domain="[('res_model', '=', max_navigate_line_model)]",
|
||||
help="Define here the action used when the navigation will be executed"
|
||||
" if empty, a generic action will be used.",
|
||||
)
|
||||
|
||||
navigate_line_ids = fields.One2many(
|
||||
comodel_name="ir.actions.server.navigate.line",
|
||||
string="Navigate Lines",
|
||||
inverse_name="action_id",
|
||||
)
|
||||
|
||||
max_navigate_line_sequence = fields.Integer(
|
||||
string="Max Navigate sequence in lines",
|
||||
compute="_compute_max_navigate_line",
|
||||
store=True,
|
||||
navigate_action_id = fields.Many2one(
|
||||
string="Navigation Action",
|
||||
comodel_name="ir.actions.act_window",
|
||||
domain="[('res_model', '=', navigate_model_technical_name)]",
|
||||
help="Define here the action used when the navigation will be executed"
|
||||
" if empty, a generic action will be used.",
|
||||
)
|
||||
|
||||
max_navigate_line_model = fields.Char(
|
||||
string="Max Navigate Model in lines",
|
||||
compute="_compute_max_navigate_line",
|
||||
store=True,
|
||||
navigate_model_id = fields.Many2one(
|
||||
string="Final Navigation Model",
|
||||
comodel_name="ir.model",
|
||||
compute="_compute_navigate_infos",
|
||||
)
|
||||
|
||||
@api.depends("navigate_line_ids", "model_id")
|
||||
def _compute_max_navigate_line(self):
|
||||
"""Allow to know the highest sequence entered in navigate lines.
|
||||
Then we add 1 to this value for the next sequence.
|
||||
This value is given to the context of the o2m field in the view.
|
||||
So when we create new navigate line, the sequence is automatically
|
||||
added as : max_sequence + 1
|
||||
"""
|
||||
navigate_model_technical_name = fields.Char(
|
||||
compute="_compute_navigate_infos",
|
||||
)
|
||||
|
||||
@api.depends("navigate_line_ids.field_id", "model_id")
|
||||
def _compute_navigate_infos(self):
|
||||
IrModel = self.env["ir.model"]
|
||||
for action in self:
|
||||
action.max_navigate_line_sequence = (
|
||||
max(action.mapped("navigate_line_ids.sequence") or [0]) + 1
|
||||
)
|
||||
action.max_navigate_line_model = (
|
||||
action.navigate_line_ids
|
||||
and action.navigate_line_ids[-1].field_model
|
||||
or action.model_id.model
|
||||
if action.navigate_line_ids:
|
||||
action.navigate_model_id = IrModel.search(
|
||||
[("model", "=", action.navigate_line_ids[-1].field_id.relation)]
|
||||
)
|
||||
else:
|
||||
action.navigate_model_id = action.model_id
|
||||
action.navigate_model_technical_name = action.navigate_model_id.model
|
||||
|
||||
def delete_last_line(self):
|
||||
self.ensure_one()
|
||||
self.navigate_line_ids[-1].unlink()
|
||||
self.navigate_action_id = False
|
||||
|
||||
@api.model
|
||||
def run_action_navigate_multi(self, action, eval_context=None):
|
||||
IrModel = self.env["ir.model"]
|
||||
lines = action.navigate_line_ids
|
||||
def _run_action_navigate_multi(self, eval_context=None):
|
||||
self.ensure_one()
|
||||
lines = self.navigate_line_ids
|
||||
if not lines:
|
||||
raise UserError(
|
||||
_("The Action Server %s is not correctly set\n" " : No fields defined")
|
||||
_("The Action Server %s is not correctly set\n : No fields defined")
|
||||
% (self.name)
|
||||
)
|
||||
mapped_field_value = ".".join(lines.mapped("field_id.name"))
|
||||
|
||||
item_ids = eval_context["records"].mapped(mapped_field_value).ids
|
||||
domain = "[('id','in',[" + ",".join(map(str, item_ids)) + "])]"
|
||||
|
||||
if self.navigate_action_id:
|
||||
# Use Defined action if defined
|
||||
if action.navigate_action_id:
|
||||
return_action = action.navigate_action_id
|
||||
return_action = self.navigate_action_id
|
||||
result = return_action.read()[0]
|
||||
result["domain"] = domain
|
||||
else:
|
||||
# Otherwise, return a default action
|
||||
model_name = action.max_navigate_line_model
|
||||
model = IrModel.search([("model", "=", model_name)])
|
||||
view_mode = "tree,form"
|
||||
result = {
|
||||
"name": model.name,
|
||||
"name": self.navigate_model_id.name,
|
||||
"domain": domain,
|
||||
"res_model": model_name,
|
||||
"res_model": self.navigate_model_id.model,
|
||||
"target": "current",
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": view_mode,
|
||||
"view_mode": "tree,form",
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
@@ -8,11 +8,7 @@ from odoo import api, fields, models
|
||||
class IrActionsServerNavigateLine(models.Model):
|
||||
_name = "ir.actions.server.navigate.line"
|
||||
_description = "Server Actions Navigation Lines"
|
||||
_order = "sequence, id"
|
||||
|
||||
sequence = fields.Integer(string="Sequence")
|
||||
|
||||
field_model = fields.Char(string="Model", related="field_id.relation", store=True)
|
||||
_order = "id"
|
||||
|
||||
action_id = fields.Many2one(
|
||||
comodel_name="ir.actions.server",
|
||||
@@ -21,28 +17,31 @@ class IrActionsServerNavigateLine(models.Model):
|
||||
ondelete="cascade",
|
||||
)
|
||||
|
||||
field_id = fields.Many2one(
|
||||
comodel_name="ir.model.fields",
|
||||
string="Field",
|
||||
required=True,
|
||||
field_domain_model_id = fields.Many2one(
|
||||
string="Field Model",
|
||||
comodel_name="ir.model",
|
||||
ondelete="cascade",
|
||||
compute="_compute_field_domain_model_id",
|
||||
help="Technical field, used as a domain for the 'field' field.",
|
||||
)
|
||||
|
||||
# when adding a record, onchange is called for every field on the
|
||||
# form, also in editable list views
|
||||
@api.onchange("field_id")
|
||||
def _onchange_field_id(self):
|
||||
field_id = fields.Many2one(
|
||||
comodel_name="ir.model.fields",
|
||||
ondelete="cascade",
|
||||
domain="["
|
||||
"('model_id', '=', field_domain_model_id),"
|
||||
" ('ttype', 'in', ['many2one', 'one2many', 'many2many']),"
|
||||
"]",
|
||||
required=True,
|
||||
)
|
||||
|
||||
lines = self.action_id.new(
|
||||
{"navigate_line_ids": self.env.context.get("navigate_line_ids", [])}
|
||||
).navigate_line_ids
|
||||
|
||||
model = lines[-1:].field_id.relation or self.action_id.model_id.model
|
||||
return {
|
||||
"domain": {
|
||||
"field_id": [
|
||||
("ttype", "in", ["many2one", "one2many", "many2many"]),
|
||||
("model", "=", model),
|
||||
],
|
||||
}
|
||||
}
|
||||
@api.depends("action_id.navigate_line_ids.field_id")
|
||||
def _compute_field_domain_model_id(self):
|
||||
IrModel = self.env["ir.model"]
|
||||
for line in self:
|
||||
model = self.action_id.model_id
|
||||
for action_line in self.action_id.navigate_line_ids:
|
||||
if action_line == line:
|
||||
line.field_domain_model_id = model
|
||||
break
|
||||
model = IrModel.search([("model", "=", action_line.field_id.relation)])
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
* click on 'Action' Button
|
||||
|
||||
.. figure:: ../static/description/sale_order_tree.png
|
||||
|
||||
.. figure:: ../static/description/res_users_tree.png
|
||||
|
||||
* then click on the name of the configured Action and see the results
|
||||
|
||||
.. figure:: ../static/description/product_product_tree.png
|
||||
.. figure:: ../static/description/res_partner_category_tree.png
|
||||
|
||||
@@ -367,9 +367,9 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:2c2b8623b55720c69820ab8a7a26d3bc90897eb1f587f26f9e1a778f33f99448
|
||||
!! source digest: sha256:4a9e5951abe237615f48ea2a448610988368c99dca4aa6dc30e7150503ff6378
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-backend/tree/14.0/server_action_navigate"><img alt="OCA/server-backend" src="https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-backend-14-0/server-backend-14-0-server_action_navigate"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-backend/tree/16.0/server_action_navigate"><img alt="OCA/server-backend" src="https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-backend-16-0/server-backend-16-0-server_action_navigate"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module provides a generic tool to have the possibility to see a list of
|
||||
records associated to a given selection of records. This is basically the UI version of <tt class="docutils literal"><span class="pre">recordset.mapped('field1.field2')</span></tt>.</p>
|
||||
<p>For example, if you use the sale module, you can configure an action to see
|
||||
@@ -395,7 +395,7 @@ all the products that have been sold for a given selection of sale orders.</p>
|
||||
<li>Create a new item</li>
|
||||
</ul>
|
||||
<div class="figure">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/ir_actions_server_form.png" src="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/ir_actions_server_form.png" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/ir_actions_server_form.png" src="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/ir_actions_server_form.png" />
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li>Set a name that will be used for the Contextual Action</li>
|
||||
@@ -421,13 +421,13 @@ button.</li>
|
||||
<li>click on ‘Action’ Button</li>
|
||||
</ul>
|
||||
<div class="figure">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/sale_order_tree.png" src="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/sale_order_tree.png" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_users_tree.png" src="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_users_tree.png" />
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li>then click on the name of the configured Action and see the results</li>
|
||||
</ul>
|
||||
<div class="figure">
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/product_product_tree.png" src="https://raw.githubusercontent.com/OCA/server-backend/14.0/server_action_navigate/static/description/product_product_tree.png" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_partner_category_tree.png" src="https://raw.githubusercontent.com/OCA/server-backend/16.0/server_action_navigate/static/description/res_partner_category_tree.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
@@ -435,7 +435,7 @@ button.</li>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-backend/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/server-backend/issues/new?body=module:%20server_action_navigate%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/server-backend/issues/new?body=module:%20server_action_navigate%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -462,7 +462,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/legalsylvain"><img alt="legalsylvain" src="https://github.com/legalsylvain.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/ashishhirpara"><img alt="ashishhirpara" src="https://github.com/ashishhirpara.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-backend/tree/14.0/server_action_navigate">OCA/server-backend</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-backend/tree/16.0/server_action_navigate">OCA/server-backend</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
server_action_navigate/static/description/res_users_tree.png
Normal file
BIN
server_action_navigate/static/description/res_users_tree.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB |
@@ -17,32 +17,21 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
attrs="{'invisible': [('state', '!=', 'navigate')]}"
|
||||
>
|
||||
<group>
|
||||
<field name="max_navigate_line_sequence" invisible="1" />
|
||||
<field name="max_navigate_line_model" invisible="1" />
|
||||
<!-- we can check emptyness of a 2many like this since v10 i think /-->
|
||||
<field name="navigate_line_ids" nolabel="1" colspan="2">
|
||||
<tree editable="bottom" delete="false">
|
||||
<field name="field_domain_model_id" />
|
||||
<field name="field_id" />
|
||||
</tree>
|
||||
</field>
|
||||
<button
|
||||
name="delete_last_line"
|
||||
string="Delete Last Line"
|
||||
type="object"
|
||||
attrs="{'invisible': [('navigate_line_ids', '=', [])]}"
|
||||
colspan="2"
|
||||
/>
|
||||
<field
|
||||
name="navigate_line_ids"
|
||||
context="{'navigate_line_ids': navigate_line_ids}"
|
||||
nolabel="1"
|
||||
colspan="4"
|
||||
>
|
||||
<tree editable="bottom" delete="false">
|
||||
<!-- the handle widget takes care of the sequence /-->
|
||||
<field
|
||||
name="sequence"
|
||||
widget="handle"
|
||||
invisible="True"
|
||||
/>
|
||||
<field name="field_id" />
|
||||
<field name="field_model" />
|
||||
</tree>
|
||||
</field>
|
||||
<field name="navigate_model_id" />
|
||||
<field name="navigate_model_technical_name" invisible="1" />
|
||||
<field
|
||||
name="navigate_action_id"
|
||||
attrs="{'invisible': [('navigate_line_ids', '=', [])]}"
|
||||
|
||||
Reference in New Issue
Block a user