From 56ecb1e3df3f8362050f78db4b9a7ab979ae11c3 Mon Sep 17 00:00:00 2001
From: Quentin Tawry
Date: Tue, 16 Nov 2021 17:09:05 +0100
Subject: [PATCH] [FIX] server_action_navigate: fix default order in
ir_action_server_navigate_line
---
server_action_navigate/README.rst | 16 +++---
.../i18n/server_action_navigate.pot | 54 ++++---------------
.../models/ir_actions_server_navigate_line.py | 4 +-
.../static/description/index.html | 2 +-
4 files changed, 22 insertions(+), 54 deletions(-)
diff --git a/server_action_navigate/README.rst b/server_action_navigate/README.rst
index 0c10b46e2..7a40babe2 100644
--- a/server_action_navigate/README.rst
+++ b/server_action_navigate/README.rst
@@ -14,13 +14,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/12.0/server_action_navigate
+ :target: https://github.com/OCA/server-backend/tree/13.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-12-0/server-backend-12-0-server_action_navigate
+ :target: https://translation.odoo-community.org/projects/server-backend-13-0/server-backend-13-0-server_action_navigate
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/253/12.0
+ :target: https://runbot.odoo-community.org/runbot/253/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -43,7 +43,7 @@ Configuration
* Create a new item
-.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/ir_actions_server_form.png
+.. figure:: https://raw.githubusercontent.com/OCA/server-backend/13.0/server_action_navigate/static/description/ir_actions_server_form.png
* Set a name that will be used for the Contextual Action
@@ -74,12 +74,12 @@ Usage
* click on 'Action' Button
-.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/sale_order_tree.png
+.. figure:: https://raw.githubusercontent.com/OCA/server-backend/13.0/server_action_navigate/static/description/sale_order_tree.png
* then click on the name of the configured Action and see the results
-.. figure:: https://raw.githubusercontent.com/OCA/server-backend/12.0/server_action_navigate/static/description/product_product_tree.png
+.. figure:: https://raw.githubusercontent.com/OCA/server-backend/13.0/server_action_navigate/static/description/product_product_tree.png
Bug Tracker
===========
@@ -87,7 +87,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -125,6 +125,6 @@ Current `maintainer `__:
|maintainer-legalsylvain|
-This module is part of the `OCA/server-backend `_ project on GitHub.
+This module is part of the `OCA/server-backend `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/server_action_navigate/i18n/server_action_navigate.pot b/server_action_navigate/i18n/server_action_navigate.pot
index d43c3c4a5..324ae1108 100644
--- a/server_action_navigate/i18n/server_action_navigate.pot
+++ b/server_action_navigate/i18n/server_action_navigate.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * server_action_navigate
+# * server_action_navigate
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -24,21 +24,6 @@ msgstr ""
msgid "Action To Do"
msgstr ""
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Add Followers"
-msgstr ""
-
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Create Next Activity"
-msgstr ""
-
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Create a new Record"
-msgstr ""
-
#. module: server_action_navigate
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__create_uid
msgid "Created by"
@@ -52,7 +37,9 @@ msgstr ""
#. module: server_action_navigate
#: 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."
+msgid ""
+"Define here the action used when the navigation will be executed if empty, a"
+" generic action will be used."
msgstr ""
#. module: server_action_navigate
@@ -65,16 +52,6 @@ msgstr ""
msgid "Display Name"
msgstr ""
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Execute Python Code"
-msgstr ""
-
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Execute several actions"
-msgstr ""
-
#. module: server_action_navigate
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__field_id
msgid "Field"
@@ -123,7 +100,7 @@ msgid "Model"
msgstr ""
#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
+#: model:ir.model.fields.selection,name:server_action_navigate.selection__ir_actions_server__state__navigate
msgid "Navigate"
msgstr ""
@@ -149,11 +126,6 @@ msgstr ""
msgid "See tags of Partners"
msgstr ""
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Send Email"
-msgstr ""
-
#. module: server_action_navigate
#: model:ir.model.fields,field_description:server_action_navigate.field_ir_actions_server_navigate_line__sequence
msgid "Sequence"
@@ -170,16 +142,18 @@ msgid "Server Actions Navigation Lines"
msgstr ""
#. module: server_action_navigate
-#: code:addons/server_action_navigate/models/ir_actions_server.py:62
+#: code:addons/server_action_navigate/models/ir_actions_server.py:0
#, python-format
-msgid "The Action Server %s is not correctly set\n"
+msgid ""
+"The Action Server %s is not correctly set\n"
" : No fields defined"
msgstr ""
#. module: server_action_navigate
#: model:ir.model.fields,help:server_action_navigate.field_ir_actions_server__state
#: model:ir.model.fields,help:server_action_navigate.field_ir_cron__state
-msgid "Type of server action. The following values are available:\n"
+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"
"- 'Update a Record': update the values of a record\n"
@@ -188,9 +162,3 @@ msgid "Type of server action. The following values are available:\n"
"- 'Add Followers': add followers to a record (Discuss)\n"
"- 'Create Next Activity': create an activity (Discuss)"
msgstr ""
-
-#. module: server_action_navigate
-#: selection:ir.actions.server,state:0
-msgid "Update the Record"
-msgstr ""
-
diff --git a/server_action_navigate/models/ir_actions_server_navigate_line.py b/server_action_navigate/models/ir_actions_server_navigate_line.py
index 72e02c290..68212a64f 100644
--- a/server_action_navigate/models/ir_actions_server_navigate_line.py
+++ b/server_action_navigate/models/ir_actions_server_navigate_line.py
@@ -8,9 +8,9 @@ from odoo import api, fields, models
class IrActionsServerNavigateLine(models.Model):
_name = "ir.actions.server.navigate.line"
_description = "Server Actions Navigation Lines"
- _order = "sequence"
+ _order = "sequence, id"
- sequence = fields.Integer(string="Sequence", default=1)
+ sequence = fields.Integer(string="Sequence")
field_model = fields.Char(string="Model", related="field_id.relation", store=True)
diff --git a/server_action_navigate/static/description/index.html b/server_action_navigate/static/description/index.html
index 12e7f9a2a..eeac420e2 100644
--- a/server_action_navigate/static/description/index.html
+++ b/server_action_navigate/static/description/index.html
@@ -393,7 +393,7 @@ all the products that have been sold for a given selection of sale orders.
Create a new item
- Set a name that will be used for the Contextual Action