Last active
June 6, 2019 14:18
-
-
Save pga-odoo/c3498e3ba31c6c84ae3b1d210713a88f to your computer and use it in GitHub Desktop.
Odoo Debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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