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
View GitHub Profile
@blaggacao
blaggacao / migration.py
Last active January 28, 2023 15:40
Odoo Migration Utils
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import imp
import json
import logging
import os
import re
import sys
@blaggacao
blaggacao / run-compile-dev.sh
Last active August 12, 2018 22:14
Compile all patches in inventory to branch
#!/bin/bash
folders=("vendor/odoo/cc/.git" "vendor/odoo/ee/.git")
devbranch="master"
branches=("11.0")
owndev="dev"
prefix="remotes/"
RED='\033[0;31m'
GREEN='\033[0;32m'
@blaggacao
blaggacao / README.md
Last active August 12, 2018 21:26
Backport patches from master
  • Enable Rereregit config --global rerere.enabled 1

  • If one branch failes with a note about merge.renamelimit, try it again with the recommended value.

    • Set with git config merge.renameLimit <NUMBER>
    • Unset afterwards with it config --unset merge.renameLimit
  • Lookout for something like: Recorded preimage for 'odoo/addons/base/res/res_partner_view.xml' in case of a conflict. It indicates that rerere is working.

@blaggacao
blaggacao / run-backport-dev.sh
Created August 12, 2018 20:08
Backport patches from master
#!/bin/bash
folders=("vendor/odoo/cc/.git")
devbranch="master"
branches=("11.0")
owndev="dev"
prefix="remotes/"
canidate_branches="remotes/${owndev}/${devbranch}-"
RED='\033[0;31m'
@blaggacao
blaggacao / run-update-dev.sh
Created August 12, 2018 17:20
Update dev remote
#!/bin/bash
folders=("vendor/odoo/cc/.git" "vendor/odoo/ee/.git")
branches=("master" "11.0")
owndev="dev"
for folder in "${folders[@]}"; do
echo -e "\n\nFetching ${folder}\n"
gitcmd="git --git-dir ${folder}"
@blaggacao
blaggacao / run-rebase-dev.sh
Created August 11, 2018 02:25
Rebase branches on dev repo
#!/bin/bash
folders=("vendor/odoo/cc/.git" "vendor/odoo/ee/.git")
branches=("master" "11.0")
owndev="dev"
prefix="remotes/"
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
@blaggacao
blaggacao / logs
Created July 27, 2018 23:18
Install website_helpdsek
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/fields.py", line 937, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/api.py", line 960, in get
value = self._data[field][record.id][key]
KeyError: <odoo.api.Environment object at 0x7f6ec90a2940>
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
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
@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