Skip to content

Instantly share code, notes, and snippets.

View pga-odoo's full-sized avatar
🍥
Coding like a Hokage

Parth Gajjar pga-odoo

🍥
Coding like a Hokage
View GitHub Profile
@pga-odoo
pga-odoo / contentScript.js
Last active June 6, 2019 14:18
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);
# -*- 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):
@pga-odoo
pga-odoo / nginx_odoo_multiprocess
Created May 2, 2016 05:08 — forked from funbaker/nginx_odoo_multiprocess
odoo nginx static files
upstream odoo9_xmlrpc {
server <xmlrpc address>;
}
upstream odoo9_longpolling {
server <longpolling address>;
}
server {
listen 80;