Skip to content

Instantly share code, notes, and snippets.

View KangOl's full-sized avatar
📷
Screenshot Debugger

Christophe Simonis KangOl

📷
Screenshot Debugger
View GitHub Profile
@KangOl
KangOl / nus
Last active November 24, 2021 10:23
nus :: new upgrade script
#!/usr/bin/env bash
set -euo pipefail
if [[ -n "${DEBUG:-}" ]]; then
set -x
fi
: "${NUS_ODOO_REPO:=/Users/chs/devel/odoo/odoo/stable}"
: "${NUS_ENT_REPO:=/Users/chs/devel/odoo/enterprise}"
: "${NUS_THEMES_REPO:=/Users/chs/devel/odoo/themes}"

Keybase proof

I hereby claim:

  • I am kangol on github.
  • I am kngl (https://keybase.io/kngl) on keybase.
  • I have a public key ASAedawVbP5LkxbwiR8NbiDUYkk3ISKexXIAiceDwje-6Ao

To claim this, I am signing this object:

// ==UserScript==
// @name odoo-debug-switch
// @namespace odoo.com
// @version 0.1
// @description Add a debug mode switch button in header
// @author @KangOl
// @updateURL https://gist.github.com/KangOl/8913699a426ee98895ce92907918725a/raw/odoo-debug-switch.user.js
// @match https://*.odoo.com/web
// @match https://*.odoo.com/web?*
// @grant none
diff --git odoo/addons/base/res/res_users.py odoo/addons/base/res/res_users.py
index 4514203..a599daf 100644
--- odoo/addons/base/res/res_users.py
+++ odoo/addons/base/res/res_users.py
@@ -623,8 +623,26 @@ class GroupsImplied(models.Model):
if values.get('users') or values.get('implied_ids'):
# add all implied groups (to all users of each group)
for group in self:
- vals = {'users': zip(repeat(4), group.with_context(active_test=False).users.ids)}
- super(GroupsImplied, group.trans_implied_ids).write(vals)
@KangOl
KangOl / _readme.md
Last active December 12, 2017 11:05
Add a reload button on active breadcrumb
# install the editorconfig plugin for your editor: http://editorconfig.org/#download
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
@KangOl
KangOl / _install.md
Last active February 15, 2024 15:01
Change OPW tag to links to the ticket
#!/usr/bin/env bash
set -e -x
pushd "$(git rev-parse --show-toplevel)"
# remove empty directories
find . \( -name "*.~?~" -or -name "*.pyc" -or -name "*.pyo" -or -name "*.orig" -or -name "*.rej" \) -delete
find . -not -path './.git/*' -a -type d -empty -delete
# remove po for removed modules
for D in addons openerp/addons odoo/addons .; do
# install the editorconfig plugin for your editor: http://editorconfig.org/#download
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
@KangOl
KangOl / restore-db.sh
Last active November 16, 2016 10:11
restore-db.sh
#!/usr/bin/env bash
# set -x
set -e
set -o pipefail
if [[ -z "$1" ]];then
echo "Usage: $0 [-k] DB [TO]" >&2
exit 1
fi;