Skip to content

Instantly share code, notes, and snippets.

View blaggacao's full-sized avatar
🚩
Working on an (ad)venture

David Arnold blaggacao

🚩
Working on an (ad)venture
  • Munich
  • 05:05 (UTC +02:00)
View GitHub Profile
@blaggacao
blaggacao / rip-repos-1by1.sh
Created December 6, 2017 22:54
Rip Odoo repos and create 1by1 module repos
#!/bin/bash
SCRIPT=$(realpath -s $0)
SCRIPTPATH=$(dirname $SCRIPT)
urls=$(curl "https://api.github.com/users/$1/repos?page=$2&per_page=100" | grep -e 'git_url*' | cut -d \" -f 4)
gitub_api_token=TOKEN
branch_list="8.0 9.0 10.0 11.0"
@blaggacao
blaggacao / patches.diff
Created December 14, 2017 22:58
Fix polling issue son POS Multisession
addons/bus/static/src/js/bus.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/bus/static/src/js/bus.js b/addons/bus/static/src/js/bus.js
index a79c750..f77522b 100644
--- a/addons/bus/static/src/js/bus.js
+++ b/addons/bus/static/src/js/bus.js
@@ -76,7 +76,7 @@ bus.Bus = Widget.extend({
this.last_partners_presence_check = now;
}
@blaggacao
blaggacao / exporter.py
Last active December 22, 2017 01:24
Odoo Export Threaded
def write_row(self, row):
"""
Handle one row of data to export
:param row: a tuple with N strings matching the schema passed to open.
"""
grouped = self.groupby_idx != None
parents = self.parent_field_idx != None
g_key = grouped and convert(row[self.groupby_idx]) or None
d_key = parents and convert(row[self.parent_field_idx]) or None
grp_key = (g_key, self.grp_lock_map.setdefault(g_key, threading.Lock()))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"alwaysShowComment": false,
"preview": false,
"params": {
"matching": "PATTERN",
"stopAfterFirstMatch": false,
"appliesTo": "COLUMNS",
"normalization": "EXACT",
"columns": [
"DIR,C,60",
@blaggacao
blaggacao / co-address-cleaning.json
Created January 1, 2018 19:17
My dirty data 2
{
"alwaysShowComment": false,
"preview": false,
"params": {
"matching": "PATTERN",
"stopAfterFirstMatch": false,
"appliesTo": "COLUMNS",
"normalization": "EXACT",
"columns": [
"DIR,C,60"
@blaggacao
blaggacao / postgres-Sun.log
Last active April 15, 2018 17:57
POstgres STDOUT logs
2018-04-11 23:57:46.511 UTC [16438] FATAL: password authentication failed for user "postgres"
2018-04-11 23:57:46.511 UTC [16438] DETAIL: User "postgres" has no password assigned.
Connection matched pg_hba.conf line 183: "host all all 0.0.0.0/0 md5"
2018-04-11 23:57:49.501 UTC [16398] ERROR: could not obtain lock on row in relation "ir_cron"
2018-04-11 23:57:49.501 UTC [16398] STATEMENT: SELECT id FROM "ir_cron" WHERE id IN (5) FOR UPDATE NOWAIT
2018-04-11 23:57:51.474 UTC [16443] ERROR: could not obtain lock on row in relation "ir_cron"
2018-04-11 23:57:51.474 UTC [16443] STATEMENT: SELECT id FROM "ir_cron" WHERE id IN (5) FOR UPDATE NOWAIT
2018-04-11 23:58:16.580 UTC [16470] FATAL: password authentication failed for user "postgres"
2018-04-11 23:58:16.580 UTC [16470] DETAIL: User "postgres" has no password assigned.
Connection matched pg_hba.conf line 183: "host all all 0.0.0.0/0 md5"
@blaggacao
blaggacao / Analysis
Created June 29, 2018 14:46
Anaysis #25533
It seems, https://github.com/odoo/odoo/pull/10557 got close into this direction.
Provides context: https://github.com/odoo/odoo/pull/15336
Reports the "no-self-triggering" limitation: https://github.com/odoo/odoo/issues/2693
@ged-odoo Some time ago: https://github.com/OCA/web/issues/562#issuecomment-282384372
~Ideally the backend and frontend could communicate a command "`KEEP` (`7`)" for those sub values near...~
https://github.com/odoo/odoo/blob/ef0907d5b0858efbf7702c78698d21fadf0149e7/addons/web/static/src/js/views/basic/basic_model.js#L96-L134
2018-07-25 21:45:56,984 self => purchase.order(919,) self.env.get_todo() => (purchase.order.line.state, purchase.order.line(2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635))
2018-07-25 21:45:56,996 self => purchase.order(919,) self.env.get_todo() => (purchase.order.line.qty_received, purchase.order.line(2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635))
2018-07-25 21:45:57,146 self => purchase.order(919,) self.env.get_todo() => (purchase.order.invoice_status, purchase.order(919,))
2018-07-25 21:45:57,356 self => stock.picking(27010,) self.env.get_todo() => (stock.picking.priority, stock.picking(27010,))
2018-07-25 21:45:57,693 self => stock.picking(27010,) self.env.get_todo() => (stock.picking.group_id, stock.picking(27010,))
2018-07-25 21:45:57,697 self => stock.picking(27010,) self.env.get_todo() => (stock.picking.state, stock.picking(27010,))
2018-07-25 21:45:57,701 self => stock.picking(27010,) self.env.get_todo() => (stock.picking.max_date, stock.pic
odoo_1 | 2018-07-25 21:19:27,021 1 WARNING XYZ--slow odoo.models: (purchase.order.line.state , purchase.order.line(2576 , 2577 , 2578 , 2579 , 2580 , 2581 , 2582 , 2583 , 2584 , 2585 , 2586 , 2587))
odoo_1 | 2018-07-25 21:19:27,033 1 WARNING XYZ--slow odoo.models: (purchase.order.line.qty_received , purchase.order.line(2576 , 2577 , 2578 , 2579 , 2580 , 2581 , 2582 , 2583 , 2584 , 2585 , 2586 , 2587))
odoo_1 | 2018-07-25 21:19:27,169 1 WARNING XYZ--slow odoo.models: (purchase.order.invoice_status , purchase.order(915,))
odoo_1 | 2018-07-25 21:19:27,397 1 WARNING XYZ--slow odoo.models: (stock.picking.min_date , stock.picking(27006,))
odoo_1 | 2018-07-25 21:19:27,400 1 WARNING XYZ--slow odoo.models: (stock.picking.weight , stock.picking(27006,))
odoo_1 | 2018-07-25 21:19:27,942 1 WARNING XYZ--slow odoo.models: (stock.picking.priority , stock.picking(27006,))
odoo_1