Skip to content

Instantly share code, notes, and snippets.

@dreispt
dreispt / _load_issues.py
Created May 14, 2014 13:39
Create 1000 Project Issue for load testing
import xmlrpclib
host, port, db = "localhost", 8069, "demo"
user, pwd = "demo", "demo"
url = "http://%s:%d/xmlrpc/common" % (host, port)
sock = xmlrpclib.ServerProxy(url)
uid = sock.login(db, user, pwd)
url = "http://%s:%d/xmlrpc/object" % (host, port)
#!/bin/sh
lp_url=lp:project-service
bzrdir=bzr-repo
gitdir=git-repo
rm -rf $bzrdir
rm -rf $gitdir
bzr init-repo $bzrdir
dr@uwebtec:~/work/oca$ git clone git@github.com:guewen/connector-magento.git
Cloning into 'connector-magento'...
Enter passphrase for key '/home/dr/.ssh/id_rsa':
remote: Counting objects: 8438, done.
remote: Compressing objects: 100% (2786/2786), done.
remote: Total 8438 (delta 5621), reused 8438 (delta 5621)
Receiving objects: 100% (8438/8438), 13.37 MiB | 1.63 MiB/s, done.
Resolving deltas: 100% (5621/5621), done.
dr@uwebtec:~/work/oca$ cd connector-magento/
dr@uwebtec:~/work/oca/connector-magento$ git remote add 7.0-update-stock-1330450 bzr::lp:~camptocamp/openerp-connector-magento/7.0-update-stock-1330450

may be written as:

env = Env(cr, uid, context) # cr, uid, context wrapped in env
recs = env[MODEL] # retrieve an instance of MODEL
recs = recs.search(DOMAIN) # search returns a recordset
for rec in recs: # iterate over the records
print rec.name
recs.write(VALUES) # update all records in recs
# git add remote odoo https://github.com/odoo/odoo.git
# git fetch odoo 8.0
dropdb v8mig0
createdb v8mig0
#pg_restore -d v8mig -O ./v8mig-at-v7.sql
git checkout 7.0
./openerp-server --stop-after-init -d v8mig0 --addons-path="addons/" -i crm
@dreispt
dreispt / id_rsa.pub
Created October 16, 2014 22:08
Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqRGX9b3ZNl4x14sOnxU1C3z0ijcffp9z9cUvRgzDiuHzKkZ8CA+KkLuqpBom/kFbb6kc3fW37KQ0bFhEhKfbbU4JN7TnjPidmnoDz667p3FQUUKQzUSqqhURTwYtx4TA/4JNFvEuXFKmONskG2BVrSNzKi+bQvNWl91luOExA/oZ4/71KBI+VSPXXnEihqISGYTkU63FN2Kq8/ZDo8LkmZqqWBRUtM4m5DBIpCeV2PWkbrBNxVtllCfL3s0fHWMBd/Ell3Imvl/4wFD5OrVcUC4SIHeOGned+yF5KVA/eGzqepJZdeSqoKSoNSYBmLGfkFucXifmgX69/sXIWGYnN dgreis@sapo.pt
@dreispt
dreispt / pipo.md
Created January 3, 2015 20:48
Pipo scratchpad

Use Odoo CLI commands. Work dir is the one for the current odoo.py.

@dreispt
dreispt / pdb_example.py
Created December 7, 2011 14:04
Python example of pdb usage
"""
PDB example.
At (pdb) prompt use:
(n)ext +repeat ENTER,
(p)rint var
(l)ist program,
(c)ontinue
(q)quit,
(s)tep into subroutines, use instead of "n"
@dreispt
dreispt / xoe-install.sh
Created July 29, 2012 23:01
Install OpenERP with XOE
#!/bin/bash
unix_user="erp_user"
erp_name="openerp"
#erp_version="6.1"
#service_code="http://download.sisalp.net/openerp-$erp_version.tar.gz"
service_code="http://nightly.openerp.com/trunk/nightly/src/openerp-6.2dev-latest.tar.gz"
programme="server/openerp-server"
service_name="trunk"
@dreispt
dreispt / xoe_script.sh
Created September 18, 2012 22:14
xoe install OpenERp 7
#!/bin/bash
#customize the service name an ports
service_name="trunk"
xml_rpc_port="8081"
xml_rpc_secure_port="8082"
net_rpc_port="8083"
service_code="http://nightly.openerp.com/trunk/nightly/src/openerp-6.2dev-latest.tar.gz"
unix_user="erp_user"