From 63f989735f04a32e64fe6b3a6c2d478e523f7a89 Mon Sep 17 00:00:00 2001 From: "tfr@openerp.com" <> Date: Mon, 16 May 2011 11:32:16 +0200 Subject: [PATCH] [FIX] email to notify not required bzr revid: tfr@openerp.com-20110516093216-iu61m6xlx1vi4i47 --- addons/import_base/import_framework.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/import_base/import_framework.py b/addons/import_base/import_framework.py index b2b0c9a7494..0e4f4c00b7f 100644 --- a/addons/import_base/import_framework.py +++ b/addons/import_base/import_framework.py @@ -47,7 +47,7 @@ class import_framework(Thread): """ DO_NOT_FIND_DOMAIN = [('id', '=', 0)] - def __init__(self, obj, cr, uid, instance_name, module_name, email_to_notify, context): + def __init__(self, obj, cr, uid, instance_name, module_name, email_to_notify=False, context=None): Thread.__init__(self) self.obj = obj self.cr = cr @@ -370,6 +370,8 @@ class import_framework(Thread): imported.add(dependency) def _send_notification_email(self, result): + if not self.email: + return subject = "Openerp has finish to import your data at %s" % self.date_ended tools.email_send( 'import_sugarcrm@module.openerp',