Search 1.9 billion lines of Odoo code on GitHub

import_loader

Author: Daniel Reis
License: no license
Branch: loader-async
Repository: AthmanZiri/odoo-addons
Dependencies: base
Languages: Markdown (29, 13.6%), PO File (28, 13.1%), Python (134, 62.6%), XML (18, 8.4%), and YAML (5, 2.3%)
Other branches: 8.0, 9.0, and sct-8.0
Other repositories: Mwatchorn26/odoo-addons, digideskio/odoo-addons, dreispt/odoo-addons, hugosdsantos/odoo-addons, likaiyuan/dreispt-addons, open-synergy/odoo-addons-2, raycarnes/odoo-addons-2, sansal54/odoo-addons, and u8621011/odoo-addons

<p>The output steps available in Pentaho Kettle and Talend have a few limitations. They do not support XML Ids and the same output step can perform only either create or write operations, not both (related to https://github.com/odoo/odoo/pull/2258).</p> <p>This module provides a server side proxy model, <code>import.loader</code>, that solves those limitations. New records created should have a <code>data</code> field with the payload to import. This payload is parsed and then imported into the target model, using the <code>load()</code> method. This means that serialization rules that apply to CSV file import are apply here.</p> <p>The ETL tools can then perform naive create operations on <code>import.loader</code>, providing a data string with the payload, and this model will do the necessary handling and loading.</p> <p>The payload is string representing a list of rows. Each row is a dictionary of field names/values, and must include an additional <code>_model</code> key indicating the target model.</p> <p>This means that the same payload can load one or more records, into one or more models.</p> <p>Here is an example of a date payload to create or update a new contact:</p> <p><code> { &quot;_model&quot;: &quot;res.partner&quot; , &quot;id&quot;: &quot;res_partner_eric&quot; , &quot;name&quot;: &quot;Eric&quot; , &quot;is_company&quot;: false , &quot;user_id/id&quot;: &quot;base.user_root&quot; } </code></p> <p>A usage example for Pentaho Kettle is provided in the <code>import_loader_demo.ktr</code> file.</p>