diff options
| author | Mohammed Shekha <msh-odoo@users.noreply.github.com> | 2018-08-16 14:40:35 +0530 |
|---|---|---|
| committer | xmo-odoo <xmo@odoo.com> | 2018-08-16 11:10:35 +0200 |
| commit | 8fbadb9575c25e20f08637c837b386fde213203c (patch) | |
| tree | 568cdc943c24a2bcee46812580de4b636d3a1899 /addons/base_import/static/src/xml | |
| parent | b3824aa6cbecc97fc0cd54773417045e69adc87a (diff) | |
[ADD] base_import: debug option to create M2O/M2M records
Adds a checkbox to import columns (in debug mode) allowing a user to
create records M2O and M2M records not found (via name_search).
Task ID: 1850633
* uses a context key to avoid altering basically all the import callstack
* attempted to lift the creation in the `_str_to_*` functions and create
m2m via commands, but that doesn't really work out
Diffstat (limited to 'addons/base_import/static/src/xml')
| -rw-r--r-- | addons/base_import/static/src/xml/base_import.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/base_import/static/src/xml/base_import.xml b/addons/base_import/static/src/xml/base_import.xml index fb29ac0c9ea..3b8d8136da9 100644 --- a/addons/base_import/static/src/xml/base_import.xml +++ b/addons/base_import/static/src/xml/base_import.xml @@ -100,6 +100,15 @@ <button type="button" class="btn btn-secondary o_import_cancel">Cancel</button> </t> + <t t-name="ImportView.create_record_option"> + <div class="mt4"> + <label title="Creates new records if they can't be found (instead of failing to import). Note that the value in the column will be used as the new record's 'name', and assumes this is sufficient to create the record."> + <input type="checkbox"/> + Create if doesn't exist + </label> + </div> + </t> + <t t-name="ImportView.preview"> <thead> <tr t-if="headers" class="oe_import_grid-header"> |
