diff options
| author | Thibault Delavallée <tde@openerp.com> | 2015-03-30 12:52:26 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-04-27 10:36:15 +0200 |
| commit | 4b122ad41d873febe288ab1f8c6cdc078ca2a479 (patch) | |
| tree | 9792fcbc0c61274ca6296e3ce6c2f67a2467b377 /addons/project_issue | |
| parent | b7f04278bd5375d6dc21a3381df91c725bb2fd44 (diff) | |
[MIGR] mail: migration to the new API
Diffstat (limited to 'addons/project_issue')
| -rw-r--r-- | addons/project_issue/project_issue.py | 7 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_data.xml | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 2bba5e6ef32..fa22f9cd888 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -1,4 +1,4 @@ - #-*- coding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution @@ -411,6 +411,7 @@ class project_issue(osv.Model): return 'project_issue.mt_issue_stage' return super(project_issue, self)._track_subtype(cr, uid, ids, init_values, context=context) + @api.cr_uid_context def message_get_reply_to(self, cr, uid, ids, default=None, context=None): """ Override to get the reply_to of the parent project. """ issues = self.browse(cr, SUPERUSER_ID, ids, context=context) @@ -450,13 +451,13 @@ class project_issue(osv.Model): return res_id @api.cr_uid_ids_context - def message_post(self, cr, uid, thread_id, body='', subject=None, type='notification', subtype=None, parent_id=False, attachments=None, context=None, content_subtype='html', **kwargs): + def message_post(self, cr, uid, thread_id, subtype=None, context=None, **kwargs): """ Overrides mail_thread message_post so that we can set the date of last action field when a new message is posted on the issue. """ if context is None: context = {} - res = super(project_issue, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, content_subtype=content_subtype, **kwargs) + res = super(project_issue, self).message_post(cr, uid, thread_id, subtype=subtype, context=context, **kwargs) if thread_id and subtype: self.write(cr, SUPERUSER_ID, thread_id, {'date_action_last': fields.datetime.now()}, context=context) return res diff --git a/addons/project_issue/project_issue_data.xml b/addons/project_issue/project_issue_data.xml index 49854c43257..f321afa931c 100644 --- a/addons/project_issue/project_issue_data.xml +++ b/addons/project_issue/project_issue_data.xml @@ -6,7 +6,7 @@ <record model="mail.message" id="module_install_notification"> <field name="model">mail.group</field> <field name="res_id" ref="mail.group_all_employees"/> - <field name="type">notification</field> + <field name="message_type">notification</field> <field name="subtype_id" ref="mail.mt_comment"/> <field name="subject">Issue Tracker application installed!</field> <field name="body"><