diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index ef01533adaa..84d48e1387a 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -137,13 +137,13 @@ class email_template(osv.osv): 'model': fields.related('model_id','model', type='char', string='Related Document Model', size=128, select=True, store=True, readonly=True), # we need a separate m2m table to avoid ID collisions with the original mail.message entries - 'attachment_ids': fields.many2many('ir.attachment', 'email_template_attachment_rel', 'email_template_id', - 'attachment_id', 'Files to attach', - help="You may attach files to this template, to be added to all " - "emails created from this template"), + #'attachment_ids': fields.many2many('ir.attachment', 'email_template_attachment_rel', 'email_template_id', + # 'attachment_id', 'Files to attach', + # help="You may attach files to this template, to be added to all " + # "emails created from this template"), # Overridden mail.message.common fields to make tooltips more appropriate: - 'subject':fields.char('Subject', size=512, translate=True, help="Subject (placeholders may be used here)",), + #'subject':fields.char('Subject', size=512, translate=True, help="Subject (placeholders may be used here)",), 'email_from': fields.char('From', size=128, help="Sender address (placeholders may be used here)"), 'email_to': fields.char('To', size=256, help="Comma-separated recipient addresses (placeholders may be used here)"), 'email_cc': fields.char('Cc', size=256, help="Carbon copy recipients (placeholders may be used here)"), @@ -151,13 +151,13 @@ class email_template(osv.osv): 'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing Mail Server', readonly=False, help="Optional preferred server for outgoing mails. If not set, the highest " "priority one will be used."), - 'body': fields.text('Text Contents', translate=True, help="Plaintext version of the message (placeholders may be used here)"), + #'body': fields.text('Text Contents', translate=True, help="Plaintext version of the message (placeholders may be used here)"), 'body_html': fields.text('Rich-text Contents', translate=True, help="Rich-text/HTML version of the message (placeholders may be used here)"), - 'message_id': fields.char('Message-Id', size=256, help="Message-ID SMTP header to use in outgoing messages based on this template. " - "Please note that this overrides the 'Resource Tracking' option, " - "so if you simply need to track replies to outgoing emails, enable " - "that option instead.\n" - "Placeholders must be used here, as this value always needs to be unique!"), + #'message_id': fields.char('Message-Id', size=256, help="Message-ID SMTP header to use in outgoing messages based on this template. " + # "Please note that this overrides the 'Resource Tracking' option, " + # "so if you simply need to track replies to outgoing emails, enable " + # "that option instead.\n" + # "Placeholders must be used here, as this value always needs to be unique!"), # Fake fields used to implement the placeholder assistant 'model_object_field': fields.many2one('ir.model.fields', string="Field", diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index a722dca3797..5de34d18f42 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -169,6 +169,7 @@ class mail_message(osv.Model): self.pool.get(model).check_access_rule(cr, uid, mids, mode, context=context) def create(self, cr, uid, values, context=None): + print values newid = super(mail_message, self).create(cr, uid, values, context) self.check(cr, uid, [newid], mode='create', context=context) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 833bba056ec..1def02bd5fa 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -757,7 +757,7 @@ class mail_thread(osv.Model): context = context or {} attachments = attachments or {} if type(res_id) in (list, tuple): - res_id = res_id[0] + res_id = res_id and res_id[0] or False to_attach = [] for fname, fcontent in attachments: diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py index a8bff6213d7..1c8ac5934fc 100644 --- a/addons/procurement/schedulers.py +++ b/addons/procurement/schedulers.py @@ -54,7 +54,6 @@ class procurement_order(osv.osv): ''' if context is None: context = {} - try: if use_new_cursor: cr = pooler.get_db(use_new_cursor).cursor() @@ -119,19 +118,6 @@ class procurement_order(osv.osv): offset += len(ids) if not ids: break end_date = fields.datetime.now() - if uid: - # Chatter: old res.request is now a chatter on res.users, id=uid - summary = _("""Here is the procurement scheduling report. - - Start Time: %s - End Time: %s - Total Procurements processed: %d - Procurements with exceptions: %d - Skipped Procurements (scheduled date outside of scheduler range) %d - - Exceptions:\n""") % (start_date, end_date, report_total, report_except, report_later) - summary += '\n'.join(report) - procurement_obj.message_post(cr, uid, ids, body=summary, context=context) if use_new_cursor: cr.commit()