Skip to content

Instantly share code, notes, and snippets.

View mao-odoo's full-sized avatar

Moens Alexandre mao-odoo

  • Belgium, Grand-Rosière-Hottomont
View GitHub Profile
@mao-odoo
mao-odoo / rpn.py
Last active March 22, 2021 09:01
python rpn with support for unary and ternary operator (+ ready for more )
import inspect
ops = {
"+": lambda a, b: a + b,
"-": lambda a, b: a - b,
"x": lambda a, b: a * b,
"/": lambda a, b: a / b,
"sqrt": lambda a: a ** 0.5,
"ternary_operator": lambda a, b, c: a + b + c + 1,
}
@mao-odoo
mao-odoo / newbie_coach_randomizer.py
Last active March 22, 2021 08:33
Newbie-coach randomizer
# Associate the elements of 2 lists randomly.
# If there are more elements in the second list,
# they are shared among all elements of the first list.
import random
from collections import defaultdict
def newbie_coach_randomizer(coaches, newbies):
random.shuffle(coaches)
random.shuffle(newbies)
@mao-odoo
mao-odoo / rambox_apply_css_to_app.js
Last active August 12, 2020 08:50
rambox app, dark theme for app bar and tabs + custom css in app
function applycss(css){
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.appendChild(document.createTextNode(css));
head.appendChild(s);
}
applycss(`
/* put custom css here */
@mao-odoo
mao-odoo / dirscord_text_to_emoji_oneliner.py
Last active August 12, 2020 08:29
discord emoji text gen
' '.join(f':regional_indicator_{c.lower()}:' if c != ' ' else ' ' for c in 'PUT THE TEXT HERE')
@mao-odoo
mao-odoo / Odoo_SaaS_trial_on_specific_server.md
Last active February 13, 2023 13:19
odoo trial specific server
@mao-odoo
mao-odoo / create_ab.sh
Created May 31, 2019 08:57 — forked from nvn-odoo/create_ab.sh
Creates a database with schema 'a' and schema 'b' containing databases given in parameters
#!/bin/bash
# This tool creates a database $3 from database $1 and database $2
# database $1 will ends in the schema a
# database $2 will ends in the schema b
# this will allow comparisons between two schemas in the same database
if [ "$1" = "" ]; then
echo "USAGE: $0 <DBNAME_A> <DBNAME_B> <DBNAME_AB>" >&2
exit 1
BEGIN;
-- list of projects to act upon
CREATE TABLE tmp_mig_2_helpdesk (pid INT, aliasid INT, stage varchar DEFAULT 'not started yet', time time DEFAULT now());
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (7, 13); --test 1 (113)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (13, 33); --test 2 (113)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (12, 33); --test 1 (114)
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (13, 34); --test 2 (114)
INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (49, 31); -- Help
INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (1276, 1300976); -- PS maintenance
-- INSERT INTO tmp_mig_2_helpdesk (pid, aliasid) VALUES (XXX, XXX); -- [PS] Technical Support
@mao-odoo
mao-odoo / odoo_versions.md
Last active May 12, 2025 10:53
Odoo version timeline - saas vs main version

Current Versions

Major Version SaaS Version Official Release Date Planned End of life Bug fix New On Premise New Odoo Online New Odoo.sh
16.0 October 12th 2022 Q4 2025 🔴
saas-16.1 February 2023 June 2023 🔴 🔴 🔴 🔴
saas-16.2 March 2023 Q4 2023 🔴 🔴 🔴 🔴
saas-16.3 June 2023 Q4 2023 🔴 :red_circ
@mao-odoo
mao-odoo / pudb_debugging_hide_longpolling.markdown
Last active August 12, 2020 08:37
remove longpolling logs

[ODOO]

to remove longpolling logs

add this to startup command

--log-level=warn --log-handler=werkzeug:CRITICAL

@mao-odoo
mao-odoo / noweb_alias.sh
Last active November 11, 2018 10:49 — forked from isakb/install_ni_prefix.sh
alias "noweb" : prefix to disable outgoing web requests for specific commands
# alias "noweb" : prefix for executing scripts without allowing outgoing web requests.
#
# Original idea from http://ubuntuforums.org/showthread.php?t=1188099
#
# no warranties use at own risk
# made for zsh, not tested with other shells
# to prepare for the use of this alias/iptable rule combo :
# groupadd no_web
# usermod -a -G no_web $USER