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 228aa8ef70 Added tests in test-remote.py 6 hours ago
.gitignore First commit 4 days ago
.modelignore First commit 4 days ago
.relationrc First commit 4 days ago
README.md Better README 4 days ago
config.py Split config.py 8 hours ago
ir.field.sh First commit 4 days ago
product.uom.sh First commit 4 days ago
remote.py set +x mode on remote.py 7 hours ago
renderers.py Added module renderers json tsv csv xml 1 day ago
test-remote.py Added tests in test-remote.py 6 hours ago
utils.py Split config.py 8 hours 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