[CLEAN] Removed commented print
bzr revid: tde@openerp.com-20140415144943-ov6g4n9tzjxtwlk9
This commit is contained in:
parent
86e325b9f2
commit
98472d8253
|
@ -76,7 +76,6 @@ class mail_message(osv.Model):
|
||||||
_message_read_more_limit = 1024
|
_message_read_more_limit = 1024
|
||||||
|
|
||||||
def default_get(self, cr, uid, fields, context=None):
|
def default_get(self, cr, uid, fields, context=None):
|
||||||
# print '\tmail_message: default_get on', fields
|
|
||||||
# protection for `default_type` values leaking from menu action context (e.g. for invoices)
|
# protection for `default_type` values leaking from menu action context (e.g. for invoices)
|
||||||
if context and context.get('default_type') and context.get('default_type') not in self._columns['type'].selection:
|
if context and context.get('default_type') and context.get('default_type') not in self._columns['type'].selection:
|
||||||
context = dict(context, default_type=None)
|
context = dict(context, default_type=None)
|
||||||
|
|
|
@ -202,8 +202,6 @@ class mail_compose_message(osv.TransientModel):
|
||||||
email(s), rendering any template patterns on the fly if needed. """
|
email(s), rendering any template patterns on the fly if needed. """
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
# import datetime
|
|
||||||
# print '--> beginning sending email', datetime.datetime.now()
|
|
||||||
|
|
||||||
# clean the context (hint: mass mailing sets some default values that
|
# clean the context (hint: mass mailing sets some default values that
|
||||||
# could be wrongly interpreted by mail_mail)
|
# could be wrongly interpreted by mail_mail)
|
||||||
|
@ -225,9 +223,6 @@ class mail_compose_message(osv.TransientModel):
|
||||||
else:
|
else:
|
||||||
res_ids = [wizard.res_id]
|
res_ids = [wizard.res_id]
|
||||||
|
|
||||||
# print '----> before computing values', datetime.datetime.now()
|
|
||||||
# print '----> after computing values', datetime.datetime.now()
|
|
||||||
|
|
||||||
sliced_res_ids = [res_ids[i:i + self._batch_size] for i in range(0, len(res_ids), self._batch_size)]
|
sliced_res_ids = [res_ids[i:i + self._batch_size] for i in range(0, len(res_ids), self._batch_size)]
|
||||||
for res_ids in sliced_res_ids:
|
for res_ids in sliced_res_ids:
|
||||||
all_mail_values = self.get_mail_values(cr, uid, wizard, res_ids, context=context)
|
all_mail_values = self.get_mail_values(cr, uid, wizard, res_ids, context=context)
|
||||||
|
@ -244,7 +239,6 @@ class mail_compose_message(osv.TransientModel):
|
||||||
mail_create_nosubscribe=True) # add context key to avoid subscribing the author
|
mail_create_nosubscribe=True) # add context key to avoid subscribing the author
|
||||||
active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **mail_values)
|
active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **mail_values)
|
||||||
|
|
||||||
# print '--> finished sending email', datetime.datetime.now()
|
|
||||||
return {'type': 'ir.actions.act_window_close'}
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
|
|
||||||
def get_mail_values(self, cr, uid, wizard, res_ids, context=None):
|
def get_mail_values(self, cr, uid, wizard, res_ids, context=None):
|
||||||
|
|
Loading…
Reference in New Issue