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); |
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
| # -*- coding: utf-8 -*- | |
| def _replace_local_links(self, html, base_url=None): | |
| """ replace the links in style | |
| """ | |
| url = "http://www.example.com" | |
| html = re.sub(r"""(<[^>]+\bstyle="[^"]+\burl\('?)(/[^/'][^'")]+)""", url, html) | |
| return html | |
| def _garbage_collect_attachments(self): |
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
| upstream odoo9_xmlrpc { | |
| server <xmlrpc address>; | |
| } | |
| upstream odoo9_longpolling { | |
| server <longpolling address>; | |
| } | |
| server { | |
| listen 80; |