Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
chatbot_script_view_form chatbot.script.view.form.inherit.website.livechat chatbot.script form Inherits im_livechat.chatbot_script_view_form
im_livechat_channel_view_form_add im_livechat.channel.view.form.add im_livechat.channel form New
loader Livechat : include loader on Website ir.ui.view qweb Inherits website.layout
res_config_settings_view_form res.config.settings.view.form.inherit.website.livechat res.config.settings form Inherits website.res_config_settings_view_form
website_visitor_view_form website.visitor.view.form.inherit.website.livechat website.visitor form Inherits website.website_visitor_view_form
website_visitor_view_kanban website.visitor.view.kanban.inherit.website.livechat website.visitor kanban Inherits website.website_visitor_view_kanban
website_visitor_view_search website.visitor.view.search.website.livechat website.visitor search Inherits website.website_visitor_view_search
website_visitor_view_tree website.visitor.view.list.inherit.website.livechat website.visitor list Inherits website.website_visitor_view_tree
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/chatbot/<model("chatbot.script"):chatbot_script>/test WebsiteLivechatChatbotScriptController.chatbot_test_script user http ALL website
Models touched (9)

New fields (0)

No new fields.

Public methods (1)
  • action_test_script(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • is_pending_chat_request Boolean
    args: 'When created from an operator, whether the channel is yet to be opened on the visitor side.'
  • livechat_visitor_id Many2one → website.visitor
    index='btree_not_null' string='Visitor' args: 'website.visitor'
Public methods (2)
  • channel_pin(self, pinned=False)
    Override to clean an empty livechat channel. This is typically called when the operator send a chat request to a website.visitor but don't speak to them and closes the chatter. This allows operators to send the visitor a new chat request. If active empty livechat channel, delete discuss_channel as not useful to keep empty chat
  • message_post(self, **kwargs)
    Override to mark the visitor as still connected. If the message sent is not from the operator (so if it's the visitor or odoobot sending closing chat notification, the visitor last action date is updated.

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • channel_id Many2one → im_livechat.channel
    readonly=False related='website_id.channel_id' string='Website Live Channel' args: 'im_livechat.channel'
Public methods (0)

No public methods.

New fields (1)
  • channel_id Many2one → im_livechat.channel
    string='Website Live Chat Channel' args: 'im_livechat.channel'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • discuss_channel_ids One2many → discuss.channel
    readonly=True string="Visitor's livechat channels" args: 'discuss.channel', 'livechat_visitor_id'
  • livechat_operator_id Many2one → res.partner
    compute='_compute_livechat_operator_id' index='btree_not_null' store=True string='Speaking with' args: 'res.partner'
  • livechat_operator_name Char
    related='livechat_operator_id.name' args: 'Operator Name'
  • session_count Integer
    compute='_compute_session_count' args: '# Sessions'
Public methods (1)
  • action_send_chat_request(self)
    Send a chat request to website_visitor(s). This creates a chat_request and a discuss_channel with livechat active flag. But for the visitor to get the chat request, the operator still has to speak to the visitor. The visitor will receive the chat request the next time he navigates to a website page. (see _handle_webpage_dispatch for next step)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…