Skip to content

Trust-Code/odoo_csv_import

 
 

Repository files navigation

Odoo CSV Import Export Library

This library provides tools to easily and quickly import data into Odoo or export data from Odoo using CSV file. It also provide a framework to manipulate date from csv.

Requirements

  • openerp-client-lib

Tips

How to use

Using terminal:

$ git clone https://github.com/Trust-Code/odoo_csv_import.git
$ cd odoo_csv_import
$ pip install -R requirement.txt
$ python setup.py install
$ edit connection.config

Basic command to import:

$ odoo_import_thread.py -c {{connection.conf}} --file {{file.csv}} --model {{odoo_model}}

Parameters:

-c or --config - default="conf/connection.conf" - Configuration File that contains connection parameters - required = True
--file - File to import - required = True
--model - Model to import - required = True
--worker - default=1 - Number of simultaneous connection
--size - default=10 - Number of line to import per connection
--skip - default=0 - Skip until line [SKIP]
--fail - Fail mode
-s or --sep - default=";" - CSV separator
--groupby - Group data per batch with the same value for the given column in order to avoid concurrent update error
--ignore - list of column separate by comma. Those column will be remove from the import request
--check - Check if record are imported after each batch.
--context - default="{'tracking_disable' : True}" - context that will be passed to the load function, need to be a valid python dict'

About

Script to import large csv file through rpc

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.2%
  • Shell 1.8%