dodoo load子命令
dodoo-loader的Python项目详细描述
dodoo-loader是一组有用的odoo维护函数。 它们也可以作为cli脚本(基于dodoo)提供 作为可组合的python函数。
内容
Script
Usage: dodoo-loader [OPTIONS] Loads data into an Odoo Database. Supply data by file or stream in a supported format and load it into a local or remote Odoo database. Highlights: • Detects model-level dependency on related fields and record-level dependencies in tree-like tables (hierarchies). Cares to load everything in the correct order*. • Supported formats: JSON, CSV, XLS & XLSX • Logs success to --out. Next runs deduplicate based on those logs. • [TBD] Can trigger onchange as if data was entered through forms. Note: record-level dependency detection only works with parent columns ending in /.id (db ID) or /id (ext ID). Either one must match the principal id or .id column (to which it refers). Note: For UX and security reasons, nested semantics (as in Odoo) are not supported as they usually are undeterministic (lack of identifier on the nested levels). That's too dangerous for ETL. Options: -f, --file FILENAME Path to the file, that you want to load. You can specify this option multiple timesfor more than one file to load. -s, --stream TEXT... [stream type model] Stream, you want to load. `type` can be csv or json. `model` can be any odoo model availabe in env. You can specify this option multiple timesfor more than one stream to load. --onchange / --no-onchange [TBD] Trigger onchange methods as if data was entered through normal form views. [default: True] --batch INTEGER The batch size. Records are cut-off for iteration after so many records. [default: 50] --out FILENAME Log success into a json file. [default: ./log.json] --logfile FILE Specify the log file. -d, --database TEXT Specify the database name. If present, this parameter takes precedence over the database provided in the Odoo configuration file. --log-level TEXT Specify the logging level. Accepted values depend on the Odoo version, and include debug, info, warn, error. [default: info] -c, --config FILE Specify the Odoo configuration file. Other ways to provide it are with the ODOO_RC or OPENERP_SERVER environment variables, or ~/.odoorc (Odoo >=10) or ~/.openerp_serverrc. --help Show this message and exit.
Changes
Future (?)
- 展开嵌套数据
- 更多测试
0.6.5 (2019-05-05)
- 简化回购结构
- 修复包命名空间问题
- 修复未来str类型的问题
0.5.2 (2018-12-05)
- 添加加载项路径选项
0.0.3 (2018-10-25)
- 从8.0到Master的绿色测试
0.0.2 (2018-10-12)
- 初始α
- 17%的测试覆盖率