Skip to content

Installation Procedure

Martin 'Hasan' Bramwell edited this page Jan 10, 2014 · 7 revisions

Prerequisites

sudo apt-get -y install git python-pip # unzip 
#
sudo pip install openerp-client-lib oauth2client Importing
#

Configure "git"

cd ~
mkdir -p ~/.ssh
cd ~/.ssh
rm -f id_rsa
rm -f id_rsa.pub
cat << EOF > id_rsa
-----BEGIN RSA PRIVATE KEY-----
MIIEpQI. . . . . yv6WE=
-----END RSA PRIVATE KEY-----
EOF
#
cat << EOF.pub > id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAAD. . . . P9oJiL9Ypi2CgPp yourself@yourpc
EOF.pub
#
cp id_rsa.pub authorized_keys
chmod 600 ./*
cd ~
chmod 700 .ssh
#
git config --global user.name "Martin H. J. Bramwell"
git config --global user.email [email protected]
git config --global push.default simple

Make a place to work

cd ~/
mkdir -p projects
cd projects

Obtain GData OpenERP data pump

git clone [email protected]:martinhbramwell/GData_OpenERP_Data_Pump.git

Obtain and install GSpread

git clone [email protected]:FleetingClouds/gspread.git
sudo pip install -e gspread
#

Obtain Authentication and then request Authorization

This step uses gspread/tests/get_google_oauth2_creds.py to prepare the tokens request to your expected end user. The required steps are documented here: How to get, use and refresh OAuth access tokens for gspread - Access and refresh tokens script

The credentials you need will be written to the file creds_oa.py

cd ~/projects/GData_OpenERP_Data_Pump/
cp ../gspread/creds_oa.py .
#

Startup the Data Pump

 ./pump.py

You should get a result like this . . .

Will try with OAuth credentials
The creds_*.py file(s) may now be deleted.
usage: gDataTools.py [-h] (-c | -k WORKBOOK_KEY) [-r START_ROW]
gDataTools.py: error: one of the arguments -c/--clean -k/--workbook_key is required

In fact a command line switch is also required -- the identification key of your spreadsheet.

Copy this spreadsheet and edit it to connect to your OpenERP : https://docs.google.com/spreadsheet/ccc?key=0AiVG6SoU001RdFdyc1NxOHN4eWZ6Q0lLMHVyWUpkaHc

The run the pump referring, by key, to your copy.

 ./pump.py -k 0AiVG6SoU001RdFdyc1NxOHN4eWZ6Q0lLMHVyWUpkaHc

You should get a result like this . . .

Connected to OpenERP database "bananarama" on server "erpserver.example.com".
Start work at row #4 in the "Tasks" sheet.
Found 0 tasks to process.

Finally, refer back to the README.md -- First time execution

Clone this wiki locally