Skip to content

Instantly share code, notes, and snippets.

View madprog's full-sized avatar

Paul Morelle madprog

  • Odoo
  • Ramillies, Belgium
View GitHub Profile
quants = env['stock.quant'].search([])
move_line_ids = []
warning = ''
for quant in quants:
move_lines = env["stock.move.line"].search([
('product_id', '=', quant.product_id.id),
('location_id', '=', quant.location_id.id),
('lot_id', '=', quant.lot_id.id),
('package_id', '=', quant.package_id.id),
@mao-odoo
mao-odoo / barcodeTriggerFromDevTools.js
Last active September 7, 2021 09:50
[ODOO] trigger barcode from browser dev tools
odoo.__DEBUG__.services['web.core'].bus.trigger('barcode_scanned', "BARCODE_VALUE_HERE", $(".o_web_client")[0]);
@cdiggins
cdiggins / react-best-practices.md
Created January 25, 2018 16:20
React Best Practices
@wojas
wojas / btrfs-subvolume-usage.py
Created April 27, 2017 17:00
Get btrfs subvolume disk usage sorted by incremental size
#!/usr/bin/env python3
# NOTE: btrfs quota must be enabled for this to work:
# btrfs quota enable /btrfs/
import os
import sys
usage = {}
for line in os.popen('btrfs qgroup show / --raw', 'r'):
# 0/10784 15678980096 557056
if not line.startswith('0/'):
@deltaluca
deltaluca / haxe.vim
Last active December 21, 2015 15:59
Improved haxe syntax file for vim http://i.imgur.com/ViMwoeh.png
" Vim syntax file
" Language: Haxe
" Maintainer: Luca Deltodesco <[email protected]>
" Last Change: 2013 August 26
if exists("b:current_syntax")
finish
endif
command! -nargs=+ HaxeHiLink hi def link <args>