You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
899 B

/** @odoo-module **/
import { WebClient } from "@web/webclient/webclient";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
import { Component, onWillStart } from "@odoo/owl";
patch(WebClient.prototype,{
/**
* Setup method for the WebClient prototype
*/
setup() {
super.setup();
this.orm = useService("orm");
this.state.tawk = null;
/**
* onWillStart hook to perform actions before the component is mounted
*/
onWillStart(async () => {
const property = await this.orm.call("ir.config_parameter", "get_param", ["website_tawk_to.property_id"])
const widget = await this.orm.call("ir.config_parameter", "get_param", ["website_tawk_to.widget_id"])
this.state.property = property
this.state.widget = widget
})
},
});