flectra/addons/website_rating/models/mail_message.py

16 lines
497 B
Python
Raw Permalink Normal View History

# -*- coding: utf-8 -*-
2018-01-16 11:34:37 +01:00
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
2018-01-16 11:34:37 +01:00
from flectra import api, fields, models
class MailMessage(models.Model):
_inherit = 'mail.message'
@api.multi
def _portal_message_format(self, field_list):
# inlude rating value in data if requested
if self._context.get('rating_include'):
field_list += ['rating_value']
return super(MailMessage, self)._portal_message_format(field_list)