diff --git a/server_action_mass_edit/__manifest__.py b/server_action_mass_edit/__manifest__.py index e7c3adb4b8..f718a29b09 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": "16.0.2.0.1", + "version": "17.0.1.0.0", "author": "Serpent Consulting Services Pvt. Ltd., " "Tecnativa, " "GRAP, " diff --git a/server_action_mass_edit/migrations/16.0.2.0.0/pre-migration.py b/server_action_mass_edit/migrations/16.0.2.0.0/pre-migration.py deleted file mode 100644 index eb9e924c9e..0000000000 --- a/server_action_mass_edit/migrations/16.0.2.0.0/pre-migration.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop) -# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - cr = env.cr - - if not openupgrade.table_exists(cr, "mass_editing_line"): - return - - openupgrade.rename_models( - cr, [("mass.editing.line", "ir.actions.server.mass.edit.line")] - ) - openupgrade.rename_tables( - cr, [("mass_editing_line", "ir_actions_server_mass_edit_line")] - ) 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 b9a2141f29..a3184c1a72 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 @@ -6,7 +6,7 @@ from odoo import _, api, fields, models from odoo.exceptions import ValidationError -MAGIC_FIELDS = models.MAGIC_COLUMNS + [models.BaseModel.CONCURRENCY_CHECK_FIELD] +MAGIC_FIELDS = models.MAGIC_COLUMNS class IrActionsServerMassEditLine(models.Model): diff --git a/server_action_mass_edit/tests/test_mass_editing.py b/server_action_mass_edit/tests/test_mass_editing.py index d5222b174a..4bee87c41f 100644 --- a/server_action_mass_edit/tests/test_mass_editing.py +++ b/server_action_mass_edit/tests/test_mass_editing.py @@ -215,6 +215,7 @@ def test_wiz_read_fields(self): self.mass_editing_user, self.users, vals ) result = mass_wizard.read(fields)[0] + self.assertTrue( all([field in result for field in fields]), "Read must return all fields." ) @@ -333,9 +334,6 @@ def test_onchanges(self): self.assertEqual(mass_edit_line_form.widget_option, "image") mass_edit_line_form.field_id = self.env.ref("base.field_res_company__logo") self.assertEqual(mass_edit_line_form.widget_option, "image") - # binary - mass_edit_line_form.field_id = self.env.ref("base.field_res_company__favicon") - self.assertEqual(mass_edit_line_form.widget_option, False) mass_edit_line_form.field_id = self.env.ref("base.field_res_users__country_id") self.assertFalse(mass_edit_line_form.widget_option) diff --git a/server_action_mass_edit/views/ir_actions_server.xml b/server_action_mass_edit/views/ir_actions_server.xml index 869670f000..8a84bfeb3f 100644 --- a/server_action_mass_edit/views/ir_actions_server.xml +++ b/server_action_mass_edit/views/ir_actions_server.xml @@ -2,46 +2,49 @@ + ir.actions.server.mass_edit.inherited ir.actions.server - - - - - - - - - - - - - -
- WARNING: Take into account that adding a field with a domain, and not including the fields of such domain in this operation definition, will lead to an error when trying to perform it. Make sure you include them. -
-
- - - -
+ + + + + + + + + + + + + + + +
+ WARNING: Take into account that adding a field with a domain, and not including the fields of such domain in this operation definition, will lead to an error when trying to perform it. Make sure you include them. +
+
+ + + +
+ + +
+ +
diff --git a/server_action_mass_edit/wizard/mass_editing_wizard.py b/server_action_mass_edit/wizard/mass_editing_wizard.py index 9d455e3105..9b9578d17f 100644 --- a/server_action_mass_edit/wizard/mass_editing_wizard.py +++ b/server_action_mass_edit/wizard/mass_editing_wizard.py @@ -39,7 +39,8 @@ def default_get(self, fields, active_ids=None): } elif len(original_active_ids): operation_description_warning = _( - "You have selected %(origin_amount)d record(s) that can not be processed.\n" + "You have selected %(origin_amount)d " + "record(s) that can not be processed.\n" "Only %(amount)d record(s) will be processed." ) % { "origin_amount": len(original_active_ids) - len(active_ids), @@ -147,7 +148,8 @@ def _insert_field_in_arch(self, line, field, main_xml_group): def _get_field_options(self, field): return { "name": field.name, - "modifiers": '{"invisible": [["selection__%s", "in", ["ignore", "remove"]]]}' + "modifiers": '{"invisible": "\ + "[["selection__%s", "in", ["ignore", "remove"]]]}' % field.name, "class": "w-75", } diff --git a/server_action_mass_edit/wizard/mass_editing_wizard.xml b/server_action_mass_edit/wizard/mass_editing_wizard.xml index f5b8ca6b21..4109feb376 100644 --- a/server_action_mass_edit/wizard/mass_editing_wizard.xml +++ b/server_action_mass_edit/wizard/mass_editing_wizard.xml @@ -11,33 +11,27 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-

+