diff --git a/im_notif/__init__.py b/im_notif/__init__.py index 6ff86bc..38fa180 100644 --- a/im_notif/__init__.py +++ b/im_notif/__init__.py @@ -1 +1,8 @@ import im_notif_models + + +def pre_uninstall(cr, registry): + query = ("UPDATE res_partner " + "SET notify_email = 'always' " + "WHERE notify_email LIKE 'im%';") + cr.execute(query) diff --git a/im_notif/__openerp__.py b/im_notif/__openerp__.py index 33f1606..812ccc3 100644 --- a/im_notif/__openerp__.py +++ b/im_notif/__openerp__.py @@ -13,5 +13,6 @@ 'im_notif_data.xml', 'im_notif_views.xml', ], - 'installable': False + 'installable': False, + 'uninstall_hook': 'pre_uninstall', }