Skip to content

Instantly share code, notes, and snippets.

@kenvac
kenvac / pgbouncer.ini
Created November 7, 2017 09:50
basic pgbouncer configuration with odoo
;; database name = connect string
;;
;; connect string params:
;; dbname= host= port= user= password=
;; client_encoding= datestyle= timezone=
;; pool_size= connect_query=
[databases]
odoo1 = host=127.0.0.1 auth_user=odoo dbname=odoo1 port=5432
odoo2 = host=127.0.0.1 auth_user=odoo dbname=odoo2 port=5432
odoo3 = host=127.0.0.1 auth_user=odoo port=5432 dbname=odoo3
@gdgellatly
gdgellatly / TestPurchase.py
Created December 20, 2016 20:40
Sample Hypothesis Test File for Openerp v7
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP / Odoo, Open Source Management Solution - module extension
# Copyright (C) 2014- O4SB (<http://openforsmallbusiness.co.nz>).
# Author Graeme Gellatly <g@o4sb.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
@abruneau
abruneau / install_openconnect_centos7.sh
Created April 29, 2016 14:55
Install open connect on Centos 7
sudo yum install epel-release
sudo yum install NetworkManager-openconnect
@dreispt
dreispt / account_analytic_multidimension.md
Last active February 12, 2017 09:37
Odoo Blueprint: Analytic Account Multi Dimension support

Multi Dimension Analytic Accounts

Odoo has native Analytic Accounting support through Anaytic Accounts. Documents, such as Sales Orders or Invoices, can have Analytic Accounts on them. These are carried to the GL Accounting moves, so that finantial data ends up with analytic informatin available for management analysis.

What are Analytic Accounts is a business decision, and depends on what needs to be measured. These can be Activities, Contracts, Projects, Cost Centers, etc.

@antespi
antespi / Odoo - Rename an addon without losing data.md
Last active April 10, 2024 15:29
Odoo - Rename an addon without losing data

Odoo - Rename an addon without losing data

Rename addon

  • Change __openerp__.py addon name field
  • Change README.rst file
@leblanc-simon
leblanc-simon / get_password_odoo.py
Created June 30, 2015 10:13
Get password from Odoo session
#!/usr/bin/python
import os
from werkzeug.contrib.sessions import FilesystemSessionStore
session_store = FilesystemSessionStore(os.path.expanduser('~/.local/share/Odoo/sessions'))
passwds = []
for sid in session_store.list():
session = session_store.get(sid)
@bealdav
bealdav / csv2xml4odoo.py
Last active April 18, 2024 05:46
Odoo csv / xml converter
# -*- coding: utf-8 -*-
# based on this code
# http://code.activestate.com/recipes/577423-convert-csv-to-xml/
# convert Odoo csv files in xml files
# csv is easy to maintain but xml data have noupdate feature
# Limitations:
# - relation field One2many is NOT supported
# - csv should have 'id' as first column
@hbrunn
hbrunn / rebuild_libreoffice.sh
Last active November 10, 2020 05:16
This is an instruction how to rebuild libreoffice on ubuntu trusty to use python-uno for python 2.7
# we need some fixes from 14.10
sudo add-apt-repository --enable-source ppa:libreoffice/libreoffice-4-3
# fetch this repository
sudo apt-get update
# update your libreoffice installation
sudo apt-get install libreoffice
# get all build dependencies for libreoffice
sudo apt-get build-dep libreoffice
# that strangely enough doesn't come with the above
sudo apt-get install gcj-jdk python-dev
@larrybolt
larrybolt / cf-ddns.sh
Last active June 16, 2024 19:06
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@paulodeleo
paulodeleo / .tmux.conf
Last active July 15, 2022 10:16
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows