Skip to content

Instantly share code, notes, and snippets.

@pga-odoo
Last active June 6, 2019 14:18
Show Gist options
  • Select an option

  • Save pga-odoo/c3498e3ba31c6c84ae3b1d210713a88f to your computer and use it in GitHub Desktop.

Select an option

Save pga-odoo/c3498e3ba31c6c84ae3b1d210713a88f to your computer and use it in GitHub Desktop.
Odoo Debug
var scripts = document.querySelectorAll('head script:not([src])');
var odooDebugInfo = false;
scripts.forEach(function(script) {
var scriptText = script.text;
if (scriptText.trim().startsWith("var odoo =")) {
// For odoo < v11
console.log(window.location);
// For odoo > v12
if (scriptText.includes("debug:")) {
eval(scriptText);
odooDebugInfo = odoo;
}
}
});
console.log(odooDebugInfo); // for v12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment