This commit improves the livechat to always allow website visitors to be able to see the operator avatar, regardless of ACLs. Indeed, we currently depend on ACLs and when website is installed, the visibility of the operator avatar depends on his website_published status. Which does not make much sense as it requires extra configuration to make it work. Instead, we now consider that all livechat operators and all chatbot operators have their avatar publicly available, using a custom livechat route. Task-2813529 closes odoo/odoo#89756 X-original-commit: 127bf62a5d701f8d2f1d4b246f55cc8ca8630dcf Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
17 lines
402 B
Python
17 lines
402 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class ChatbotScript(models.Model):
|
|
_inherit = 'chatbot.script'
|
|
|
|
def action_test_script(self):
|
|
self.ensure_one()
|
|
return {
|
|
'type': 'ir.actions.act_url',
|
|
'url': '/chatbot/%s/test' % self.id,
|
|
'target': 'self',
|
|
}
|