[FIX] website_slides: apply correct domain when viewing ratings
when you open course ratings view, it may show also some project ratings, if project id is same as course id. This commit solves the mentioned problem. Task-2997847 closes odoo/odoo#104057 X-original-commit: 73be65459550470f9839fb4f7c4bb2db65cb37ec Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import uuid
|
||||
from collections import defaultdict
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
import ast
|
||||
|
||||
from odoo import api, fields, models, tools, _
|
||||
from odoo.addons.http_routing.models.ir_http import slug, unslug
|
||||
@@ -791,7 +792,7 @@ class Channel(models.Model):
|
||||
def action_view_ratings(self):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("website_slides.rating_rating_action_slide_channel")
|
||||
action['name'] = _('Rating of %s') % (self.name)
|
||||
action['domain'] = [('res_id', 'in', self.ids)]
|
||||
action['domain'] = expression.AND([ast.literal_eval(action.get('domain', '[]')), [('res_id', 'in', self.ids)]])
|
||||
return action
|
||||
|
||||
def action_request_access(self):
|
||||
|
||||
Reference in New Issue
Block a user