Customer Rating

rating
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/rating
VERSION
VERSION 1.1
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Thibault Delavallée, Alexandre Kühn, Julien Castiaux, Victor Feyens, Sébastien Theys, Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, tsm-odoo, Victor Piryns (pivi), Dylan Kiss (dyki), maad-odoo, Maryam Kia, jorv-odoo, Krzysztof Magusiak (krma), nees-odoo, Giorgio Tocco (gito), Kevin Gerard (kege), pmah-odoo, saurabh, Fanyang Meng (fame), ELCO
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:39
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_invalid_partner Not allows to rating ir.ui.view qweb New
rating_external_page_submit Rate our Services ir.ui.view qweb New
rating_external_page_view Thanks for your Feedback ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_form_text rating.rating.view.form.text rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_kanban_stars rating.rating.view.kanban.stars rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.list rating.rating list New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get website
Models touched (5)

New fields (3)
  • rating_id Many2one → rating.rating
    compute='_compute_rating_id' args: 'rating.rating'
  • rating_ids One2many → rating.rating
    string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (1)
  • rating_ids One2many → rating.rating
    bypass_search_access=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'res_id'
Public methods (4)
  • message_post(self, **kwargs)
  • rating_apply(self, rate, token=None, rating=None, feedback=None, subtype_xmlid=None, notify_delay_send=False)
    Apply a rating to the record. This rating can either be linked to a token (customer flow) or directly a rating record (code flow). If the current model inherits from mail.thread mixin a message is posted on its chatter. User going through this method should have at least employee rights as well as rights on the current record because of rating manipulation and chatter post (either employee, either sudo-ed in public controllers after security check granting access). :param float rate: the rating value to apply (from 0 to 5); :param string token: access token to fetch the rating to apply (optional); :param record rating: rating.rating to apply (if no token); :param string feedback: additional feedback (plaintext); :param string subtype_xmlid: xml id of a valid mail.message.subtype used to post the message (if it applies). If not given a classic comment is posted; :param notify_delay_send: Delay the sending by 2 hours of the email so the user can still change his feedback. If False, the email will be sent immediately. :returns: rating.rating record
  • rating_send_request(self, template, lang=False, force_send=True)
    This method send rating request by email, using a template given in parameter. :param record template: a mail.template record used to compute the message body; :param str lang: optional lang; it can also be specified directly on the template itself in the lang field; :param bool force_send: whether to send the request directly or use the mail queue cron (preferred option);
  • unlink(self)
    When removing a record, its rating should be deleted too.

New fields (8)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_text Selection
    compute='_compute_rating_avg_text' compute_sudo=True groups='base.group_user' args: rating_data.RATING_TEXT
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_text Selection
    groups='base.group_user' related='rating_ids.rating_text' string='Rating Text'
  • rating_last_value Float
    aggregator='avg' compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
  • rating_percentage_satisfaction Float
    compute='_compute_rating_satisfaction' compute_sudo=True args: 'Rating Satisfaction'
Public methods (3)
  • rating_get_grades(self, domain=None)
    Get the repartitions of rating grade for the given res_ids. :param domain: Optional domain of the rating to include/exclude in the grades computation. :returns: A dictionary where the key is the rating and the value is the count of unique ``(res_model, res_id)`` pairs whose grades are associated with that rating. The rates are: * ``"great"``, graded between 70 and 100 * ``"okay"``, graded between 31 and 69 * ``"bad"``, graded between 0 and 30 :rtype: dict[typing.Literal["great", "okay", "bad"], int]
  • rating_get_stats(self, domain=None)
    Get the statistics of the rating repartitions :param domain : optional domain of the rating to include/exclude in statistic computation :returns: A dictionnary where: - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • write(self, vals)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (5)
  • rating_avg Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_percentage Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' args: 'Average Rating (%)'
  • rating_count Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True string='# Ratings'
  • rating_ids One2many → rating.rating
    bypass_search_access=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (24)
  • access_token Char
    default=_default_access_token args: 'Security Token'
  • consumed Boolean
    string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • rated_on Datetime
    string='Rated On'
  • rated_partner_id Many2one → res.partner
    string='Rated Operator' args: 'res.partner'
  • rated_partner_name Char
    related='rated_partner_id.name'
  • rating Float
    aggregator='avg' default=0 string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_image_url Char
    compute='_compute_rating_image' args: 'Image URL'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: rating_data.RATING_TEXT
  • res_id Many2oneReference
    index=True model_field='res_model' required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, vals_list)
    @api.model_create_multi
  • reset(self)
  • unlink(self)
  • write(self, vals)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/rating
VERSION
VERSION 1.1
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Odoo Online, Andreas Perhab, Sébastien Theys, Julien Mougenot, Tiffany Chang (tic), Gorash, Didier (did), Vincent Larcin, bve-odoo, Louis Wicket (wil), tsm-odoo, Dylan Kiss (dyki), Xavier Bol (xbo), omra-odoo, shag-odoo, Jay Savaliya, Maryam Kia, jorv-odoo, Louis (wil), nees-odoo, gito-odoo, pmah-odoo, Fanyang Meng (fame)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:52
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_invalid_partner Not allows to rating ir.ui.view qweb New
rating_external_page_submit Rate our Services ir.ui.view qweb New
rating_external_page_view Thanks for your Feedback ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_form_complete rating.rating.view.form.complete rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_form_text rating.rating.view.form.text rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_kanban_stars rating.rating.view.kanban.stars rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.list rating.rating list New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get website
Models touched (5)

New fields (3)
  • rating_id Many2one → rating.rating
    compute='_compute_rating_id' args: 'rating.rating'
  • rating_ids One2many → rating.rating
    string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (1)
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'res_id'
Public methods (4)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • rating_apply(self, rate, token=None, rating=None, feedback=None, subtype_xmlid=None, notify_delay_send=False)
    Apply a rating to the record. This rating can either be linked to a token (customer flow) or directly a rating record (code flow). If the current model inherits from mail.thread mixin a message is posted on its chatter. User going through this method should have at least employee rights as well as rights on the current record because of rating manipulation and chatter post (either employee, either sudo-ed in public controllers after security check granting access). :param float rate: the rating value to apply (from 0 to 5); :param string token: access token to fetch the rating to apply (optional); :param record rating: rating.rating to apply (if no token); :param string feedback: additional feedback (plaintext); :param string subtype_xmlid: xml id of a valid mail.message.subtype used to post the message (if it applies). If not given a classic comment is posted; :param notify_delay_send: Delay the sending by 2 hours of the email so the user can still change his feedback. If False, the email will be sent immediately. :returns rating: rating.rating record
  • rating_send_request(self, template, lang=False, force_send=True)
    This method send rating request by email, using a template given in parameter. :param record template: a mail.template record used to compute the message body; :param str lang: optional lang; it can also be specified directly on the template itself in the lang field; :param bool force_send: whether to send the request directly or use the mail queue cron (preferred option);
  • unlink(self)
    When removing a record, its rating should be deleted too.

New fields (8)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_text Selection
    compute='_compute_rating_avg_text' compute_sudo=True groups='base.group_user' args: rating_data.RATING_TEXT
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_text Selection
    groups='base.group_user' related='rating_ids.rating_text' string='Rating Text'
  • rating_last_value Float
    aggregator='avg' compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
  • rating_percentage_satisfaction Float
    compute='_compute_rating_satisfaction' compute_sudo=True args: 'Rating Satisfaction'
Public methods (3)
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (5)
  • rating_avg Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_percentage Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' args: 'Average Rating (%)'
  • rating_count Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True string='# Ratings'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (23)
  • access_token Char
    default=_default_access_token args: 'Security Token'
  • consumed Boolean
    string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    string='Rated Operator' args: 'res.partner'
  • rated_partner_name Char
    related='rated_partner_id.name'
  • rating Float
    aggregator='avg' default=0 string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_image_url Char
    compute='_compute_rating_image' args: 'Image URL'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: rating_data.RATING_TEXT
  • res_id Many2oneReference
    index=True model_field='res_model' required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, vals_list)
    @api.model_create_multi
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/rating
VERSION
VERSION 1.1
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Thibault Delavallée, Barad Mahendra, Odoo Online, Alexandre Kühn, Sébastien Theys, std-odoo, Prakash Prajapati, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, Didier (did), bve-odoo, damr, Louis Wicket (wil), tsm-odoo, Dylan Kiss (dyki), Bruno Boi, Michael (mcm), Xavier Bol (xbo), Noe Antoine, jorv-odoo, Louis (wil), kais-odoo, nees-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:04
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_submit Rate our Services ir.ui.view qweb New
rating_external_page_view Thanks for your Feedback ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_form_complete rating.rating.view.form.complete rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_form_text rating.rating.view.form.text rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_kanban_stars rating.rating.view.kanban.stars rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get website
Models touched (5)

New fields (2)
  • rating_ids One2many → rating.rating
    groups='base.group_user' string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (1)
  • message_format(self, format_reply=True, msg_vals=None)

New fields (1)
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'res_id'
Public methods (4)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)
  • rating_apply(self, rate, token=None, rating=None, feedback=None, subtype_xmlid=None, notify_delay_send=False)
    Apply a rating to the record. This rating can either be linked to a token (customer flow) or directly a rating record (code flow). If the current model inherits from mail.thread mixin a message is posted on its chatter. User going through this method should have at least employee rights as well as rights on the current record because of rating manipulation and chatter post (either employee, either sudo-ed in public controllers after security check granting access). :param float rate: the rating value to apply (from 0 to 5); :param string token: access token to fetch the rating to apply (optional); :param record rating: rating.rating to apply (if no token); :param string feedback: additional feedback (plaintext); :param string subtype_xmlid: xml id of a valid mail.message.subtype used to post the message (if it applies). If not given a classic comment is posted; :param notify_delay_send: Delay the sending by 2 hours of the email so the user can still change his feedback. If False, the email will be sent immediately. :returns rating: rating.rating record
  • rating_send_request(self, template, lang=False, force_send=True)
    This method send rating request by email, using a template given in parameter. :param record template: a mail.template record used to compute the message body; :param str lang: optional lang; it can also be specified directly on the template itself in the lang field; :param bool force_send: whether to send the request directly or use the mail queue cron (preferred option);
  • unlink(self)
    When removing a record, its rating should be deleted too.

New fields (8)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_text Selection
    compute='_compute_rating_avg_text' compute_sudo=True groups='base.group_user' args: rating_data.RATING_TEXT
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_text Selection
    groups='base.group_user' related='rating_ids.rating_text' string='Rating Text'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
  • rating_percentage_satisfaction Float
    compute='_compute_rating_satisfaction' compute_sudo=True args: 'Rating Satisfaction'
Public methods (3)
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (5)
  • rating_avg Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_percentage Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' args: 'Average Rating (%)'
  • rating_count Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True string='# Ratings'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (23)
  • access_token Char
    default=_default_access_token args: 'Security Token'
  • consumed Boolean
    string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    string='Rated Operator' args: 'res.partner'
  • rated_partner_name Char
    related='rated_partner_id.name'
  • rating Float
    default=0 group_operator='avg' string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_image_url Char
    compute='_compute_rating_image' args: 'Image URL'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: rating_data.RATING_TEXT
  • res_id Many2oneReference
    index=True model_field='res_model' required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, vals_list)
    @api.model_create_multi
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/rating
VERSION
VERSION 1.1
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Thibault Delavallée, Xavier ALT, Aaron Bohy, Barad Mahendra, Alexandre Kühn, Romeo Fragomeli, Victor Feyens, Sébastien Theys, Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, Pierre Paridans, Arnaud Joset, William Braeckman, Xavier BOL (xbo), Laurent Stukkens (LTU), Vincent Larcin, bve-odoo, damr, Louis Wicket (wil), tsm-odoo, Kamlesh Pathekar, Zelong Lin, jorv-odoo, Martin Trigaux (mat), Adesh Jolhe (adjo), Thomas Josse
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_submit Rate our Services ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_form_complete rating.rating.view.form.complete rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_form_text rating.rating.view.form.text rating.rating form Inherits rating.rating_rating_view_form
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_kanban_stars rating.rating.view.kanban.stars rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get website
Models touched (5)

New fields (2)
  • rating_ids One2many → rating.rating
    groups='base.group_user' string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (1)
  • message_format(self, format_reply=True)

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)

New fields (9)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_text Selection
    compute='_compute_rating_avg_text' compute_sudo=True groups='base.group_user' args: rating_data.RATING_TEXT
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_text Selection
    groups='base.group_user' related='rating_ids.rating_text' string='Rating Text'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
  • rating_percentage_satisfaction Float
    compute='_compute_rating_satisfaction' compute_sudo=True args: 'Rating Satisfaction'
Public methods (6)
  • rating_apply(self, rate, token=None, rating=None, feedback=None, subtype_xmlid=None, notify_delay_send=False)
    Apply a rating to the record. This rating can either be linked to a token (customer flow) or directly a rating record (code flow). If the current model inherits from mail.thread mixin a message is posted on its chatter. User going through this method should have at least employee rights as well as rights on the current record because of rating manipulation and chatter post (either employee, either sudo-ed in public controllers after security check granting access). :param float rate: the rating value to apply (from 0 to 5); :param string token: access token to fetch the rating to apply (optional); :param record rating: rating.rating to apply (if no token); :param string feedback: additional feedback (plaintext); :param string subtype_xmlid: xml id of a valid mail.message.subtype used to post the message (if it applies). If not given a classic comment is posted; :param notify_delay_send: Delay the sending by 2 hours of the email so the user can still change his feedback. If False, the email will be sent immediately. :returns rating: rating.rating record
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, subtype_id=False, force_send=True, composition_mode='comment', email_layout_xmlid=None)
    This method send rating request by email, using a template given in parameter. :param record template: a mail.template record used to compute the message body; :param str lang: optional lang; it can also be specified directly on the template itself in the lang field; :param int subtype_id: optional subtype to use when creating the message; is a note by default to avoid spamming followers; :param bool force_send: whether to send the request directly or use the mail queue cron (preferred option); :param str composition_mode: comment (message_post) or mass_mail (template.send_mail); :param str email_layout_xmlid: layout used to encapsulate the content when sending email;
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (5)
  • rating_avg Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' search='_search_rating_avg' args: 'Average Rating'
  • rating_avg_percentage Float
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True groups='base.group_user' args: 'Average Rating (%)'
  • rating_count Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True string='# Ratings'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (23)
  • access_token Char
    default=_default_access_token args: 'Security Token'
  • consumed Boolean
    string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    string='Rated Operator' args: 'res.partner'
  • rated_partner_name Char
    related='rated_partner_id.name'
  • rating Float
    default=0 group_operator='avg' string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_image_url Char
    compute='_compute_rating_image' args: 'Image URL'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: rating_data.RATING_TEXT
  • res_id Many2oneReference
    index=True model_field='res_model' required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, vals_list)
    @api.model_create_multi
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Aaron Bohy, Barad Mahendra, Yannick Tivisse, Romain Derie, Xavier-Do, Victor Feyens, Sébastien Theys, Nasreddin (bon), Julien Mougenot, Mathieu Duckerts-Antoine, Kevin Baptiste, Mitali Patel, Vincent Larcin, damr, Carlos Valverde
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_submit Rating Page Submit ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (4)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL sudo website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get sudo website
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL website
/rating/<string:token>/submit_feedback Rating.submit_rating public http post website
Models touched (5)

New fields (2)
  • rating_ids One2many → rating.rating
    groups='base.group_user' string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)

New fields (6)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating Average'
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
Public methods (9)
  • rating_apply(self, rate, token=None, feedback=None, subtype_xmlid=None)
    Apply a rating given a token. If the current model inherits from mail.thread mixin, a message is posted on its chatter. User going through this method should have at least employee rights because of rating manipulation (either employee, either sudo-ed in public controllers after security check granting access). :param float rate : the rating value to apply :param string token : access token :param string feedback : additional feedback :param string subtype_xmlid : xml id of a valid mail.message.subtype :returns rating.rating record
  • rating_get_access_token(self, partner=None)
    Return access token linked to existing ratings, or create a new rating that will create the asked token. An explicit call to access rights is performed as sudo is used afterwards as this method could be used from different sources, notably templates.
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, subtype_id=False, force_send=True, composition_mode='comment', notif_layout=None)
    This method send rating request by email, using a template given in parameter. :param template: a mail.template record used to compute the message body; :param lang: optional lang; it can also be specified directly on the template itself in the lang field; :param subtype_id: optional subtype to use when creating the message; is a note by default to avoid spamming followers; :param force_send: whether to send the request directly or use the mail queue cron (preferred option); :param composition_mode: comment (message_post) or mass_mail (template.send_mail); :param notif_layout: layout used to encapsulate the content when sending email;
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (3)
  • rating_count Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True string='# Ratings'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (22)
  • access_token Char
    default=_default_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    help='Reason of the rating' args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated Operator' args: 'res.partner'
  • rated_partner_name Char
    related='rated_partner_id.name'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 5=Happy' string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: [('top', 'Satisfied'), ('ok', 'Okay'), ('ko', 'Dissatisfied'), ('none', 'No Rating yet')]
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    help='Model of the followed resource' index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, vals_list)
    @api.model_create_multi
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Olivier Dony, Thibault Delavallée, Christophe Simonis, Nicolas Martinelli, Aaron Bohy, Yannick Tivisse, Xavier-Do, jvm-odoo, jerome hanke (jhk), Victor Feyens, Nasreddin (bon), Mathieu Duckerts-Antoine, Arnaud Joset, Kevin Baptiste, Arnaud Baes, Mitali Patel, Vincent Larcin, damr
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
assets_frontend Rating: Frontend Assets ir.ui.view qweb Inherits web.assets_frontend
mail_message_view_form mail.message.view.form.inherit.rating mail.message Inherits mail.mail_message_view_form
rating_external_page_submit Rating Page Submit ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (4)
Route(s)HandlerAuthTypeMethodsFlags
/rate/<string:token>/<int:rate> Rating.action_open_rating public http ALL sudo website
/rate/<string:token>/submit_feedback Rating.action_submit_rating public http post, get sudo website
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL website
/rating/<string:token>/submit_feedback Rating.submit_rating public http post website
Models touched (5)

New fields (2)
  • rating_ids One2many → rating.rating
    groups='base.group_user' string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' compute_sudo=True search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)

New fields (6)
  • rating_avg Float
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating Average'
  • rating_count Integer
    compute='_compute_rating_stats' compute_sudo=True args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    groups='base.group_user' related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    groups='base.group_user' related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True groups='base.group_user' store=True args: 'Rating Last Value'
Public methods (9)
  • rating_apply(self, rate, token=None, feedback=None, subtype_xmlid=None)
    Apply a rating given a token. If the current model inherits from mail.thread mixin, a message is posted on its chatter. User going through this method should have at least employee rights because of rating manipulation (either employee, either sudo-ed in public controllers after security check granting access). :param float rate : the rating value to apply :param string token : access token :param string feedback : additional feedback :param string subtype_xmlid : xml id of a valid mail.message.subtype :returns rating.rating record
  • rating_get_access_token(self, partner=None)
    Return access token linked to existing ratings, or create a new rating that will create the asked token. An explicit call to access rights is performed as sudo is used afterwards as this method could be used from different sources, notably templates.
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, subtype_id=False, force_send=True, composition_mode='comment', notif_layout=None)
    This method send rating request by email, using a template given in parameter. :param template: a mail.template record used to compute the message body; :param lang: optional lang; it can also be specified directly on the template itself in the lang field; :param subtype_id: optional subtype to use when creating the message; is a note by default to avoid spamming followers; :param force_send: whether to send the request directly or use the mail queue cron (preferred option); :param composition_mode: comment (message_post) or mass_mail (template.send_mail); :param notif_layout: layout used to encapsulate the content when sending email;
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (2)
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> groups='base.group_user' string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' compute_sudo=True help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (21)
  • access_token Char
    default=_default_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • create_date Datetime
    string='Submitted on'
  • feedback Text
    help='Reason of the rating' args: 'Comment'
  • is_internal Boolean
    readonly=False related='message_id.is_internal' store=True args: 'Visible Internally Only'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True ondelete='cascade' string='Message' args: 'mail.message'
  • parent_ref Reference
    compute='_compute_parent_ref' readonly=True selection='_selection_target_model' string='Parent Ref'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated Operator' args: 'res.partner'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 5=Happy' string='Rating Value'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: [('satisfied', 'Satisfied'), ('not_satisfied', 'Not satisfied'), ('highly_dissatisfied', 'Highly dissatisfied'), ('no_rating', 'No Rating yet')]
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    help='Model of the followed resource' index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource name'
  • resource_ref Reference
    compute='_compute_resource_ref' readonly=True selection='_selection_target_model' string='Resource Ref'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, values)
    @api.model
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Nicolas Martinelli, Nicolas Lempereur, Yannick Tivisse, qsm-odoo, jem-odoo, Adrian Torres, Xavier-Do, jerome hanke (jhk), Jason Van Malder, Debauche Stéphane, Achraf (abz), David Beguin, Kevin Baptiste
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
rating_external_page_submit Rating Page Submit ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL sudo website
/rating/<string:token>/<int:rate>/submit_feedback Rating.submit_rating public http post sudo website
Models touched (5)

New fields (2)
  • rating_ids One2many → rating.rating
    string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, **kwargs)
    @api.returns('mail.message', <expr>)

New fields (6)
  • rating_avg Float
    compute='_compute_rating_stats' args: 'Rating Average'
  • rating_count Integer
    compute='_compute_rating_stats' args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True store=True args: 'Rating Last Value'
Public methods (10)
  • rating_apply(self, rate, token=None, feedback=None, subtype=None)
    Apply a rating given a token. If the current model inherits from mail.thread mixing, a message is posted on its chatter. :param rate : the rating value to apply :type rate : float :param token : access token :param feedback : additional feedback :type feedback : string :param subtype : subtype for mail :type subtype : string :returns rating.rating record
  • rating_get_access_token(self, partner=None)
  • rating_get_grades(self, domain=None)
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_repartition(self, add_stats=False, domain=None)
    get the repatition of rating grade for the given res_ids. :param add_stats : flag to add stat to the result :type add_stats : boolean :param domain : optional extra domain of the rating to include/exclude in repartition :return dictionnary if not add_stats, the dict is like - key is the rating value (integer) - value is the number of object (res_model, res_id) having the value otherwise, key is the value of the information (string) : either stat name (avg, total, ...) or 'repartition' containing the same dict if add_stats was False.
  • rating_get_stats(self, domain=None)
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, subtype_id=False, force_send=True, composition_mode='comment', notif_layout=None)
    This method send rating request by email, using a template given in parameter. :param template: a mail.template record used to compute the message body; :param lang: optional lang; it can also be specified directly on the template itself in the lang field; :param subtype_id: optional subtype to use when creating the message; is a note by default to avoid spamming followers; :param force_send: whether to send the request directly or use the mail queue cron (preferred option); :param composition_mode: comment (message_post) or mass_mail (template.send_mail); :param notif_layout: layout used to encapsulate the content when sending email;
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (2)
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> string='Ratings' args: 'rating.rating', 'parent_res_id'
  • rating_percentage_satisfaction Integer
    compute='_compute_rating_percentage_satisfaction' help='Percentage of happy ratings' store=False args: 'Rating Satisfaction'
Public methods (0)

No public methods.

New fields (17)
  • access_token Char
    default=_default_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • feedback Text
    help='Reason of the rating' args: 'Comment'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True ondelete='cascade' string='Linked message' args: 'mail.message'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated person' args: 'res.partner'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 10=Happy' string='Rating Number'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: [('satisfied', 'Satisfied'), ('not_satisfied', 'Not satisfied'), ('highly_dissatisfied', 'Highly dissatisfied'), ('no_rating', 'No Rating yet')]
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    help='Model of the followed resource' index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource name'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, values)
    @api.model
  • reset(self)
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Géry Debongnie, GitHub, Yannick Tivisse, Alexandre Kühn, qsm-odoo, jem-odoo, RomainLibert, Nans Lefebvre, fda-odoo, Adrian Torres, XavierDo, Xavier-Do, Kinjal Mehta, Achraf (abz), David Beguin
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
rating_external_page_submit Rating Page Submit ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL sudo
/rating/<string:token>/<int:rate>/submit_feedback Rating.submit_rating public http post sudo
Models touched (4)

New fields (2)
  • rating_ids One2many → rating.rating
    string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' search='_search_rating_value' store=False args: 'Rating Value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, **kwargs)
    @api.multi@api.returns('mail.message', <expr>)

New fields (5)
  • rating_count Integer
    compute='_compute_rating_count' args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    readonly=False related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    readonly=False related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True store=True args: 'Rating Last Value'
Public methods (11)
  • rating_apply(self, rate, token=None, feedback=None, subtype=None)
    @api.multi
    Apply a rating given a token. If the current model inherits from mail.thread mixing, a message is posted on its chatter. :param rate : the rating value to apply :type rate : float :param token : access token :param feedback : additional feedback :type feedback : string :param subtype : subtype for mail :type subtype : string :returns rating.rating record
  • rating_get_access_token(self, partner=None)
  • rating_get_grades(self, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_parent(self)
    Return the parent relation field name Should return a Many2One
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_repartition(self, add_stats=False, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param add_stats : flag to add stat to the result :type add_stats : boolean :param domain : optional extra domain of the rating to include/exclude in repartition :return dictionnary if not add_stats, the dict is like - key is the rating value (integer) - value is the number of object (res_model, res_id) having the value otherwise, key is the value of the information (string) : either stat name (avg, total, ...) or 'repartition' containing the same dict if add_stats was False.
  • rating_get_stats(self, domain=None)
    @api.multi
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, subtype_id=False, force_send=True, composition_mode='comment', notif_layout=None)
    @api.multi
    This method send rating request by email, using a template given in parameter. :param template: a mail.template record used to compute the message body; :param lang: optional lang; it can also be specified directly on the template itself in the lang field; :param subtype_id: optional subtype to use when creating the message; is a note by default to avoid spamming followers; :param force_send: whether to send the request directly or use the mail queue cron (preferred option); :param composition_mode: comment (message_post) or mass_mail (template.send_mail); :param notif_layout: layout used to encapsulate the content when sending email;
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too. If the rated ressource parent is changed we should update the parent_res_id too

New fields (17)
  • access_token Char
    default=new_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • feedback Text
    help='Reason of the rating' args: 'Comment'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True string='Linked message' args: 'mail.message'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True readonly=False related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True ondelete='cascade' args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated person' args: 'res.partner'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 10=Happy' string='Rating Number'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: [('satisfied', 'Satisfied'), ('not_satisfied', 'Not satisfied'), ('highly_dissatisfied', 'Highly dissatisfied'), ('no_rating', 'No Rating yet')]
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    help='Model of the followed resource' index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource name'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, values)
    @api.model
  • new_access_token(self)
    @api.model
  • reset(self)
    @api.multi
  • write(self, values)
    @api.multi
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/11.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Olivier Dony, Denis Ledoux, Christophe Simonis, Xavier Morel, Nicolas Martinelli, Jérome Maes, Aaron Bohy, GitHub, Odoo Online
WEBSITE
WEBSITEhttp://odoo.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:53:42
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
rating_external_page_submit Rating Page Submit ir.ui.view qweb New
rating_external_page_view Rating Page Done ir.ui.view qweb New
rating_rating_view_form rating.rating.form rating.rating form New
rating_rating_view_graph rating.rating.graph rating.rating graph New
rating_rating_view_kanban rating.rating.kanban rating.rating kanban New
rating_rating_view_pivot rating.rating.pivot rating.rating pivot New
rating_rating_view_search rating.rating.search rating.rating search New
rating_rating_view_tree rating.rating.tree rating.rating tree New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL sudo
/rating/<string:token>/<int:rate>/submit_feedback Rating.submit_rating public http post sudo
Models touched (4)

New fields (2)
  • rating_ids One2many → rating.rating
    string='Related ratings' args: 'rating.rating', 'message_id'
  • rating_value Float
    compute='_compute_rating_value' store=True args: 'Rating Value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_post(self, body='', subject=None, message_type='notification', subtype=None, parent_id=False, attachments=None, content_subtype='html', **kwargs)
    @api.multi@api.returns('self', <expr>)

New fields (5)
  • rating_count Integer
    compute='_compute_rating_count' args: 'Rating count'
  • rating_ids One2many → rating.rating
    auto_join=True domain=<expr> string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_feedback Text
    related='rating_ids.feedback' args: 'Rating Last Feedback'
  • rating_last_image Binary
    related='rating_ids.rating_image' args: 'Rating Last Image'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True store=True args: 'Rating Last Value'
Public methods (12)
  • rating_apply(self, rate, token=None, feedback=None, subtype=None)
    @api.multi
    Apply a rating given a token. If the current model inherits from mail.thread mixing, a message is posted on its chatter. :param rate : the rating value to apply :type rate : float :param token : access token :param feedback : additional feedback :type feedback : string :param subtype : subtype for mail :type subtype : string :returns rating.rating record
  • rating_get_access_token(self, partner=None)
  • rating_get_grades(self, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_parent_id(self)
    Return the parent record id
  • rating_get_parent_model_name(self, vals)
    Return the parent model name
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_repartition(self, add_stats=False, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param add_stats : flag to add stat to the result :type add_stats : boolean :param domain : optional extra domain of the rating to include/exclude in repartition :return dictionnary if not add_stats, the dict is like - key is the rating value (integer) - value is the number of object (res_model, res_id) having the value otherwise, key is the value of the information (string) : either stat name (avg, total, ...) or 'repartition' containing the same dict if add_stats was False.
  • rating_get_stats(self, domain=None)
    @api.multi
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, lang=False, force_send=True)
    @api.multi
    This method send rating request by email, using a template given in parameter.
  • unlink(self)
    When removing a record, its rating should be deleted too.
  • write(self, values)
    If the rated ressource name is modified, we should update the rating res_name too.

New fields (17)
  • access_token Char
    default=new_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • feedback Text
    help='Reason of the rating' args: 'Comment'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True string='Linked message' args: 'mail.message'
  • parent_res_id Integer
    index=True args: 'Parent Document'
  • parent_res_model Char
    index=True related='parent_res_model_id.model' store=True args: 'Parent Document Model'
  • parent_res_model_id Many2one → ir.model
    index=True args: 'ir.model', 'Parent Related Document Model'
  • parent_res_name Char
    compute='_compute_parent_res_name' store=True args: 'Parent Document Name'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated person' args: 'res.partner'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 10=Happy' string='Rating'
  • rating_image Binary
    compute='_compute_rating_image' args: 'Image'
  • rating_text Selection
    compute='_compute_rating_text' readonly=True store=True string='Rating' args: [('satisfied', 'Satisfied'), ('not_satisfied', 'Not satisfied'), ('highly_dissatisfied', 'Highly dissatisfied'), ('no_rating', 'No Rating yet')]
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document'
  • res_model Char
    index=True readonly=True related='res_model_id.model' store=True string='Document Model'
  • res_model_id Many2one → ir.model
    help='Model of the followed resource' index=True ondelete='cascade' args: 'ir.model', 'Related Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource name'
Public methods (5)
  • action_open_rated_object(self)
  • create(self, values)
    @api.model
  • new_access_token(self)
    @api.model
  • reset(self)
    @api.multi
  • write(self, values)
    @api.multi
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/10.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Goffin Simon, Cedric Snauwaert, Jérome Maes, Julien Legros, qdp-odoo, Jeremy Kersten, Damien Bouvy, Yannick Tivisse, Denis Vermylen (dve)
WEBSITE
WEBSITEhttp://odoo.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:50:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (10)
XML IDNameModelTypeStatus
assets_backend rating assets ir.ui.view qweb Inherits web.assets_backend
assets_common Rating common assets ir.ui.view qweb Inherits web.assets_common
rating_card Rating Card ir.ui.view qweb New
rating_external_page_submit rating_external_page_submit ir.ui.view qweb New
rating_external_page_view rating_external_page_view ir.ui.view qweb New
rating_star_card Rating Star Widget ir.ui.view qweb New
view_rating_rating_graph rating.rating.graph rating.rating graph New
view_rating_rating_kanban rating.rating.kanban rating.rating kanban New
view_rating_rating_pivot rating.rating.pivot rating.rating pivot New
view_rating_rating_search rating.rating.search rating.rating search New
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/rating/<string:token>/<int:rate> Rating.open_rating public http ALL sudo
/rating/<string:token>/<int:rate>/submit_feedback Rating.submit_rating public http post sudo
Models touched (2)

New fields (3)
  • rating_count Integer
    compute='_compute_rating_count' args: 'Rating count'
  • rating_ids One2many → rating.rating
    domain=<expr> string='Rating' args: 'rating.rating', 'res_id'
  • rating_last_value Float
    compute='_compute_rating_last_value' compute_sudo=True store=True args: 'Rating Last Value'
Public methods (8)
  • rating_apply(self, rate, token=None, feedback=None, subtype=None)
    @api.multi
    Apply a rating given a token. If the current model inherits from mail.thread mixing, a message is posted on its chatter. :param rate : the rating value to apply :type rate : float :param token : access token :param feedback : additional feedback :type feedback : string :param subtype : subtype for mail :type subtype : string :returns rating.rating record
  • rating_get_access_token(self, partner=None)
  • rating_get_grades(self, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_partner_id(self)
  • rating_get_rated_partner_id(self)
  • rating_get_repartition(self, add_stats=False, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param add_stats : flag to add stat to the result :type add_stats : boolean :param domain : optional extra domain of the rating to include/exclude in repartition :return dictionnary if not add_stats, the dict is like - key is the rating value (integer) - value is the number of object (res_model, res_id) having the value otherwise, key is the value of the information (string) : either stat name (avg, total, ...) or 'repartition' containing the same dict if add_stats was False.
  • rating_get_stats(self, domain=None)
    @api.multi
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, partner=None, rated_partner=None, reuse_rating=True, force_send=True)
    @api.multi
    This method send rating request by email, using a template given in parameter.

New fields (10)
  • access_token Char
    default=new_access_token help='Access token to set the rating of the value' args: 'Security Token'
  • consumed Boolean
    help='Enabled if the rating has been filled.' string='Filled Rating'
  • feedback Text
    help='Reason of the rating' args: 'Feedback reason'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True string='Linked message' args: 'mail.message'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated resource' string='Rated Partner' args: 'res.partner'
  • rating Float
    default=0 group_operator='avg' help='Rating value: 0=Unhappy, 10=Happy' string='Rating'
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document ID'
  • res_model Char
    help='Model name of the rated object' index=True required=True string='Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated resource.' store=True string='Resource Name'
Public methods (2)
  • new_access_token(self)
    @api.model
  • reset(self)
    @api.multi
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/9.0/rating
VERSION
VERSION 1.0
CATEGORY
CATEGORYProductivity
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Olivier Dony, Thibault Delavallée, Denis Ledoux, Christophe Simonis, Jérome Maes, Géry Debongnie, Yannick Tivisse
WEBSITE
WEBSITEhttp://odoo.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:48:29
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web_kanban
    - web
    - bus
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows a customer to give rating.

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
assets_backend rating assets ir.ui.view qweb Inherits web.assets_backend
assets_common Rating common assets ir.ui.view qweb Inherits web.assets_common
rating_card Rating Card ir.ui.view qweb New
rating_external_page_view rating_external_page_view ir.ui.view qweb New
rating_star_card Rating Star Widget ir.ui.view qweb New
view_rating_rating_graph rating.rating.graph rating.rating graph New
view_rating_rating_kanban rating.rating.kanban rating.rating kanban New
view_rating_rating_pivot rating.rating.pivot rating.rating pivot New
view_rating_rating_search rating.rating.search rating.rating search New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (1)
  • rating_ids One2many → rating.rating
    domain=<expr> string='Rating' args: 'rating.rating', 'res_id'
Public methods (4)
  • rating_get_grades(self, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param domain : optional domain of the rating to include/exclude in grades computation :return dictionnary where the key is the grade (great, okay, bad), and the value, the number of object (res_model, res_id) having the grade the grade are compute as 0-30% : Bad 31-69%: Okay 70-100%: Great
  • rating_get_repartition(self, add_stats=False, domain=None)
    @api.multi
    get the repatition of rating grade for the given res_ids. :param add_stats : flag to add stat to the result :type add_stats : boolean :param domain : optional extra domain of the rating to include/exclude in repartition :return dictionnary if not add_stats, the dict is like - key is the rating value (integer) - value is the number of object (res_model, res_id) having the value otherwise, key is the value of the information (string) : either stat name (avg, total, ...) or 'repartition' containing the same dict if add_stats was False.
  • rating_get_stats(self, domain=None)
    @api.multi
    get the statistics of the rating repatition :param domain : optional domain of the rating to include/exclude in statistic computation :return dictionnary where - key is the the name of the information (stat name) - value is statistic value : 'percent' contains the repartition in percentage, 'avg' is the average rate and 'total' is the number of rating
  • rating_send_request(self, template, partner_id, rated_partner_id, reuse_rating=True)
    @api.multi
    This method create (empty) rating objects for the current recordsets and send this request by mail (given email template) with the given rated_partner_id and partner_id as recipient and sender of the email. :param template : the email template to send. The res_model of the template must be 'rating.rating'. :type template : mail.template :param res_model : model name of the object to rated_partner_id :type res_model : string :param res_id : id the record to rate :type res_id : int :param partner_id : the recipient partner :type partner : res.partner :param rated_partner_id : the sender partner :type rated_partner_id : res.partner :param reuse_rating : if True, the rating of the current objects will be reset. Otherwise a new rating will be create :type reuse_rating : boolean

New fields (9)
  • access_token Char
    default=new_access_token help='Access token to set the rating of the value' string='Security Token'
  • feedback Text
    help='Reason of the rating' args: 'Feedback reason'
  • message_id Many2one → mail.message
    help='Associated message when posting a review. Mainly used in website addons.' index=True string='Linked message' args: 'mail.message'
  • partner_id Many2one → res.partner
    help='Author of the rating' string='Customer' args: 'res.partner'
  • rated_partner_id Many2one → res.partner
    help='Owner of the rated ressource' string='Rated Partner' args: 'res.partner'
  • rating Float
    default=-1 group_operator='avg' help='Rating value' string='Rating'
  • res_id Integer
    help='Identifier of the rated object' index=True required=True string='Document ID'
  • res_model Char
    help='Model name of the rated object' index=True required=True string='Document Model'
  • res_name Char
    compute='_compute_res_name' help='The name of the rated ressource.' store=True string='Resource Name'
Public methods (3)
  • apply_rating(self, rate, res_model=None, res_id=None, token=None)
    @api.model
    apply a rating for given res_model/res_id or token. If the res_model is a mail.thread object, a message will be posted in the chatter. :param rate : the rating value to apply :type rate : float :param res_id : id of the rated object. :param res_model : name of model. :param token : access token :returns rating.rating record
  • new_access_token(self)
    @api.model
  • reset(self)
    @api.multi