~opencrea/+junk/aprobio

« back to all changes in this revision

Viewing changes to mass_editing/hooks.py

  • Committer: joannes
  • Date: 2017-05-17 09:40:42 UTC
  • Revision ID: joannes@debian-20170517094042-47q3j6on72w2h1il
community module

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. (support@serpentcs.com)
 
3
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
 
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