# -*- 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', } def _prepare_operator_partner_values(self, name, image): res = super()._prepare_operator_partner_values(name, image) res['is_published'] = True return res