[ADD] blahblahblahblah
[odoo/odoo.git] / addons / base_import / static / src / xml / import.xml
1 <templates>
2     <t t-name="ImportView">
3         <form action="" method="post" enctype="multipart/form-data" class="oe_import">
4             <input type="hidden" name="session_id"
5                    t-att-value="widget.session.session_id"/>
6             <input type="hidden" name="import_id"/>
7             <h2>Upload your file</h2>
8             <p>Select the <a href="#" class="oe_import_csv">.CSV</a>
9             file to import. If you need a sample importable file, you
10             can use <a href="#" class="oe_import_export">the export
11             tool</a> to generate one.</p>
12             <label for="csvfile" autofocus="autofocus">CSV File:</label>
13             <input type="file" id="csvfile" name="file" class="oe_import_file"/>
14
15             <div class="oe_import_with_file">
16                 <h2>Map your data to OpenERP</h2>
17                 <input type="checkbox" class="oe_import_has_header"
18                        id="oe_import_has_header" checked="checked"/>
19                 <label for="oe_import_has_header">The first row of the
20                 file contains the label of the column</label>
21                 <p class="oe_import_noheaders">If the file contains
22                 the column names, OpenERP can try auto-detecting the
23                 field corresponding to the column. This makes imports
24                 simpler especially when the file has many columns.</p>
25
26                 <div class="oe_import_error_report"></div>
27                 <table class="oe_import_grid" width="100%"/>
28                 <!-- TODO: other CSV options -->
29
30                 <h2>Frequently Asked Questions</h2>
31                 <dl>
32                     <dt><a href="#">Need to import data from an other application?</a></dt>
33                     <dd>
34                         <p>In order to re-create relationships between
35                         different records, you should use the unique
36                         identifier from the original application and
37                         map it to the <abbr title="External ID">ID</abbr>
38                         column in OpenERP. When you
39                         import an other record that links to the first
40                         one, use <abbr title="XXX/External ID">XXX/ID</abbr>
41                         to the original unique identifier.</p>
42                         <p>The <abbr title="External ID">ID</abbr>
43                         will also be used to update the original
44                         import if you need to re-import modified data
45                         later, it's thus good practice to specify it
46                         whenever possible</p>
47                     </dd>
48                 </dl>
49             </div>
50         </form>
51     </t>
52     <t t-name="ImportView.preview">
53         <tr t-if="headers" class="oe_import_grid-header">
54             <td t-foreach="headers" t-as="header" class="oe_import_grid-cell"
55                 ><t t-esc="header"/></td>
56         </tr>
57         <tr class="oe_import_fields">
58             <!-- Iterate on first row to ensure we have all columns -->
59             <td t-foreach="preview[0]" t-as="column">
60                 <input placeholder="Don't Import"/>
61             </td>
62         </tr>
63         <tr t-foreach="preview" t-as="row" class="oe_import_grid-row">
64             <td t-foreach="row" t-as="cell" class="oe_import_grid-cell"
65                 ><t t-esc="cell"/></td>
66         </tr>
67     </t>
68     <t t-name="ImportView.preview.error">
69         <p>Import preview failed due to: <t t-esc="error"/></p>
70         <p>Here is the start of the file we could not import:</p>
71         <pre><t t-esc="preview"/></pre>
72     </t>
73     <ul t-name="ImportView.error">
74         <li t-foreach="errors" t-as="error" t-attf-class="oe_import_report_#{error.type}">
75             <!-- can also have error.record, but may be *huge* if
76                  e.g. has image fields -->
77             <t t-esc="error.message"/>
78         </li>
79     </ul>
80 </templates>