summaryrefslogtreecommitdiff
path: root/addons/website_mail/models/mail_thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_mail/models/mail_thread.py')
-rw-r--r--addons/website_mail/models/mail_thread.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/addons/website_mail/models/mail_thread.py b/addons/website_mail/models/mail_thread.py
index 34e05b18612..5c0ace6722d 100644
--- a/addons/website_mail/models/mail_thread.py
+++ b/addons/website_mail/models/mail_thread.py
@@ -1,19 +1,13 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from openerp.osv import osv, fields
+from odoo import fields, models
+
# TODO for trunk, remove me
-class MailThread(osv.AbstractModel):
+class MailThread(models.AbstractModel):
_inherit = 'mail.thread'
- _columns = {
- 'website_message_ids': fields.one2many(
- 'mail.message', 'res_id',
- domain=lambda self: [
- '&', ('model', '=', self._name), ('message_type', '=', 'comment')
- ],
- string='Website Messages',
- help="Website communication history",
- ),
- }
+ website_message_ids = fields.One2many('mail.message', 'res_id',
+ domain=lambda self: ['&', ('model', '=', self._name), ('message_type', '=', 'comment')],
+ string='Website Messages', help="Website communication history")