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 6 months ago
config Added config folder with TSV columns for each model 6 months ago
.gitignore First commit 7 months ago
.modelignore First commit 7 months ago
.relationrc First commit 7 months ago
README.md Better README 7 months ago
config.py Added config folder with TSV columns for each model 6 months ago
ir.field.sh First commit 7 months ago
product.uom.sh First commit 7 months ago
remote.py Remove old MODEL_IGNORE protection 6 months ago
renderers.py Added config folder with TSV columns for each model 6 months ago
test-remote.py Added tests in test-remote.py 7 months ago
utils.py Added config folder with TSV columns for each model 6 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