Skip to content

Commit 5786d4e

Browse files
JayVora-SerpentCSholdenrehg
authored andcommitted
Added Mass Editing v9 (OCA#315)
* Added Mass Editing v9 * [IMP] Improved the coding standard as per API and PEP8. * [ADD] Added README and index file. * [IMP] Improved the indentation of the code as per travis test suggestion. * [IMP] Improved the README.rst * Update mass_object.py * Delete index.html * [ADD] Added unit test cases for MassEditing module. * Corrected as per @api.multi * Correction for the travis test * Correction for the travis test * [IMP] Improved the code as per review comments, improved copyrights, added test more cases and uninstall hook. * [ADD] Added Unit test case for m2m fields. * [ADD] Further added unit test case for unlink and multiple fields. * [ADD] Added unit test case for model_id onchange. * [IMP] Fixed the issue of eval in unit test case. * [ADD] Added unit test case for uninstall hook. * [ADD] Added unit test case for uninstall hook. * [ADD] Added unit test case for wizard's fields_view_get method. * [IMP] Improved the unit test case to cover more lines of code of fields view get. * [IMP] Improved the unit test case to cover more lines of code of fields view get.
1 parent be8953d commit 5786d4e

28 files changed

+719
-502
lines changed

mass_editing/ChangeLog.txt

100755100644
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
===============================================================================
22
Version Change Log (mass_editing)
33
===============================================================================
4-
1.3 * March 11,2013 : Serpent Consulting Services
5-
* Improved and optimized the code of mass_editing
4+
1.6 * June 01,2016 : Serpent Consulting Services
5+
* Added Unit Test Cases
66

7-
1.2 * Feb 14,2013 : Serpent Consulting Services
8-
* Corrected code as per the review by Community
7+
1.5 * March 23,2016 : Serpent Consulting Services
8+
* Added README and index.html file.
99

10-
1.1 * Feb 12,2013 : Serpent Consulting Services
11-
* Added the module
10+
1.4 * March 19,2016 : Serpent Consulting Services
11+
* Improved and migrated the code as per API and OCA standards.
12+
13+
1.3 * March 11,2013 : Serpent Consulting Services
14+
* Improved and optimized the code of mass_editing
15+
16+
1.2 * Feb 14,2013 : Serpent Consulting Services
17+
* Corrected code as per the review by Community
18+
19+
1.1 * Feb 12,2013 : Serpent Consulting Services
20+
* Added the module

mass_editing/README.rst

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
.. image:: https://img.shields.io/badge/license-LGPLv3-blue.svg
2+
:target: https://www.gnu.org/licenses/lgpl.html
3+
:alt: License: LGPL-3
4+
5+
============
6+
Mass Editing
7+
============
8+
9+
This module provides the following features:
10+
11+
* You can add, update or remove the values of more than one records on the fly at the same time.
12+
13+
* You can configure mass editing for any Odoo model.
14+
15+
* The video explaining the features and how-to for OpenERP Version 6 is here http://t.co/wukYMx1A
16+
17+
* The video explaining the features and how-to for OpenERP Version 7 is here : http://www.youtube.com/watch?v=9BH0o74A748&feature=youtu.be
18+
19+
* For more details/customization/feedback contact us on [email protected]
20+
21+
Installation
22+
============
23+
24+
No external library is used.
25+
26+
Configuration
27+
=============
28+
29+
To configure this module, you need to:
30+
31+
* Go to *Settings / Mass Editing / Mass Editing* and configure the object and fields for Mass Editing.
32+
33+
Usage
34+
=====
35+
36+
This module allows to add, update or remove the values of more than one records on the fly at the same time.
37+
38+
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
39+
:alt: Try me on Runbot
40+
:target: https://runbot.odoo-community.org/runbot/149/9.0
41+
42+
As shown in figure you have to configure the object and fields for mass editing.
43+
44+
* Select the object and add the fields of that object on which you want to apply mass editing.
45+
46+
.. image:: /mass_editing/static/description/mass_editing-1.png
47+
:width: 70%
48+
49+
* *Add Action*: As shown in figure click on *Add Sidebar Button* to add mass editing option in *Action* option in action.
50+
51+
.. image:: /mass_editing/static/description/mass_editing-2.png
52+
:width: 70%
53+
54+
* *Go for Mass Editing*: As shown in figure, select the records which you want to modify and click on *Action* to open mass editing popup.
55+
56+
.. image:: /mass_editing/static/description/mass_editing-3.png
57+
:width: 70%
58+
59+
* Select *Set / Remove* action and write down the value to set or remove the value for the given field.
60+
61+
.. image:: /mass_editing/static/description/mass_editing-4.png
62+
:width: 70%
63+
64+
* This way you can set / remove the values of the fields.
65+
66+
.. image:: /mass_editing/static/description/mass_editing-5.png
67+
:width: 70%
68+
69+
Bug Tracker
70+
===========
71+
72+
Bugs are tracked on `GitHub Issues
73+
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
74+
check there if your issue has already been reported. If you spotted it first,
75+
help us smashing it by providing a detailed and welcomed `feedback
76+
<https://github.com/OCA/
77+
server-tools/issues/new?body=module:%20
78+
server-tools%0Aversion:%20
79+
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
80+
81+
Credits
82+
=======
83+
84+
Images
85+
------
86+
87+
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
88+
89+
Contributors
90+
------------
91+
92+
* Oihane Crucelaegui <[email protected]>
93+
* Serpent Consulting Services Pvt. Ltd. <[email protected]>
94+
95+
Maintainer
96+
----------
97+
98+
.. image:: https://odoo-community.org/logo.png
99+
:alt: Odoo Community Association
100+
:target: http://odoo-community.org
101+
102+
This module is maintained by the OCA.
103+
104+
OCA, or the Odoo Community Association, is a nonprofit organization whose
105+
mission is to support the collaborative development of Odoo features and
106+
promote its widespread use.
107+
108+
To contribute to this module, please visit http://odoo-community.org.
109+

mass_editing/__init__.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# This module uses OpenERP, Open Source Management Solution Framework.
5-
# Copyright (C):
6-
# 2012-Today Serpent Consulting Services (<http://www.serpentcs.
7-
#
8-
# This program is free software: you can redistribute it and/or modify
9-
# it under the terms of the GNU General Public License as published by
10-
# the Free Software Foundation, either version 3 of the License, or
11-
# (at your option) any later version.
12-
#
13-
# This program is distributed in the hope that it will be useful,
14-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
# GNU General Public License for more details.
17-
#
18-
# You should have received a copy of the GNU General Public License
19-
# along with this program. If not, see <http://www.gnu.org/licenses/>
20-
#
21-
##############################################################################
2+
# © 2016 Serpent Consulting Services Pvt. Ltd. ([email protected])
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
224

235
from . import models
246
from . import wizard
7+
from . import tests
8+
from .hooks import uninstall_hook

mass_editing/__openerp__.py

Lines changed: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,26 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# This module uses OpenERP, Open Source Management Solution Framework.
5-
# Copyright (C):
6-
# 2012-Today Serpent Consulting Services (<http://www.serpentcs.com>)
7-
#
8-
# This program is free software: you can redistribute it and/or modify
9-
# it under the terms of the GNU General Public License as published by
10-
# the Free Software Foundation, either version 3 of the License, or
11-
# (at your option) any later version.
12-
#
13-
# This program is distributed in the hope that it will be useful,
14-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
# GNU General Public License for more details.
17-
#
18-
# You should have received a copy of the GNU General Public License
19-
# along with this program. If not, see <http://www.gnu.org/licenses/>
20-
#
21-
##############################################################################
2+
# © 2016 Serpent Consulting Services Pvt. Ltd. ([email protected])
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
224
{
23-
"name": "Mass Editing",
24-
"version": "8.0.1.3.0",
25-
"author": "Serpent Consulting Services,Odoo Community Association (OCA)",
26-
"contributors": [
27-
"Oihane Crucelaegui <[email protected]>",
5+
'name': 'Mass Editing',
6+
'version': '9.0.1.0.0',
7+
'author': 'Serpent Consulting Services Pvt. Ltd., '
8+
'Odoo Community Association (OCA)',
9+
'contributors': [
10+
'Oihane Crucelaegui <[email protected]>',
11+
'Serpent Consulting Services Pvt. Ltd. <[email protected]>',
2812
],
29-
"category": "Tools",
30-
"website": "http://www.serpentcs.com",
31-
"license": "GPL-3 or any later version",
32-
"description": """
33-
This module provides the functionality to add, update or remove the values
34-
of more than one records on the fly at the same time.
35-
You can configure mass editing for any OpenERP model.
36-
The video explaining the features and how-to for OpenERP Version 6
37-
is here http://t.co/wukYMx1A
38-
The video explaining the features and how-to for OpenERP Version 7 is
39-
here : http://www.youtube.com/watch?v=9BH0o74A748&feature=youtu.be
40-
For more details/customization/feedback contact us on
41-
42-
""",
13+
'category': 'Tools',
14+
'website': 'http://www.serpentcs.com',
15+
'license': 'GPL-3 or any later version',
16+
'summary': 'Mass Editing',
17+
'uninstall_hook': 'uninstall_hook',
4318
'depends': ['base'],
4419
'data': [
45-
"security/ir.model.access.csv",
20+
'security/ir.model.access.csv',
4621
'views/mass_editing_view.xml',
4722
],
48-
'installable': False,
49-
'application': True,
23+
'installable': True,
24+
'application': False,
5025
'auto_install': False,
5126
}

mass_editing/hooks.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
# © 2016 Serpent Consulting Services Pvt. Ltd. ([email protected])
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
5+
6+
def uninstall_hook(cr, registry):
7+
cr.execute("""SELECT id FROM ir_act_window
8+
WHERE res_model = 'mass.editing.wizard'""")
9+
for res in cr.dictfetchall():
10+
value = 'ir.actions.act_window,%s' % res.get('id')
11+
cr.execute("DELETE FROM ir_values WHERE value = '%s'" % value)
12+
return True

mass_editing/i18n/de.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,25 @@ msgid "Remove the contextual action to use this template on related documents"
124124
msgstr ""
125125

126126
#. module: mass_editing
127-
#: field:mass.object,ref_ir_act_window:0
127+
#: field:mass.object,ref_ir_act_window_id:0
128128
msgid "Sidebar Action"
129129
msgstr "Sidebar-Aktion"
130130

131131
#. module: mass_editing
132132
#: view:mass.object:mass_editing.view_mass_object_form
133-
#: field:mass.object,ref_ir_value:0
133+
#: field:mass.object,ref_ir_value_id:0
134134
msgid "Sidebar Button"
135135
msgstr "Sidebar-Button"
136136

137137
#. module: mass_editing
138-
#: help:mass.object,ref_ir_act_window:0
138+
#: help:mass.object,ref_ir_act_window_id:0
139139
msgid ""
140140
"Sidebar action to make this template available on records "
141141
"of the related document model"
142142
msgstr ""
143143

144144
#. module: mass_editing
145-
#: help:mass.object,ref_ir_value:0
145+
#: help:mass.object,ref_ir_value_id:0
146146
msgid "Sidebar button to open the sidebar action"
147147
msgstr "Siebar-Button zum Öffnen einer Sidebar-Aktion"
148148

mass_editing/i18n/es.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,25 @@ msgid "Remove the contextual action to use this template on related documents"
124124
msgstr ""
125125

126126
#. module: mass_editing
127-
#: field:mass.object,ref_ir_act_window:0
127+
#: field:mass.object,ref_ir_act_window_id:0
128128
msgid "Sidebar Action"
129129
msgstr "Acción del menú contextual"
130130

131131
#. module: mass_editing
132132
#: view:mass.object:mass_editing.view_mass_object_form
133-
#: field:mass.object,ref_ir_value:0
133+
#: field:mass.object,ref_ir_value_id:0
134134
msgid "Sidebar Button"
135135
msgstr "Botón del menú contextual"
136136

137137
#. module: mass_editing
138-
#: help:mass.object,ref_ir_act_window:0
138+
#: help:mass.object,ref_ir_act_window_id:0
139139
msgid ""
140140
"Sidebar action to make this template available on records "
141141
"of the related document model"
142142
msgstr ""
143143

144144
#. module: mass_editing
145-
#: help:mass.object,ref_ir_value:0
145+
#: help:mass.object,ref_ir_value_id:0
146146
msgid "Sidebar button to open the sidebar action"
147147
msgstr "Botón del menú contextual para abrir la acción del menú contextual"
148148

mass_editing/i18n/fr.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,25 @@ msgid "Remove the contextual action to use this template on related documents"
125125
msgstr ""
126126

127127
#. module: mass_editing
128-
#: field:mass.object,ref_ir_act_window:0
128+
#: field:mass.object,ref_ir_act_window_id:0
129129
msgid "Sidebar Action"
130130
msgstr ""
131131

132132
#. module: mass_editing
133133
#: view:mass.object:mass_editing.view_mass_object_form
134-
#: field:mass.object,ref_ir_value:0
134+
#: field:mass.object,ref_ir_value_id:0
135135
msgid "Sidebar Button"
136136
msgstr ""
137137

138138
#. module: mass_editing
139-
#: help:mass.object,ref_ir_act_window:0
139+
#: help:mass.object,ref_ir_act_window_id:0
140140
msgid ""
141141
"Sidebar action to make this template available on records "
142142
"of the related document model"
143143
msgstr ""
144144

145145
#. module: mass_editing
146-
#: help:mass.object,ref_ir_value:0
146+
#: help:mass.object,ref_ir_value_id:0
147147
msgid "Sidebar button to open the sidebar action"
148148
msgstr ""
149149

mass_editing/i18n/fr_CA.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,25 @@ msgid "Remove the contextual action to use this template on related documents"
125125
msgstr ""
126126

127127
#. module: mass_editing
128-
#: field:mass.object,ref_ir_act_window:0
128+
#: field:mass.object,ref_ir_act_window_id:0
129129
msgid "Sidebar Action"
130130
msgstr "Action du menu latéral"
131131

132132
#. module: mass_editing
133133
#: view:mass.object:mass_editing.view_mass_object_form
134-
#: field:mass.object,ref_ir_value:0
134+
#: field:mass.object,ref_ir_value_id:0
135135
msgid "Sidebar Button"
136136
msgstr "Bouton du menu latéral"
137137

138138
#. module: mass_editing
139-
#: help:mass.object,ref_ir_act_window:0
139+
#: help:mass.object,ref_ir_act_window_id:0
140140
msgid ""
141141
"Sidebar action to make this template available on records "
142142
"of the related document model"
143143
msgstr ""
144144

145145
#. module: mass_editing
146-
#: help:mass.object,ref_ir_value:0
146+
#: help:mass.object,ref_ir_value_id:0
147147
msgid "Sidebar button to open the sidebar action"
148148
msgstr ""
149149

mass_editing/i18n/it.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,25 @@ msgid "Remove the contextual action to use this template on related documents"
124124
msgstr ""
125125

126126
#. module: mass_editing
127-
#: field:mass.object,ref_ir_act_window:0
127+
#: field:mass.object,ref_ir_act_window_id:0
128128
msgid "Sidebar Action"
129129
msgstr ""
130130

131131
#. module: mass_editing
132132
#: view:mass.object:mass_editing.view_mass_object_form
133-
#: field:mass.object,ref_ir_value:0
133+
#: field:mass.object,ref_ir_value_id:0
134134
msgid "Sidebar Button"
135135
msgstr ""
136136

137137
#. module: mass_editing
138-
#: help:mass.object,ref_ir_act_window:0
138+
#: help:mass.object,ref_ir_act_window_id:0
139139
msgid ""
140140
"Sidebar action to make this template available on records "
141141
"of the related document model"
142142
msgstr ""
143143

144144
#. module: mass_editing
145-
#: help:mass.object,ref_ir_value:0
145+
#: help:mass.object,ref_ir_value_id:0
146146
msgid "Sidebar button to open the sidebar action"
147147
msgstr ""
148148

0 commit comments

Comments
 (0)