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 ee688a9..9dcc6d6 100644 --- a/im_notif/__openerp__.py +++ b/im_notif/__openerp__.py @@ -14,4 +14,5 @@ 'im_notif_views.xml', ], 'installable': True + 'uninstall_hook': 'pre_uninstall', }