Exports odoo models and datas to flat files (JSON or TSV)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
DiG 79f6959ce8 Remove old MODEL_IGNORE protection 10 months ago
config Added config folder with TSV columns for each model 10 months ago
.gitignore First commit 11 months ago
.modelignore First commit 11 months ago
.relationrc First commit 11 months ago
README.md Better README 11 months ago
config.py Added config folder with TSV columns for each model 10 months ago
ir.field.sh First commit 11 months ago
product.uom.sh First commit 11 months ago
remote.py Remove old MODEL_IGNORE protection 10 months ago
renderers.py Added config folder with TSV columns for each model 10 months ago
test-remote.py Added tests in test-remote.py 11 months ago
utils.py Added config folder with TSV columns for each model 10 months ago

README.md

exportoo

Exports odoo models and datas to flat files (JSON or TSV)

Usage

Sessions

First you have to login ./odoo-rpc.py login [<server> [<port> [<database> [<user> [<passwd>]]]]]

Any information not given as param is prompted

$ ./odoo-rpc.py login localhost 8069
Server address: localhost
Port: 8069
Connected to localhost:8069
Available databases:
db1
db2
db3
Database: |

Once login success, the session is saved under ~/.odoorpcrc

Api

./odoo-rpc.py <model> <method> [<param> [<param> [<param>]]]

# List all databases
./odoo-rpc.py db list

# Search models with domains
./odoo-rpc.py ir.model search model = res.users		# exact model
./odoo-rpc.py ir.model search model like product	# model names containing 'product'
./odoo-rpc.py res.users search company_id.id = 42	# users of company 42
./odoo-rpc.py product.template search name = 'Awesome product'
./odoo-rpc.py product.template search create_uid.name like john
./odoo-rpc.py product.uom search id != -1			# all entries

# List model's fields
./odoo-rpc.py product.template fields

# Save entries as json files on disk (!!! Recursively followinf many2one and one2many fields)
./odoo-rpc.py product.template export-json create_uid.name like john