summaryrefslogtreecommitdiff
path: root/addons/base_import/static/src/xml/base_import.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base_import/static/src/xml/base_import.xml')
-rw-r--r--addons/base_import/static/src/xml/base_import.xml72
1 files changed, 42 insertions, 30 deletions
diff --git a/addons/base_import/static/src/xml/base_import.xml b/addons/base_import/static/src/xml/base_import.xml
index 6d69d6995aa..aa0e956f9fd 100644
--- a/addons/base_import/static/src/xml/base_import.xml
+++ b/addons/base_import/static/src/xml/base_import.xml
@@ -4,7 +4,7 @@
<form action="" method="post" enctype="multipart/form-data" class="oe_import">
<input type="hidden" name="csrf_token" t-att-value="csrf_token"/>
<input type="hidden" name="import_id"/>
- <div class="oe_import_box col-lg-12 d-none">
+ <div class="oe_import_box d-none">
<input accept=".csv, .xls, .xlsx, .xlsm, .ods" t-attf-id="file_#{_id}"
name="file" class="oe_import_file" type="file" style="display:none;"/>
<div class="oe_import_with_file row">
@@ -36,34 +36,45 @@
</div>
</div>
</div>
+ <div class="o_import_batch_alert alert alert-warning d-none">
+ Due to its large size, the file will be imported by batches.
+ </div>
+ <div class="o_import_partial_alert alert alert-warning d-none">
+ Click 'Resume' to proceed with the import, resuming at line
+ <span class="o_import_partial_count">0</span>.<br/>
+ You can test or reload your file before resuming the import.
+ </div>
- <div class="oe_import_with_file oe_padding col-md-12 d-none">
+ <div class="oe_import_with_file d-none">
<h2>Map your columns to import</h2>
- <div title="If the model uses openchatter, history tracking
- will set up subscriptions and send notifications
- during the import, but lead to a slower import."
- class="oe_import_tracking">
- <input type="checkbox" id="oe_import_tracking"/>
- <label for="oe_import_tracking">
- Track history during import
- </label>
- </div>
- <div title="If the model uses parent/child relations, computing the
- parent / child relation occurs on every line, and lead to a slower import.
- Defering it can speed up import."
- class="oe_import_deferparentstore">
- <input type="checkbox" id="oe_import_deferparentstore" checked="checked"/>
- <label for="oe_import_deferparentstore">
- Defer parent/child computation
- </label>
+ <div class="oe_import_debug_options">
+ <div title="If the model uses openchatter, history tracking will set up subscriptions and send notifications during the import, but lead to a slower import." class="oe_import_debug_option">
+ <input type="checkbox" id="oe_import_tracking"/>
+ <label for="oe_import_tracking">
+ Track history during import
+ </label>
+ </div>
+ <div>
+ <input type="checkbox" class="oe_import_has_header"
+ id="oe_import_has_header" checked="checked"/>
+ <label for="oe_import_has_header">The first row
+ contains the label of the column</label>
+ </div>
+ <div class="js_import_options oe_import_debug_option oe_import_batch_limit">
+ <label for="oe_import_batch_limit">Batch limit</label>
+ <input id="oe_import_batch_limit" value="2000"/>
+ </div>
+ <div class="js_import_options oe_import_debug_option" title="Warning: ignores the labels line, empty lines and
+ lines composed only of empty cells">
+ <label for="oe_import_row_start">Start at line</label>
+ <input id="oe_import_row_start" value="1"/>
+ </div>
+ <div class="oe_import_debug_option">
+ <input type="checkbox" class="oe_import_advanced_mode" checked="checked"
+ id="oe_import_advanced_mode"/>
+ <label for="oe_import_advanced_mode">Show fields of relation fields (advanced)</label>
+ </div>
</div>
- <input type="checkbox" class="oe_import_has_header"
- id="oe_import_has_header" checked="checked"/>
- <label for="oe_import_has_header">The first row
- contains the label of the column</label>
- <input type="checkbox" class="oe_import_advanced_mode" checked="checked"
- id="oe_import_advanced_mode"/>
- <label for="oe_import_advanced_mode">Show fields of relation fields (advanced)</label>
<p class="oe_import_noheaders text-muted">If the file contains
the column names, Odoo can try auto-detecting the
field corresponding to the column. This makes imports
@@ -95,8 +106,9 @@
</t>
<t t-name="ImportView.buttons">
- <button type="button" class="btn btn-primary o_import_import d-none">Import</button>
- <button type="button" class="btn btn-secondary o_import_validate d-none">Test Import</button>
+ <button type="button" class="btn btn-primary o_import_import o_import_import_full d-none">Import</button>
+ <button type="button" class="btn btn-primary o_import_import o_import_import_partial d-none">Resume</button>
+ <button type="button" class="btn btn-secondary o_import_validate d-none">Test</button>
<button type="button" class="btn btn-secondary o_import_file_reload d-none">Reload File</button>
<button type="button" class="btn btn-primary oe_import_file">Load File</button>
<button type="button" class="btn btn-secondary o_import_cancel">Cancel</button>
@@ -132,7 +144,7 @@
</tbody>
</t>
<t t-name="ImportView.preview.error">
- <div class="oe_import_report bg-danger">
+ <div class="oe_import_report alert alert-danger">
<p>Import preview failed due to: <t t-esc="error"/>.</p>
<p>For CSV files, you may need to select the correct separator.</p>
<p t-if="preview">Here is the start of the file we could not import:</p>
@@ -141,7 +153,7 @@
</t>
<ul t-name="ImportView.error">
<li t-foreach="errors" t-as="error"
- t-attf-class="oe_import_report bg-#{error_value[0].type}">
+ t-attf-class="oe_import_report alert alert-#{error_value[0].type}">
<t t-if="error_value.length gt 1">
<t t-call="ImportView.error.multi.header">
<t t-set="error" t-value="error_value[0]"/>