Files
odoo_source/addons/website_rating/models/rating.py
T
Jérome Maes ccf869a83e [ADD] website_rating: generic rating management on chatter frontend
Extend new dynamic chatter to manage rating
when posting comment.

The model should inherit of rating.mixin and
its frontend chatter should allow rating to enjoy
star widget and rating card.

This is more generic : stats, rating, ... are manage
in one place (this module) for all document.
2017-06-30 11:07:00 +02:00

13 lines
432 B
Python

# -*- coding: utf-8 -*-
from odoo import fields, models
class Rating(models.Model):
_inherit = 'rating.rating'
# Add this related field to mail.message for performance reason
# This field may one day be deplaced to another module (like 'website_rating') if it is required for
# another usage not related to website_sale.
website_published = fields.Boolean(related='message_id.website_published', store=True)