Skip to content

Commit

Permalink
[PORT] mass_editing in V13
Browse files Browse the repository at this point in the history
[REF] Update mass_operation_abstract/wizard/mass_operation_wizard_mixin.py
Co-Authored-By: David Beal <david.beal@akretion.com>
  • Loading branch information
legalsylvain committed Feb 24, 2020
1 parent 6f109d5 commit 274f110
Show file tree
Hide file tree
Showing 45 changed files with 1,465 additions and 830 deletions.
31 changes: 17 additions & 14 deletions mass_editing/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. (support@serpentcs.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Mass Editing',
'version': '12.0.1.0.0',
'author': 'Serpent Consulting Services Pvt. Ltd., '
'Tecnativa, '
'Odoo Community Association (OCA)',
'category': 'Tools',
'website': 'https://github.com/OCA/server-ux',
'license': 'AGPL-3',
'summary': 'Mass Editing',
'uninstall_hook': 'uninstall_hook',
'depends': ['base'],
'data': [
'security/ir.model.access.csv',
'views/mass_editing_view.xml',
"name": "Mass Editing",
"version": "13.0.1.0.0",
"author": "Serpent Consulting Services Pvt. Ltd., "
"Tecnativa, "
"GRAP, "
"Odoo Community Association (OCA)",
"category": "Tools",
"website": "https://github.com/OCA/server-ux",
"license": "AGPL-3",
"summary": "Mass Editing",
"uninstall_hook": "uninstall_hook",
"depends": ["mass_operation_abstract"],
"data": [
"security/ir.model.access.csv",
"views/mass_editing_view.xml",
"wizard/view_mass_editing_wizard.xml",
],
"demo": ["demo/mass_editing.xml"],
}
69 changes: 69 additions & 0 deletions mass_editing/demo/mass_editing.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2019 - 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).
-->
<odoo>

<record id="mass_editing_user" model="mass.editing">
<field name="name">res.user - Mass Editing</field>
<field name="action_name">Mass Edit</field>
<field name="model_id" ref="base.model_res_users"/>
</record>

<record id="mass_editing_user_line_1" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__email"/>
</record>
<record id="mass_editing_user_line_2" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__phone"/>
</record>
<record id="mass_editing_user_line_3" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__category_id"/>
</record>
<record id="mass_editing_user_line_4" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__comment"/>
</record>
<record id="mass_editing_user_line_5" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__country_id"/>
</record>
<record id="mass_editing_user_line_6" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__is_company"/>
</record>
<record id="mass_editing_user_line_7" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__lang"/>
</record>
<record id="mass_editing_user_line_8" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__title"/>
</record>
<record id="mass_editing_user_line_9" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_user"/>
<field name="field_id" ref="base.field_res_users__company_type"/>
</record>


<record id="mass_editing_partner_title" model="mass.editing">
<field name="name">res.partner.title - Mass Editing</field>
<field name="action_name">Mass Edit</field>
<field name="model_id" ref="base.model_res_partner_title"/>
</record>

<!-- <record id="mass_editing_partner_title_line_1" model="mass.editing.line">
<field name="mass_editing_id" ref="mass_editing_partner_title"/>
<field name="field_id" ref="base.field_res_partner_title__abbreviation"/>
</record> -->


<function model="mass.editing" name="enable_mass_operation">
<value eval="[ref('mass_editing_user'), ref('mass_editing_partner_title')]"/>
</function>

</odoo>
8 changes: 4 additions & 4 deletions mass_editing/hooks.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. (support@serpentcs.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.api import Environment, SUPERUSER_ID
from odoo.api import SUPERUSER_ID, Environment


def uninstall_hook(cr, registry):
"""Delete the actions that were created with mass_editing when
the module is uninstalled"""
env = Environment(cr, SUPERUSER_ID, {})
env['ir.actions.act_window'].search([
('res_model', '=', 'mass.editing.wizard')
]).unlink()
env["ir.actions.act_window"].search(
[("res_model", "=", "mass.editing.wizard")]
).unlink()
return True
Loading

0 comments on commit 274f110

Please sign in to comment.