From 87e31a43ddcd7c674237984fd8edf73a8d4aedf1 Mon Sep 17 00:00:00 2001 From: trisdoan Date: Thu, 3 Oct 2024 14:53:52 +0700 Subject: [PATCH] [MIG] server_action_mass_edit: Migration to 18.0 --- server_action_mass_edit/README.rst | 25 ++++++++++++------- server_action_mass_edit/__manifest__.py | 2 +- .../ir_actions_server_mass_edit_line.py | 7 +++--- .../readme/CONTRIBUTORS.md | 1 + server_action_mass_edit/readme/CREDITS.md | 1 + .../static/description/index.html | 25 ++++++++++++------- .../tests/test_mass_editing.py | 2 +- .../views/ir_actions_server.xml | 4 +-- .../wizard/mass_editing_wizard.py | 22 ++++++++-------- 9 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 server_action_mass_edit/readme/CREDITS.md diff --git a/server_action_mass_edit/README.rst b/server_action_mass_edit/README.rst index da62bd4761..7672d24ef6 100644 --- a/server_action_mass_edit/README.rst +++ b/server_action_mass_edit/README.rst @@ -17,13 +17,13 @@ Mass Editing :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--ux-lightgray.png?logo=github - :target: https://github.com/OCA/server-ux/tree/17.0/server_action_mass_edit + :target: https://github.com/OCA/server-ux/tree/18.0/server_action_mass_edit :alt: OCA/server-ux .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-server_action_mass_edit + :target: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-server_action_mass_edit :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-ux&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -76,7 +76,7 @@ Configuration action with a domain. - You can add an extra message that will be displayed in the wizard. -.. |Configuration| image:: https://raw.githubusercontent.com/OCA/server-ux/17.0/server_action_mass_edit/static/description/mass_editing_form.png +.. |Configuration| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/server_action_mass_edit/static/description/mass_editing_form.png Usage ===== @@ -95,9 +95,9 @@ Usage |Wizard Result| -.. |Action| image:: https://raw.githubusercontent.com/OCA/server-ux/17.0/server_action_mass_edit/static/description/mass_editing-item_tree.png -.. |Wizard Form| image:: https://raw.githubusercontent.com/OCA/server-ux/17.0/server_action_mass_edit/static/description/mass_editing-wizard_form.png -.. |Wizard Result| image:: https://raw.githubusercontent.com/OCA/server-ux/17.0/server_action_mass_edit/static/description/mass_editing-item_tree-result.png +.. |Action| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/server_action_mass_edit/static/description/mass_editing-item_tree.png +.. |Wizard Form| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/server_action_mass_edit/static/description/mass_editing-wizard_form.png +.. |Wizard Result| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/server_action_mass_edit/static/description/mass_editing-item_tree-result.png Known issues / Roadmap ====================== @@ -110,7 +110,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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -142,6 +142,13 @@ Contributors - Víctor Martínez - Tatiana Deribina +- Tris Doan + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp. Maintainers ----------- @@ -156,6 +163,6 @@ 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/server-ux `_ project on GitHub. +This module is part of the `OCA/server-ux `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/server_action_mass_edit/__manifest__.py b/server_action_mass_edit/__manifest__.py index e03997edd5..5fe5c2ff84 100644 --- a/server_action_mass_edit/__manifest__.py +++ b/server_action_mass_edit/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Mass Editing", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "author": "Serpent Consulting Services Pvt. Ltd., " "Tecnativa, " "GRAP, " diff --git a/server_action_mass_edit/models/ir_actions_server_mass_edit_line.py b/server_action_mass_edit/models/ir_actions_server_mass_edit_line.py index 7af26d6247..ac1ffd40a3 100644 --- a/server_action_mass_edit/models/ir_actions_server_mass_edit_line.py +++ b/server_action_mass_edit/models/ir_actions_server_mass_edit_line.py @@ -28,15 +28,14 @@ class IrActionsServerMassEditLine(models.Model): field_id = fields.Many2one( "ir.model.fields", string="Field", - domain=""" + domain=f""" [ - ("name", "not in", %s), + ("name", "not in", {str(MAGIC_FIELDS)}), ("ttype", "not in", ["reference", "function"]), ("model_id", "=", model_id), ("readonly", "!=", True), ] - """ - % str(MAGIC_FIELDS), + """, ondelete="cascade", required=True, ) diff --git a/server_action_mass_edit/readme/CONTRIBUTORS.md b/server_action_mass_edit/readme/CONTRIBUTORS.md index 384fc2e3ac..c81fb63d9e 100644 --- a/server_action_mass_edit/readme/CONTRIBUTORS.md +++ b/server_action_mass_edit/readme/CONTRIBUTORS.md @@ -10,3 +10,4 @@ - Jairo Llopis - Víctor Martínez - Tatiana Deribina \<\> +- Tris Doan \<\> diff --git a/server_action_mass_edit/readme/CREDITS.md b/server_action_mass_edit/readme/CREDITS.md new file mode 100644 index 0000000000..83b3ec91f7 --- /dev/null +++ b/server_action_mass_edit/readme/CREDITS.md @@ -0,0 +1 @@ +The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp. diff --git a/server_action_mass_edit/static/description/index.html b/server_action_mass_edit/static/description/index.html index f155e118aa..7e5bd8cf15 100644 --- a/server_action_mass_edit/static/description/index.html +++ b/server_action_mass_edit/static/description/index.html @@ -369,7 +369,7 @@

Mass Editing

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a91c225a06ba8d7292d92a9cf99286ed5e4128715d60e02589acaf1e09361aa0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

This module allows to edit several records at the same time in any Odoo model

Difference in comparison to the Odoo Feature

@@ -395,7 +395,8 @@

Mass Editing

  • Credits
  • @@ -412,7 +413,7 @@

    Configuration

  • Add the security groups allowed to use this action
  • Add the fields you want to be mass edited
  • -

    Configuration

    +

    Configuration

    • Add Action: Click on Create Contextual Action to add mass editing in Action menu.
    • @@ -432,16 +433,16 @@

      Usage

    • Go for Mass Editing: select the records which you want to modify and click on Action to open mass editing popup.
    -

    Action

    +

    Action

    • Select Set / Remove action and write down the value to set or remove the value for the given field.
    -

    Wizard Form

    +

    Wizard Form

    • This way you can set / remove the values of the fields.
    -

    Wizard Result

    +

    Wizard Result

    Known issues / Roadmap

    @@ -454,7 +455,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 to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -485,10 +486,16 @@

    Contributors

  • Tatiana Deribina <tatiana.deribina@spritnit.fi>
  • +
  • Tris Doan <tridm@trobz.com>
  • +
    +

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp.

    +
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -496,7 +503,7 @@

    Maintainers

    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/server-ux project on GitHub.

    +

    This module is part of the OCA/server-ux project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/server_action_mass_edit/tests/test_mass_editing.py b/server_action_mass_edit/tests/test_mass_editing.py index ba41c3643a..77ddc70338 100644 --- a/server_action_mass_edit/tests/test_mass_editing.py +++ b/server_action_mass_edit/tests/test_mass_editing.py @@ -168,7 +168,7 @@ def test_wiz_fields_view_get(self): ).get_view(view_id=view_id.id) arch = result.get("arch", "") self.assertIn( - " - + - +