I need to run some javascript code to check when odoo has ended loading.
I know that querying jQuery.active == 0 does the trick in version 7 but that does not work in odoo because it always keep one connection open for the longpolling.
Does anybody know which web element can I use to check for sure when the interface is fully loaded ?
If I can query the URL of the active jQuery connections that would also do the trick.
I don´t know odoo but I supose that you can wait for a variable in odoo and do this:
function checkodoo() {
if ('undefined' !== typeof odooVariableThatYouWatch ) {
clearInterval(intervalOdoo);
lauchYourStaff();
}
}
var intervalOdoo = setInterval("checkodoo()",100);
If on https://www.odoo.com the variable is openerp
I look the variable here: https://www.odoo.com/documentation/8.0/howtos/web.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With