diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..180fc49789 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +openupgradelib 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/__init__.py b/server_action_mass_edit/__init__.py index 9b4296142f..0759f9486a 100644 --- a/server_action_mass_edit/__init__.py +++ b/server_action_mass_edit/__init__.py @@ -1,2 +1,3 @@ from . import models from . import wizard +from .hooks import pre_init_hook diff --git a/server_action_mass_edit/__manifest__.py b/server_action_mass_edit/__manifest__.py index e03997edd5..f0575b0d52 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, " @@ -27,4 +27,6 @@ ] }, "demo": ["demo/mass_editing.xml"], + "external_dependencies": {"python": ["openupgradelib"]}, + "pre_init_hook": "pre_init_hook", } diff --git a/server_action_mass_edit/hooks.py b/server_action_mass_edit/hooks.py new file mode 100644 index 0000000000..ac8e1e6f25 --- /dev/null +++ b/server_action_mass_edit/hooks.py @@ -0,0 +1,16 @@ +# Copyright 2024 Camptocamp () +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) +from openupgradelib import openupgrade + + +def pre_init_hook(env): + if openupgrade.table_exists(env.cr, "mass_editing_line"): + openupgrade.rename_models( + env.cr, [("mass.editing.line", "ir.actions.server.mass.edit.line")] + ) + openupgrade.rename_tables( + env.cr, [("mass_editing_line", "ir_actions_server_mass_edit_line")] + ) + + modules = [("mass_editing", "server_action_mass_edit")] + openupgrade.update_module_names(env.cr, modules, merge_modules=True) 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/static/src/js/record.esm.js b/server_action_mass_edit/static/src/js/record.esm.js index ed6875ad82..5242494d38 100644 --- a/server_action_mass_edit/static/src/js/record.esm.js +++ b/server_action_mass_edit/static/src/js/record.esm.js @@ -1,4 +1,3 @@ -/** @odoo-module **/ import {Record} from "@web/model/relational_model/record"; import {patch} from "@web/core/utils/patch"; diff --git a/server_action_mass_edit/static/src/js/static_list.esm.js b/server_action_mass_edit/static/src/js/static_list.esm.js index 1a751b5424..fdbb9a739c 100644 --- a/server_action_mass_edit/static/src/js/static_list.esm.js +++ b/server_action_mass_edit/static/src/js/static_list.esm.js @@ -1,4 +1,3 @@ -/** @odoo-module **/ import {StaticList} from "@web/model/relational_model/static_list"; import {markRaw} from "@odoo/owl"; import {patch} from "@web/core/utils/patch"; 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( - " - + - +