[IMP] make unreadable code less unreadable, fix some warning, use Widget#$
[odoo/odoo.git] / addons / web / static / src / xml / base.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vim:fdl=1:
3 -->
4 <templates id="template" xml:space="preserve">
5 <t t-name="EmptyComponent">
6     <div></div>
7 </t>
8 <t t-name="Loading">
9     <div class="oe_loading">
10         Loading...
11     </div>
12 </t>
13 <t t-name="Notification">
14     <div class="oe_notification" t-translation="off">
15         <div id="oe_notification_default">
16             <a class="ui-notify-cross ui-notify-close" href="#">x</a>
17             <h1>#{title}</h1>
18             <p>#{text}</p>
19         </div>
20         <div id="oe_notification_alert" class="ui-state-error">
21             <a class="ui-notify-cross ui-notify-close" href="#">x</a>
22             <span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-alert"></span>
23             <h1>#{title}</h1>
24             <p>#{text}</p>
25         </div>
26     </div>
27 </t>
28
29 <t t-name="CrashManager.warning">
30     <table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
31     <tr>
32         <td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe_dialog_icon"/></td>
33         <td>
34             <p>
35                 <t t-js="d">
36                     var message = d.message ? d.message : d.error.data.fault_code;
37                     d.html_error = context.engine.tools.html_escape(message)
38                         .replace(/\n/g, '<br/>');
39                 </t>
40                 <t t-raw="html_error"/>
41             </p>
42         </td>
43     </tr>
44     </table>
45 </t>
46 <t t-name="CrashManager.error">
47     <t t-if="!session.openerp_entreprise">
48         <span>Your version of OpenERP is unsupported. Support &amp; maintenance services are available here: <a href="http://www.openerp.com/support-or-publisher-warranty-contract" target="_blank">OpenERP Entreprise</a>.</span>
49     </t>
50     <t t-if="session.openerp_entreprise">
51         <div class="oe_error_send">
52             <div>
53                 <div class="oe_centeralign"><b>OpenERP Enterprise Contract.</b></div>
54                 <div><br/>Your report will be sent to the OpenERP Enterprise team.<br/></div><br/>
55                 <div>
56                     <label>Summary:</label><br/>
57                     <input id="issuename" type="text" class="oe_fielddiv"/>
58                 </div><br/><br/>
59                 <div>
60                     <label>Description:</label><br/>
61                     <textarea id="explanation" rows="6"></textarea>
62                 </div><br/><br/>
63                 <div>
64                     <label>What you did:</label><br/>
65                     <textarea id="remark" rows="6" ></textarea>
66                 </div>
67             </div>
68         </div><br/>
69     </t>
70     <div class="oe_error_detail">
71         <pre><t t-esc="error.message"/></pre>
72         <hr/>
73         <pre><t t-esc="error.data.debug"/></pre>
74     </div>
75 </t>
76
77 <t t-name="Login">
78     <div class="oe_login">
79         <div class="oe_login_bottom"> </div>
80         <div class="oe_login_error_message">Invalid username or password</div>
81         <div class="oe_login_pane">
82             <div class="oe_login_logo"><img src='/web/static/src/img/logo2.png'/></div>
83             <form action="" method="post">
84                 <div class="oe_login_dbpane" >
85                     Database:
86                     <input name="db" t-att-value="widget.selected_db || ''"/>
87                 </div>
88                 <ul>
89                     <li>Username</li>
90                     <li><input type="text" name="login" t-att-value="widget.selected_login || ''" autofocus="autofocus"/></li>
91                     <li>Password</li>
92                     <li><input type="password" name="password" t-att-value="widget.selected_password || ''"/></li>
93                     <li><button name="submit">Log in</button></li>
94                 </ul>
95             </form>
96             <div class="oe_login_footer">
97                 <a href="#" class="oe_login_manage_db">Manage Databases</a> |
98                 <a href="http://www.openerp.com">Powered by <span>OpenERP</span></a>
99             </div>
100         </div>
101     </div>
102 </t>
103 <t t-name="Login.dblist">
104     <select name="db">
105         <t t-foreach="db_list" t-as="db">
106             <t t-if="selected_db === db">
107                 <option t-att-value="db" selected="true">
108                     <t t-esc="db"/></option>
109             </t>
110             <t t-if="selected_db !== db">
111                 <option t-att-value="db"><t t-esc="db"/></option>
112             </t>
113         </t>
114     </select>
115 </t>
116
117 <t t-name="DatabaseManager">
118     <div class="oe_database_manager">
119         <div class="oe_database_manager_menu">
120             <ul class="oe_notebook">
121                 <li><a href="#db_create">Create</a></li>
122                 <li><a href="#db_drop">Drop</a></li>
123                 <li><a href="#db_backup">Backup</a></li>
124                 <li><a href="#db_restore">Restore</a></li>
125                 <li><a href="#db_change_password">Password</a></li>
126                 <li><a id="back_to_login" href="#">Back to Login</a></li>
127             </ul>
128             <form id="db_create" name="create_db_form" method="POST">
129                 <table align="center" class="db_option_table">
130                     <tr>
131                         <th colspan="2" class="option_string"> CREATE DATABASE </th>
132                     </tr>
133                     <tr>
134                         <td><label for="super_admin_pwd">Master password:</label></td>
135                         <td><input type="password" name="super_admin_pwd" class="required" value="admin"/></td>
136                     </tr>
137                     <tr>
138                         <td><label for="db_name">New database name:</label></td>
139                         <td><input type="text" name="db_name" class="required" matches="^[a-zA-Z][a-zA-Z0-9_]+$" autofocus="true"/></td>
140                     </tr>
141                     <tr>
142                         <td><label for="demo_data">Load Demonstration data:</label></td>
143                         <td><input type="checkbox" name="demo_data"/></td>
144                     </tr>
145                     <tr>
146                         <td><label for="db_lang">Default language:</label></td>
147                         <td>
148                             <select name="db_lang" t-if="widget.lang_list">
149                                 <t t-foreach="widget.lang_list" t-as="lang">
150                                     <option t-att-value="lang[0]" t-att-selected="lang[0] === 'en_US' ? 'selected' : undefined"><t t-esc="lang[1]"/></option>
151                                 </t>
152                             </select>
153                         </td>
154                     </tr>
155                     <tr>
156                         <td><label for="create_admin_pwd">Admin password:</label></td>
157                         <td><input type="password" name="create_admin_pwd" class="required"/></td>
158                     </tr>
159                     <tr>
160                         <td><label for="create_confirm_pwd">Confirm password:</label></td>
161                         <td><input type="password" name="create_confirm_pwd" class="required" equalTo="input[name=create_admin_pwd]"/></td>
162                     </tr>
163                     <tr>
164                         <td colspan="2" align="right"><button class="oe_button">Create</button></td>
165                     </tr>
166                 </table>
167             </form>
168             <form id="db_drop" name="drop_db_form" method="POST">
169                 <table align="center" class="db_option_table">
170                     <tr>
171                         <th colspan="2" class="option_string"> DROP DATABASE </th>
172                     </tr>
173                     <tr>
174                         <td><label for="drop_db">Database:</label></td>
175                         <td>
176                             <select t-if="widget.db_list" name="drop_db" autofocus="autofocus">
177                                 <t t-foreach="widget.db_list" t-as="db">
178                                     <option t-att-value="db"><t t-esc="db"/></option>
179                                 </t>
180                             </select>
181                             <input t-if="!widget.db_list" name="drop_db" class="required" type="text" autofocus="autofocus"/>
182                         </td>
183                     </tr>
184                     <tr>
185                         <td><label for="drop_password">Master Password:</label></td>
186                         <td><input type="password" name="drop_pwd" class="required"/></td>
187                     </tr>
188                     <tr>
189                         <td colspan="2" align="right"><button class="oe_button">Drop</button></td>
190                     </tr>
191                 </table>
192             </form>
193             <form id="db_backup" name="backup_db_form" method="POST" target="backup-target" action="/web/database/backup">
194                 <input type="hidden" name="token"/>
195                 <table align="center" class="db_option_table">
196                     <tr>
197                         <th colspan="2" class="option_string"> BACKUP DATABASE </th>
198                     </tr>
199                     <tr>
200                         <td><label for="backup_db">Database:</label></td>
201                         <td>
202                             <select t-if="widget.db_list" name="backup_db" autofocus="autofocus">
203                                 <t t-foreach="widget.db_list" t-as="db">
204                                     <option t-att-value="db"><t t-esc="db"/></option>
205                                 </t>
206                             </select>
207                             <input t-if="!widget.db_list" name="backup_db" class="required" type="text" autofocus="autofocus"/>
208                         </td>
209                     </tr>
210                     <tr>
211                         <td><label for="backup_pwd">Master Password:</label></td>
212                         <td><input type="password" name="backup_pwd" class="required"/></td>
213                     </tr>
214                     <tr>
215                         <td colspan="2" align="right"><button class="oe_button">Backup</button></td>
216                     </tr>
217                 </table>
218             </form>
219             <form id="db_restore" name="restore_db_form" method="POST">
220                 <table align="center" class="db_option_table">
221                     <tr>
222                         <th colspan="2" class="option_string"> RESTORE DATABASE </th>
223                     </tr>
224                     <tr>
225                         <td><label for="restore_db">File:</label></td>
226                         <td><input type="file" name="db_file" class="required" autofocus="autofocus"/></td>
227                     </tr>
228                     <tr>
229                         <td><label for="restore_pwd">Master Password:</label></td>
230                         <td><input type="password" name="restore_pwd" class="required"/></td>
231                     </tr>
232                     <tr>
233                         <td><label for="new_db">New database name:</label></td>
234                         <td><input type="text" name="new_db" class="required"/></td>
235                     </tr>
236                     <tr>
237                         <td colspan="2" align="right"><button class="oe_button">Restore</button></td>
238                     </tr>
239                 </table>
240             </form>
241             <form id="db_change_password" name="change_pwd_form" method="POST">
242                 <table align="center" class="db_option_table">
243                     <tr>
244                         <th colspan="2" class="option_string"> CHANGE MASTER PASSWORD </th>
245                     </tr>
246                     <tr>
247                         <td><label for="old_pwd">Master password:</label></td>
248                         <td><input type="password" name="old_pwd" class="required" minlength="1" autofocus="autofocus"/></td>
249                     </tr>
250                     <tr>
251                         <td><label for="new_pwd">New master password:</label></td>
252                         <td><input type="password" name="new_pwd" class="required" minlength="1"/></td>
253                     </tr>
254                     <tr>
255                         <td><label for="confirm_pwd">Confirm new master password:</label></td>
256                         <td><input type="password" name="confirm_pwd" class="required" equalTo="input[name=new_pwd]" minlength="1"/></td>
257                     </tr>
258                     <tr>
259                         <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
260                     </tr>
261                 </table>
262             </form>
263         </div>
264     </div>
265 </t>
266
267 <t t-name="Menu">
268     <ul class="oe_menu" t-if="widget.data">
269         <li t-foreach="widget.data.data.children" t-as="menu">
270             <t t-call="Menu.secondary.link"/>
271         </li>
272     </ul>
273 </t>
274 <t t-name="Menu.more">
275     <li class="oe_menu_more_container">
276         <span class="oe_topbar_item oe_menu_more_link oe_dropdown_toggle oe_dropdown_arrow">
277             More
278             <ul class="oe_menu_more oe_dropdown_menu"/>
279         </span>
280     </li>
281 </t>
282 <t t-name="Menu.secondary">
283     <div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
284         <t t-foreach="menu.children" t-as="menu">
285             <div class="oe_secondary_menu_section">
286                 <t t-esc="menu.name"/>
287                 <!--
288                     Shall the section be still clickable ?
289                     <t t-call="Menu.secondary.link"/>
290                 -->
291             </div>
292             <t t-call="Menu.secondary.submenu"/>
293         </t>
294     </div>
295 </t>
296 <t t-name="Menu.secondary.submenu">
297     <ul t-if="menu.children.length" class="oe_secondary_submenu">
298         <li t-foreach="menu.children" t-as="menu">
299             <t t-call="Menu.secondary.link"/>
300             <!--<span class="oe_menu_label">8</span>-->
301             <t t-call="Menu.secondary.submenu"/>
302         </li>
303     </ul>
304 </t>
305 <t t-name="Menu.secondary.link">
306     <a t-attf-href="#menu_id=#{menu.id}&amp;action_id=#{menu.action ? menu.action.split(',')[1] : ''}"
307         t-att-class="menu.children.length ? 'oe_menu_toggler' : 'oe_menu_leaf'"
308         t-att-data-menu="menu.id"
309         t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
310         t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
311         <t t-esc="menu.name"/>
312         <t t-if="menu.needaction_enabled and menu.needaction_counter">
313             <div class="oe_menu_counter">
314                 <t t-esc="menu.needaction_counter"/>
315             </div>
316         </t>
317     </a>
318 </t>
319
320 <t t-name="UserMenu">
321     <span class="oe_user_menu oe_topbar_item oe_dropdown_toggle oe_dropdown_arrow">
322         <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/>
323         <span class="oe_topbar_name"/>
324         <ul class="oe_dropdown_menu">
325             <li><a href="#" data-menu="about">About OpenERP</a></li>
326             <li><a href="#" data-menu="settings">Preferences</a></li>
327             <li><a href="#" data-menu="logout">Log out</a></li>
328         </ul>
329     </span>
330 </t>
331 <t t-name="UserMenu.about">
332
333     <div class="oe_about">
334       <a class="oe_activate_debug_mode oe_right" href="?debug">Activate the developer mode</a>
335       <img class="oe_logo" src="/web/static/src/img/logo2.png"/>
336       <h3>Version <t t-esc="version_info.version"/></h3>
337
338       <div class="oe_bottom">
339         <p>Copyright Â© 2004-TODAY OpenERP SA. All Rights Reserved.<br />
340             OpenERP is a trademark of the <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP SA Company</a>.</p>
341         <p>Licenced under the terms of <a target="_blank" href="http://www.gnu.org/licenses/agpl.html" style="text-decoration: underline;">GNU Affero General Public License</a></p>
342         <p>For more information visit <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP.com</a></p>
343       </div>
344     </div>
345
346 </t>
347 <t t-name="UserMenu.password">
348     <form name="change_password_form" method="POST">
349         <table align="center">
350             <tr>
351                 <td><label for="old_pwd">Old Password:</label></td>
352                 <td><input type="password" name="old_pwd"
353                            minlength="1" autofocus="autofocus"/></td>
354             </tr>
355             <tr>
356             <td><label for="new_password">New Password:</label></td>
357             <td><input type="password" name="new_password"
358                        minlength="1" autofocus="autofocus"/></td>
359             </tr>
360             <tr>
361                 <td><label for="confirm_pwd">Confirm Password:</label></td>
362                 <td><input type="password" name="confirm_pwd"
363                              minlength="1"/></td>
364             </tr>
365             <tr>
366                 <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
367             </tr>
368         </table>
369     </form>
370 </t>
371
372 <t t-name="WebClient">
373     <div class="openerp openerp_webclient_container">
374     <table class="oe_webclient">
375         <tr>
376             <td colspan="2" class="oe_topbar">
377                 <div class="oe_menu_placeholder"/>
378                 <div class="oe_user_menu_placeholder"/>
379                 <div class="oe_systray"/>
380             </td>
381         </tr>
382         <tr>
383             <td class="oe_leftbar" valign="top">
384                 <t t-js="d">
385                     d.url = '/' + (window.location.search || '');
386                 </t>
387                 <a t-att-href="url" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
388                 <div class="oe_secondary_menus_container"/>
389                 <div class="oe_footer">
390                     Powered by <a href="http://www.openerp.com"><span>Open</span>ERP</a>
391                 </div>
392             </td>
393             <td class="oe_application">
394             </td>
395         </tr>
396     </table>
397     </div>
398 </t>
399
400 <t t-name="EmbedClient">
401     <div class="openerp">
402         <div class="oe_application"></div>
403     </div>
404 </t>
405
406 <t t-name="ViewManager">
407     <div class="oe_view_manager">
408         <table class="oe_view_manager_header">
409             <col width="20%"/>
410             <col width="25%"/>
411             <col width="20%"/>
412             <col width="35%"/>
413             <tr class="oe_header_row oe_header_row_top">
414                 <td colspan="2">
415                         <h2 class="oe_view_title" t-if="widget.flags.display_title !== false">
416                             <span class="oe_view_title_text oe_breadcrumb_title"/>
417                         </h2>
418                 </td>
419                 <td colspan="2">
420                         <div class="oe_view_manager_view_search" t-opentag="true"/>
421                 </td>
422             </tr>
423             <tr class="oe_header_row">
424                 <td>
425                         <div class="oe_view_manager_buttons"/>
426                 </td>
427                 <td colspan="2">
428                         <div class="oe_view_manager_sidebar"/>
429                 </td>
430                 <td>
431                     <ul class="oe_view_manager_switch oe_button_group oe_right">
432                         <t t-if="widget.views_src.length > 1" t-foreach="widget.views_src" t-as="view">
433                           <li class="oe_e"><a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="_t('Switch to ') + (view.label || view.view_type)">
434                             </a></li>
435                         </t>
436                     </ul>
437                     <div class="oe_view_manager_pager oe_right"/>
438                 </td>
439             </tr>
440         </table>
441
442         <div class="oe_view_manager_body">
443             <t t-foreach="widget.views_src" t-as="view">
444                 <div t-attf-class="oe_view_manager_view_#{view.view_type}"/>
445             </t>
446         </div>
447     </div>
448 </t>
449
450 <t t-name="ViewManagerAction" t-extend="ViewManager">
451     <t t-jquery="h2.oe_view_title" t-operation="before">
452         <select t-if="widget.session.debug" class="oe_debug_view"/>
453     </t>
454 </t>
455 <t t-name="ViewManagerDebug">
456     <option value="">Debug View#<t t-esc="view.fields_view.view_id"/></option>
457     <option t-if="view_manager.active_view === 'form'" value="perm_read" data-views="form,page">View Log (perm_read)</option>
458     <option t-if="view_manager.active_view === 'form'" value="toggle_layout_outline">Toggle Form Layout Outline</option>
459     <option value="fields">View Fields</option>
460     <option value="fvg">Fields View Get</option>
461     <option value="manage_filters">Manage Filters</option>
462     <t t-if="view_manager.session.uid === 1">
463         <option value="manage_views">Manage Views</option>
464         <option value="edit" data-model="ir.ui.view" t-att-data-id="view.fields_view.view_id">Edit <t t-esc="_.str.capitalize(view.fields_view.type)"/>View</option>
465         <option t-if="view_manager.searchview" value="edit" data-model="ir.ui.view" t-att-data-id="view_manager.searchview.view_id">Edit SearchView</option>
466         <option t-if="view_manager.action" value="edit" t-att-data-model="view_manager.action.type" t-att-data-id="view_manager.action.id">Edit Action</option>
467         <option value="edit_workflow">Edit Workflow</option>
468     </t>
469 </t>
470 <t t-name="ViewManagerDebugViewLog">
471     <div class="oe_debug_view_log">
472         <label>ID:</label>
473         <span><t t-esc="perm.id"/></span>
474
475         <label>XML ID:</label>
476         <span><t t-esc="perm.xmlid"/></span>
477
478         <label>Creation User:</label>
479         <span><t t-esc="format(perm.create_uid, { 'type' : 'many2one' }, '/')"/></span>
480
481         <label>Creation Date:</label>
482         <span><t t-esc="format(perm.create_date, { 'type' : 'datetime' }, '/')"/></span>
483
484         <label>Latest Modification by:</label>
485         <span><t t-esc="format(perm.write_uid, { 'type' : 'many2one' }, '/')"/></span>
486
487         <label>Latest Modification Date:</label>
488         <span><t t-esc="format(perm.write_date, { 'type' : 'datetime' }, '/')"/></span>
489     </div>
490 </t>
491 <t t-name="ViewPager">
492     <div class="oe_pager_value">
493         <t t-raw="__content__"/>
494     </div>
495     <ul class="oe_pager_group">
496         <!--
497         <button class="oe_button oe_button_pager" type="button" data-pager-action="first">
498             <img t-att-src='_s + "/web/static/src/img/pager_first.png"'/>
499         </button>
500         -->
501         <li>
502             <a class="oe_i" type="button" data-pager-action="previous">(</a>
503         </li>
504         <li>
505             <a class="oe_i" type="button" data-pager-action="next">)</a>
506         </li>
507         <!--
508         <button class="oe_button oe_button_pager" type="button" data-pager-action="last">
509             <img t-att-src='_s + "/web/static/src/img/pager_last.png"'/>
510         </button>
511         -->
512     </ul>
513 </t>
514
515 <t t-name="Sidebar">
516     <div class="oe_sidebar">
517         <t t-foreach="widget.sections" t-as="section">
518             <div class="oe_form_dropdown_section">
519                 <button class="oe_dropdown_toggle oe_dropdown_arrow">
520                     <t t-esc="section.label"/>
521                 </button>
522                 <ul class="oe_dropdown_menu">
523                     <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
524                         <a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
525                             <t t-raw="item.label"/>
526                         </a>
527                         <a t-if="section.name == 'files'" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a>
528                     </li>
529                     <li t-if="section.name == 'files'" class="oe_sidebar_add_attachment">
530                         <t t-call="HiddenInputFile">
531                             <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
532                             <t t-set="fileupload_action">/web/binary/upload_attachment</t>
533                             <input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/>
534                             <input type="hidden" name="id" t-att-value="widget.model_id"/>
535                             <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
536                             <span>Add...</span>
537                         </t>
538                     </li>
539                 </ul>
540             </div>
541         </t>
542     </div>
543 </t>
544
545 <t t-name="TreeView">
546     <div class = "tree_header">
547          <select t-if="toolbar" ></select>
548          <button id = "tree_view_collapse">Collapse All</button>
549          <button id = "tree_view_expand">Expand All</button>
550      </div>
551     <table class="oe-treeview-table">
552         <thead>
553             <tr>
554                 <th t-foreach="fields_view" t-as="field"
555                     t-if="!field.attrs.modifiers.tree_invisible">
556                     <t t-esc="fields[field.attrs.name].string" />
557                 </th>
558             </tr>
559         </thead>
560         <tbody>
561         </tbody>
562     </table>
563 </t>
564 <tr t-name="TreeView.rows"
565         t-foreach="records" t-as="record"
566         t-att-id="'treerow_' + record.id"
567         t-att-data-id="record.id" t-att-data-level="level">
568     <t t-set="children" t-value="record[children_field]"/>
569     <t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
570     <t t-set="rank" t-value="'oe-treeview-first'"/>
571     <t t-set="style" t-value="'background-position: ' + 19*(level-1) + 'px; padding-left: ' + 19*(level-1) + 'px;'"/>
572
573     <td t-foreach="fields_view" t-as="field"
574         t-if="!field.attrs.modifiers.tree_invisible"
575         t-att-data-id="record.id"
576         t-att-style="color_for(record) + style "
577         t-attf-class="#{class} #{rank} #{(fields[field.attrs.name].type === 'float') or (fields[field.attrs.name].type === 'integer') ? 'oe_number' : ''}">
578
579         <span t-if="!field.attrs.modifiers.invisible" >
580             <t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
581         </span>
582
583         <t t-set="class" t-value="'treeview-td'"/>
584         <t t-set="rank" t-value="''"/>
585         <t t-set="style" t-value="''"/>
586     </td>
587 </tr>
588
589 <table t-name="ListView" class="oe_list_content">
590     <t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
591     <thead>
592         <tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
593             <th t-att-colspan="columns_count">
594                 <div class="oe_list_buttons"/>
595                 <div class="oe_list_sidebar"/>
596                 <div class="oe_list_pager"/>
597             </th>
598         </tr>
599         <tr t-if="options.header" class="oe_list_header_columns">
600             <t t-foreach="columns" t-as="column">
601                 <th t-if="column.meta">
602                     <t t-esc="column.string"/>
603                 </th>
604             </t>
605             <th t-if="options.selectable" width="1"  >
606                 <input type="checkbox" class="oe_list_record_selector"/>
607             </th>
608             <t t-foreach="columns" t-as="column">
609                 <th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
610                     t-att-class="((options.sortable and column.tag !== 'button') ? 'oe_sortable' : null)">
611                     <t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
612                 </th>
613             </t>
614             <th t-if="options.deletable" width="1"/>
615         </tr>
616     </thead>
617     <tfoot>
618         <tr>
619             <td t-if="options.selectable"/>
620             <td t-foreach="aggregate_columns" t-as="column" class="oe_list_footer oe_number"
621                 t-att-data-field="column.id" t-att-title="column.label">
622             </td>
623             <td t-if="options.deletable"/>
624         </tr>
625     </tfoot>
626 </table>
627 <div t-name="ListView.buttons" class="oe_list_buttons">
628     <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable">
629         <button type="button" class="oe_button oe_list_add oe_highlight">
630             <t t-esc="widget.options.addable"/>
631         </button>
632         <span class="oe_alternative" t-if="widget.options.import_enabled">
633             <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a>
634         </span>
635     </t>
636 </div>
637 <t t-name="ListView.pager">
638     <div class="oe_list_pager" t-att-colspan="widget.columns_count">
639         <t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
640             <span class="oe_list_pager_state">
641             </span>
642         </t>
643     </div>
644 </t>
645 <t t-name="ListView.rows" t-foreach="records.length" t-as="index">
646     <t t-call="ListView.row">
647         <t t-set="record" t-value="records.at(index)"/>
648     </t>
649 </t>
650 <tr t-name="ListView.row"
651         t-att-data-id="record.get('id')"
652         t-att-style="view.style_for(record)">
653     <t t-set="asData" t-value="record.toForm().data"/>
654     <t t-foreach="columns" t-as="column">
655         <td t-if="column.meta"> </td>
656     </t>
657     <th t-if="options.selectable" class="oe_list_record_selector" width="1">
658         <t t-set="checked" t-value="options.select_view_id == record.get('id') ? 'checked' : null"/>
659         <input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
660         <input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
661     </th>
662     <t t-foreach="columns" t-as="column">
663         <t t-set="number" t-value="column.type === 'integer' or column.type == 'float'"/>
664         <t t-set="modifiers" t-value="column.modifiers_for(asData)"/>
665         <td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
666             t-attf-class="oe_list_field_cell oe_list_field_#{column.widget or column.type} #{number ? 'oe_number' : ''} #{column.tag === 'button' ? 'oe-button' : ''} #{modifiers.readonly ? 'oe_readonly' : ''}"
667             t-att-data-field="column.id"
668             ><t t-raw="render_cell(record, column)"/></td>
669     </t>
670     <td t-if="options.deletable" class='oe_list_record_delete' width="1">
671         <button type="button" name="delete" class="oe_i">d</button>
672     </td>
673 </tr>
674 <t t-extend="ListView.buttons">
675     <t t-jquery="button.oe_list_add" t-operation="after">
676         <button class="oe_button oe_list_save oe_highlight"
677                 type="button">Save</button>
678     </t>
679     <t t-jquery="a.oe_list_button_import" t-operation="after">
680         <a href="#" class="oe_bold oe_list_discard">discard</a>
681     </t>
682 </t>
683 <t t-extend="ListView.row">
684     <!-- adds back padding to row being rendered after edition, if necessary
685          (if not deletable add back padding), otherwise the row being added is
686          missing columns
687      -->
688     <t t-jquery="&gt; :last" t-operation="after">
689         <td t-if="edited and !options.deletable" class="oe-listview-padding"/>
690     </t>
691 </t>
692
693 <t t-name="FormView">
694     <div class="oe_formview">
695         <div class="oe_form_buttons"/>
696         <div class="oe_form_sidebar"/>
697         <div class="oe_form_pager"/>
698         <div class="oe_form_container"/>
699     </div>
700 </t>
701 <div t-name="FormView.buttons" class="oe_form_buttons">
702     <t t-if="widget.options.action_buttons !== false">
703         <span class="oe_form_buttons_view">
704             <button type="button" class="oe_button oe_form_button_edit">Edit</button>
705             <button type="button" class="oe_button oe_form_button_create">Create</button>
706         </span>
707         <span class="oe_form_buttons_edit">
708             <button type="button" class="oe_button oe_form_button_save oe_highlight">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
709         </span>
710     </t>
711 </div>
712 <t t-name="FormView.pager">
713     <div class="oe_form_pager">
714         <t t-if="widget.options.pager !== false" t-call="ViewPager">
715             <span class="oe_pager_index">0</span><span class="oe_pager_separator"> / </span><span class="oe_pager_count">0</span>
716         </t>
717     </div>
718 </t>
719 <form t-name="FormView.set_default">
720     <t t-set="args" t-value="widget.dialog_options.args"/>
721     <table style="width: 100%">
722         <tr>
723             <td>
724                 <label for="formview_default_fields"
725                        class="oe_label oe_align_right">
726                     Default:
727                 </label>
728             </td>
729             <td class="oe_form_required">
730                 <select id="formview_default_fields">
731                     <option value=""/>
732                     <option t-foreach="args.fields" t-as="field"
733                             t-att-value="field.name">
734                         <t t-esc="field.string"/> = <t t-esc="field.displayed"/>
735                     </option>
736                 </select>
737             </td>
738         </tr>
739         <tr t-if="args.conditions.length">
740             <td>
741                 <label for="formview_default_conditions"
742                        class="oe_label oe_align_right">
743                     Condition:
744                 </label>
745             </td>
746             <td>
747                 <select id="formview_default_conditions">
748                     <option value=""/>
749                     <option t-foreach="args.conditions" t-as="cond"
750                             t-att-value="cond.name + '=' + cond.value">
751                         <t t-esc="cond.string"/>=<t t-esc="cond.displayed"/>
752                     </option>
753                 </select>
754             </td>
755         </tr>
756         <tr>
757             <td colspan="2">
758                 <input type="radio" id="formview_default_self"
759                        value="self" name="scope" checked="checked"/>
760                 <label for="formview_default_self" class="oe_label"
761                        style="display: inline;">
762                     Only you
763                 </label>
764                 <br/>
765                 <input type="radio" id="formview_default_all"
766                        value="all" name="scope"/>
767                 <label for="formview_default_all" class="oe_label"
768                        style="display: inline;">
769                     All users
770                 </label>
771             </td>
772         </tr>
773     </table>
774 </form>
775
776 <t t-name="FormRenderingForm">
777     <div t-attf-class="#{classnames}">
778     </div>
779 </t>
780 <t t-name="FormRenderingSheet">
781     <div class="oe_form_sheetbg">
782         <div t-attf-class="oe_form_sheet oe_form_sheet_width #{classnames}">
783         </div>
784     </div>
785 </t>
786 <t t-name="FormRenderingGroup">
787     <t t-if="string" t-call="FormRenderingSeparator"/>
788     <table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/>
789 </t>
790 <t t-name="FormRenderingNotebook">
791     <div class="oe_clear">
792         <ul t-attf-class="oe_notebook #{classnames}">
793             <li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers">
794                 <a t-attf-href="##{page.id}">
795                     <t t-esc="page.string"/>
796                 </a>
797             </li>
798         </ul>
799     </div>
800 </t>
801 <t t-name="FormRenderingNotebookPage">
802     <div t-attf-class="oe_notebook_page #{classnames}" t-att-id="id">
803     </div>
804 </t>
805 <t t-name="FormRenderingSeparator">
806     <div t-attf-class="oe_horizontal_separator oe_clear #{classnames}">
807         <t t-esc="string"/>
808     </div>
809 </t>
810 <t t-name="FormRenderingLabel">
811     <label  t-att-for="_for"
812             t-att-title="help"
813             t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}">
814         <t t-esc="string"/>
815     </label>
816 </t>
817
818 <t t-name="Widget">
819     Unhandled widget
820     <t t-js="dict">console.warn('Unhandled widget', dict.widget);</t>
821 </t>
822 <t t-name="WidgetLabel.tooltip">
823     <div class="oe_tooltip_string" t-if="widget.string">
824         <t t-esc="widget.node.attrs.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t>
825     </div>
826     <p t-if="widget.node.attrs.help or (widget.field and widget.field.help)" class="oe_tooltip_help"><t t-esc="widget.node.attrs.help || widget.field.help"/></p>
827     <ul t-if="debug" class="oe_tooltip_technical">
828         <li data-item="field" t-if="widget.name">
829             <span class="oe_tooltip_technical_title">Field:</span>
830             <t t-esc="widget.name"/>
831         </li>
832         <li data-item="object" t-if="widget.view and widget.view.fields_view">
833             <span class="oe_tooltip_technical_title">Object:</span>
834             <t t-esc="widget.view.fields_view.model"/>
835         </li>
836         <li data-item="type" t-if="widget.field">
837             <span class="oe_tooltip_technical_title">Type:</span>
838             <t t-esc="widget.field.type"/>
839         </li>
840         <li t-if="widget.node.attrs.widget" data-item="widget">
841             <span class="oe_tooltip_technical_title">Widget:</span>
842             <t t-esc="widget.node.attrs.widget"/>
843         </li>
844         <li t-if="widget.node.attrs.size || (widget.field and widget.field.size)" data-item="size">
845             <span class="oe_tooltip_technical_title">Size:</span>
846             <t t-esc="widget.node.attrs.size || widget.field.size"/>
847         </li>
848         <li t-if="widget.node.attrs.context" data-item="context">
849             <span class="oe_tooltip_technical_title">Context:</span>
850             <t t-esc="widget.node.attrs.context_string"/>
851         </li>
852         <li t-if="widget.node.attrs.domain" data-item="domain">
853             <span class="oe_tooltip_technical_title">Domain:</span>
854             <t t-esc="widget.node.attrs.domain_string"/>
855         </li>
856         <li t-if="widget.node.attrs.modifiers and widget.node.attrs.modifiers != '{}'" data-item="modifiers">
857             <span class="oe_tooltip_technical_title">Modifiers:</span>
858             <t t-esc="widget.node.attrs.modifiers"/>
859         </li>
860         <li t-if="widget.field and widget.field.change_default" data-item="change_default">
861             <span class="oe_tooltip_technical_title">Change default:</span>
862             Yes
863         </li>
864         <li t-if="widget.node.attrs.on_change" data-item="on_change">
865             <span class="oe_tooltip_technical_title">On change:</span>
866             <t t-esc="widget.node.attrs.on_change"/>
867         </li>
868         <li t-if="widget.field and widget.field.relation" data-item="relation">
869             <span class="oe_tooltip_technical_title">Relation:</span>
870             <t t-esc="widget.field.relation"/>
871         </li>
872         <li t-if="widget.field and widget.field.selection" data-item="selection">
873             <span class="oe_tooltip_technical_title">Selection:</span>
874             <ul>
875                 <li t-foreach="widget.field.selection" t-as="option">
876                     [<t t-esc="option[0]"/>]
877                     <t t-if="option[1]"> - </t>
878                     <t t-esc="option[1]"/>
879                 </li>
880             </ul>
881         </li>
882     </ul>
883 </t>
884 <t t-name="FieldChar">
885     <span t-att-class="'oe_form_field '+widget.widget_class" t-att-style="widget.node.attrs.style">
886         <t  t-if="!widget.get('effective_readonly')">
887             <input t-att-type="widget.password ? 'password' : 'text'"
888                 t-att-id="widget.id_for_label"
889                 t-att-tabindex="widget.node.attrs.tabindex"
890                 t-att-autofocus="widget.node.attrs.autofocus"
891                 t-att-placeholder="widget.node.attrs.placeholder"
892             /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
893         </t>
894     </span>
895 </t>
896 <t t-name="FieldEmail">
897     <span class="oe_form_field oe_form_field_email" t-att-style="widget.node.attrs.style">
898         <a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri" target="_blank"/>
899         <t t-if="!widget.get('effective_readonly')">
900             <div>
901                 <input type="text"
902                     t-att-id="widget.id_for_label"
903                     t-att-tabindex="widget.node.attrs.tabindex"
904                     t-att-autofocus="widget.node.attrs.autofocus"
905                     t-att-placeholder="widget.node.attrs.placeholder"
906                 />
907             </div>
908         </t>
909     </span>
910 </t>
911 <t t-name="FieldUrl" t-extend="FieldEmail">
912     <t t-jquery="span:first">
913         this.removeClass('oe_form_field_email').addClass('oe_form_field_url');
914     </t>
915 </t>
916 <t t-name="FieldText">
917     <div class="oe_form_field oe_form_field_text" t-att-style="widget.node.attrs.style">
918         <textarea rows="6"
919             t-att-name="widget.name"
920             class="field_text"
921             t-att-tabindex="widget.node.attrs.tabindex"
922             t-att-autofocus="widget.node.attrs.autofocus"
923             t-att-placeholder="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"
924         ></textarea>
925         <img class="oe_field_translate oe_input_icon" t-if="widget.field.translate"
926             t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
927     </div>
928 </t>
929 <t t-name="web.datepicker">
930     <span>
931         <t t-set="placeholder" t-value="widget.getParent().node and widget.getParent().node.attrs.placeholder"/>
932         <input type="text" class="oe_datepicker_container" disabled="disabled" style="display: none;"/>
933         <input type="text"
934             t-att-name="widget.name"
935             t-att-placeholder="placeholder"
936             class="oe_datepicker_master"
937         /><img class="oe_input_icon oe_datepicker_trigger" t-att-src='_s + "/web/static/src/img/ui/field_calendar.png"'
938              title="Select date" width="16" height="16" border="0"/>
939     </span>
940 </t>
941 <t t-name="FieldDate">
942     <span class="oe_form_field oe_datepicker_root oe_form_field_date" t-att-style="widget.node.attrs.style"/>
943 </t>
944 <t t-name="FieldDatetime">
945     <span class="oe_form_field oe_datepicker_root oe_form_field_datetime" t-att-style="widget.node.attrs.style"/>
946 </t>
947 <t t-name="FieldSelection">
948     <span class="oe_form_field oe_form_field_selection" t-att-style="widget.node.attrs.style">
949         <select t-if="!widget.get('effective_readonly')"
950             t-att-name="widget.name"
951             t-att-tabindex="widget.node.attrs.tabindex"
952             t-att-autofocus="widget.node.attrs.autofocus"
953             t-att-id="widget.id_for_label">
954                 <t t-foreach="widget.values" t-as="option">
955                     <option><t t-esc="option[1]"/></option>
956                 </t>
957         </select>
958     </span>
959 </t>
960 <t t-name="FieldMany2One">
961     <span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
962         <t t-if="widget.get('effective_readonly')">
963             <a t-if="! widget.get_definition_options().no_open" href="#" class="oe_form_uri"/>
964             <span t-if="widget.get_definition_options().no_open" href="#" class="oe_form_uri"/>
965             <span class="oe_form_m2o_follow"/>
966         </t>
967         <t t-if="!widget.get('effective_readonly')">
968             <a t-if="! widget.get_definition_options().no_open" href="#" tabindex="-1"
969                 class="oe_m2o_cm_button oe_e oe_right">/</a>
970             <div>
971                 <input type="text"
972                     t-att-id="widget.id_for_label"
973                     t-att-tabindex="widget.node.attrs.tabindex"
974                     t-att-autofocus="widget.node.attrs.autofocus"
975                     t-att-placeholder="widget.node.attrs.placeholder"
976                 />
977                 <span class="oe_m2o_drop_down_button">
978                     <img t-att-src='_s + "/web/static/src/img/down-arrow.png"'/>
979                 </span>
980             </div>
981         </t>
982     </span>
983 </t>
984 <t t-name="FieldMany2ManyTags">
985     <div class="oe_form_field oe_tags" t-att-style="widget.node.attrs.style">
986         <t t-if="! widget.get('effective_readonly')">
987             <textarea rows="1" style="width: 100%"
988                 t-att-placeholder="widget.node.attrs.placeholder"></textarea>
989         </t>
990     </div>
991 </t>
992 <t t-name="FieldMany2ManyTag">
993     <t t-set="i" t-value="0"/>
994     <t t-foreach="elements" t-as="el">
995         <span class="oe_tag" t-att-data-index="i">
996             <t t-esc="el[1]"/>
997         </span>
998         <t t-set="i" t-value="i + 1"/>
999     </t>
1000 </t>
1001 <t t-name="FieldReference">
1002     <table class="oe_form_field oe_form_field_reference" border="0" cellpadding="0" cellspacing="0" t-att-style="widget.node.attrs.style">
1003     <tr>
1004         <td t-attf-class="oe_form_frame_cell oe_form_selection">
1005             <span t-attf-class="oe_form_view_reference_selection"/>
1006         </td>
1007         <td t-attf-class="oe_form_frame_cell oe_form_many2one" nowrap="true">
1008             <span t-attf-class="oe_form_view_reference_m2o"/>
1009         </td>
1010     </tr>
1011     </table>
1012 </t>
1013 <t t-name="FieldBoolean">
1014     <span class="oe_form_field oe_form_field_boolean" t-att-style="widget.node.attrs.style">
1015         <input type="checkbox"
1016             t-att-id="widget.id_for_label"
1017             t-att-name="widget.name"
1018             t-att-tabindex="widget.node.attrs.tabindex"
1019             t-att-autofocus="widget.node.attrs.autofocus"
1020             class="field_boolean"/>
1021     </span>
1022 </t>
1023 <t t-name="FieldProgressBar">
1024     <span class="oe_form_field oe_form_field_progressbar" t-att-style="widget.node.attrs.style">
1025         <span></span>
1026     </span>
1027 </t>
1028 <t t-name="FieldStatus">
1029     <ul class="oe_form_steps" t-att-style="widget.node.attrs.style"/>
1030 </t>
1031 <t t-name="FieldStatus.content">
1032     <t t-set="size" t-value="widget.to_show.length"/>
1033     <t t-foreach="_.range(size)" t-as="i">
1034         <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
1035             <span><t t-esc="widget.to_show[i][1]"/></span>
1036             <img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
1037         </li>
1038     </t>
1039 </t>
1040 <t t-name="FieldBinaryImage">
1041     <span class="oe_form_field oe_form_field_image" t-att-style="widget.node.attrs.style">
1042         <div class="oe_form_field_image_controls oe_edit_only">
1043             <t t-call="HiddenInputFile">
1044                 <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
1045                 <button class="oe_button" type="button" title="Set Image">
1046                     <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
1047                 </button>
1048             </t>
1049             <button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
1050                 <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
1051             </button>
1052             <div class="oe_form_binary_progress" style="display: none">
1053                 <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
1054                 <b>Uploading ...</b>
1055             </div>
1056         </div>
1057     </span>
1058 </t>
1059 <t t-name="FieldBinaryImage-img">
1060     <img t-att-src='url'
1061         t-att-border="widget.readonly ? 0 : 1"
1062         t-att-name="widget.name"
1063         t-att-width="widget.node.attrs.img_width || widget.node.attrs.width"
1064         t-att-height="widget.node.attrs.img_height || widget.node.attrs.height"
1065     />
1066 </t>
1067 <t t-name="FieldBinaryFile">
1068     <t t-if="!widget.get('effective_readonly')">
1069         <table class="oe_form_field oe_form_field_binary" cellpadding="0" cellspacing="0" border="0" t-att-style="widget.node.attrs.style">
1070         <tr>
1071             <td>
1072                 <input type="text" size="1" readonly="readonly"
1073                     t-att-name="widget.name"
1074                     t-att-tabindex="widget.node.attrs.tabindex"
1075                     t-att-autofocus="widget.node.attrs.autofocus"
1076                     class="field_binary"
1077                 />
1078             </td>
1079             <td class="oe_form_binary" nowrap="true">
1080                 <table cellspacing="0" cellpadding="0" border="0">
1081                 <tr>
1082                     <td>
1083                         <t t-call="HiddenInputFile">
1084                             <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
1085                             <t t-set="fileupload_style">width: 83px;</t>
1086                             <button class="oe_button oe_field_button" type="button" title="Set Image">
1087                                 <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
1088                                 <span>Select</span>
1089                             </button>
1090                         </t>
1091                     </td>
1092                     <td>
1093                         <a class="oe_form_binary_file_save_data">
1094                             <button class="oe_button oe_form_binary_file_save" type="button" title="Save As">
1095                                 <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>
1096                                 <span>Save As</span>
1097                             </button>
1098                         </a>
1099                     </td>
1100                     <td>
1101                         <button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
1102                             <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
1103                             <span>Clear</span>
1104                         </button>
1105                     </td>
1106                 </tr>
1107                 </table>
1108             </td>
1109             <td class="oe_form_binary_progress" style="display: none" nowrap="true">
1110                 <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
1111                 <b>Uploading ...</b>
1112             </td>
1113         </tr>
1114         </table>
1115     </t>
1116     <t t-if="widget.get('effective_readonly')">
1117         <span t-att-style="widget.node.attrs.style">
1118             <a href="javascript:void(0)" class="oe_form_uri"/>
1119         </span>
1120     </t>
1121 </t>
1122 <t t-name="HiddenInputFile">
1123     <div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style">
1124         <form class="oe_form_binary_form" t-att-target="fileupload_id"
1125             method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'">
1126             <input type="hidden" name="session_id" value=""/>
1127             <input type="hidden" name="callback" t-att-value="fileupload_id"/>
1128             <t t-raw="__content__"/>
1129             <input type="file" class="oe_form_binary_file" name="ufile"/>
1130         </form>
1131         <iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
1132     </div>
1133 </t>
1134 <t t-name="WidgetButton">
1135     <button type="button" class="oe_button oe_form_button"
1136         t-att-style="widget.node.attrs.style"
1137         t-att-tabindex="widget.node.attrs.tabindex"
1138         t-att-autofocus="widget.node.attrs.autofocus">
1139         <img t-if="widget.node.attrs.icon" t-att-src="_s + widget.node.attrs.icon" width="16" height="16"/>
1140         <span t-if="widget.string"><t t-esc="widget.string"/></span>
1141     </button>
1142 </t>
1143 <t t-name="WidgetButton.tooltip" t-extend="WidgetLabel.tooltip">
1144     <t t-jquery="div.oe_tooltip_string" t-operation="replace">
1145         <div class="oe_tooltip_string" t-if="debug || widget.string">
1146             <t t-if="debug">
1147                 Button
1148                 <t t-if="widget.string">: </t>
1149                 <t t-if="!widget.string"> (no string)</t>
1150             </t>
1151             <t t-esc="widget.string"/>
1152         </div>
1153     </t>
1154     <t t-jquery="ul.oe_tooltip_technical" t-operation="append">
1155         <li t-if="widget.node.attrs.special" data-item="special">
1156             <span class="oe_tooltip_technical_title">Special:</span>
1157             <t t-esc="widget.node.attrs.special"/>
1158         </li>
1159         <t t-set="button_type" t-value="widget.node.attrs.type"/>
1160         <li t-if="button_type" data-item="button_type">
1161             <span class="oe_tooltip_technical_title">Button Type:</span>
1162             <t t-esc="button_type"/>
1163         </li>
1164         <li t-if="button_type === 'object'" data-item="button_method">
1165             <span class="oe_tooltip_technical_title">Method:</span>
1166             <t t-esc="widget.node.attrs.name"/>
1167         </li>
1168         <li t-if="button_type === 'action'" data-item="button_action">
1169             <span class="oe_tooltip_technical_title">Action ID:</span>
1170             <t t-esc="widget.node.attrs.name"/>
1171         </li>
1172     </t>
1173 </t>
1174
1175 <t t-name="TranslateDialog">
1176     <table t-if="widget.view.translatable_fields" class="oe_form oe_translation_form" border="0" cellpadding="0" cellspacing="0" width="100%">
1177     <tr>
1178         <td class="oe_form_separator" width="1%" nowrap="nowrap">
1179             <div class="oe_horizontal_separator">Field</div>
1180         </td>
1181         <th t-foreach="widget.languages" align="left">
1182             <div class="oe_horizontal_separator"><t t-esc="name"/></div>
1183         </th>
1184     </tr>
1185     <tr t-foreach="widget.view.translatable_fields" t-as="field" t-att-data-field="field.name">
1186         <td class="oe_form_group_cell" width="1%" nowrap="nowrap">
1187             <label class="oe_label"><t t-esc="field.node.attrs.string"/>:</label>
1188         </td>
1189         <td t-foreach="widget.languages" t-as="lg" class="oe_form_group_cell">
1190             <input t-if="field.type == 'char'" type="text" t-attf-name="#{lg.code}-#{field.name}" value="" data-value="" class="oe_trad_field" style="width: 100%"/>
1191             <textarea t-if="field.type == 'text'" t-attf-name="#{lg.code}-#{field.name}" data-value="" class="oe_trad_field" style="width: 100%"></textarea>
1192         </td>
1193     </tr>
1194     </table>
1195 </t>
1196
1197 <t t-name="AbstractFormPopup.render">
1198     <div>
1199         <table style="width:100%">
1200             <tr style="width:100%">
1201                 <td style="width:100%">
1202                     <div class="oe_popup_search" style="width:100%"></div>
1203                 </td>
1204             </tr>
1205             <tr style="width:100%">
1206                 <td style="width:100%">
1207                     <div class="oe_popup_list" style="width:100%"></div>
1208                 </td>
1209             </tr>
1210         </table>
1211         <div class="oe_popup_form" style="width:100%"></div>
1212     </div>
1213 </t>
1214 <t t-name="SelectCreatePopup.search.buttons">
1215     <t t-if="! widget.options.disable_multiple_selection">
1216         <button type="button" class="oe_button oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
1217         or
1218     </t>
1219     <a class="oe_button oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a>
1220 </t>
1221 <t t-name="AbstractFormPopup.buttons">
1222     <t t-if="! multi_select">
1223         <button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save</button>
1224     </t>
1225     <t t-if="multi_select">
1226         <button type="button" class="oe_button oe_abstractformpopup-form-save-new oe_highlight">Save &amp; New</button>
1227         <button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save &amp; Close</button>
1228     </t>
1229     or <a class="oe_button oe_abstractformpopup-form-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Discard</a>
1230 </t>
1231
1232 <t t-name="One2Many.viewmanager" t-extend="ViewManager">
1233     <t t-jquery=".oe-view-manager-header">
1234         this.attr('t-if', 'views.length != 1');
1235     </t>
1236 </t>
1237 <t t-name="One2Many.formview" t-extend="FormView">
1238     <t t-jquery=".oe_form_buttons" t-operation="inner">
1239         <button type="button" class="oe_button oe_form_button_create">Add</button>
1240     </t>
1241 </t>
1242 <t t-name="One2Many.listview" t-extend="ListView">
1243     <t t-jquery="thead.ui-widget-header > tr:first">
1244         this.removeAttr('t-if');
1245     </t>
1246
1247     <t t-jquery="tfoot &gt; tr:last-child" t-operation="replace"/>
1248
1249     <t t-jquery="td.oe-actions">
1250         this.removeAttr('t-if');
1251     </t>
1252     <t t-jquery="td.oe-actions" t-operation="prepend">
1253         <h3 class="oe_view_title"><t t-esc="fields_view.arch.attrs.string"/></h3>
1254     </t>
1255 </t>
1256
1257 <div t-name="SearchView" class="oe_searchview">
1258     <div class="oe_searchview_facets"/>
1259     <div class="oe_searchview_clear"/>
1260     <div class="oe_searchview_unfold_drawer" title="Advanced Search..."/>
1261     <div class="oe_searchview_drawer"/>
1262     <button type="button" class="oe_searchview_search"
1263             title="Search Again">Search</button>
1264 </div>
1265
1266 <div t-name="SearchView.InputView"
1267      class="oe_searchview_input"
1268      contenteditable="true"/>
1269 <!-- tabindex: makes div focusable -->
1270 <div t-name="SearchView.FacetView"
1271      class="oe_searchview_facet"
1272      tabindex="0"
1273     ><span class="oe_facet_remove">x</span
1274     ><span class="oe_facet_category oe_i" t-if="widget.model.has('icon')">
1275         <t t-esc="widget.model.get('icon')"/>
1276     </span
1277     ><span class="oe_facet_category" t-if="!widget.model.has('icon')">
1278         <t t-esc="widget.model.get('category')"/>
1279     </span ><span class="oe_facet_values"
1280 /></div>
1281 <span t-name="SearchView.FacetView.Value" class="oe_facet_value">
1282     <t t-esc="widget.model.get('label')"/>
1283 </span>
1284 <t t-name="SearchView.managed-filters">
1285     <option class="oe_search_filters_title" value="">Filters</option>
1286     <optgroup label="-- Filters --">
1287         <t t-foreach="filters" t-as="filter">
1288             <option t-attf-value="get:#{filter_index}"
1289                     t-att-disabled="filter.disabled and 'disabled'"
1290                     t-att-title="filter.disabled and disabled_filter_message">
1291                 <t t-esc="filter.name"/>
1292             </option>
1293         </t>
1294     </optgroup>
1295     <optgroup label="-- Actions --">
1296         <option value="advanced_filter">Add Advanced Filter</option>
1297         <option value="save_filter">Save Filter</option>
1298         <option value="manage_filters">Manage Filters</option>
1299     </optgroup>
1300 </t>
1301 <t t-name="SearchView.managed-filters.add">
1302     <div>
1303         <p>Filter Name:</p>
1304         <input type="text"/>
1305         <p>(Any existing filter with the same name will be replaced)</p>
1306     </div>
1307 </t>
1308 <t t-name="SearchView.render_lines">
1309     <table class="oe_search_render_line" border="0" cellspacing="0" cellpadding="0"
1310            t-foreach="lines" t-as="line">
1311         <tr>
1312             <td t-foreach="line" t-as="widget" class="oe_searchview_field">
1313                 <t t-raw="widget.render(defaults)"/>
1314             </td>
1315         </tr>
1316     </table>
1317 </t>
1318 <button t-name="SearchView.filter" type="button"
1319         t-att-id="element_id"
1320         t-att-title="attrs.help"
1321         t-att-class="classes.join(' ')"
1322         t-att-style="style"
1323         t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined">
1324     <img t-att-src="_s + '/web/static/src/img/icons/' + (attrs.icon || 'gtk-home') + '.png'" width="16" height="16"/>
1325     <br t-if="attrs.string"/>
1326     <t t-esc="attrs.string"/>
1327 </button>
1328 <ul t-name="SearchView.filters">
1329     <li t-foreach="widget.filters" t-as="filter"
1330             t-att-title="filter.attrs.string ? filter.attrs.help : undefined">
1331         <t t-esc="filter.attrs.string or filter.attrs.help or filter.attrs.name or 'Ω'"/>
1332     </li>
1333 </ul>
1334 <t t-name="SearchView.filters.facet">
1335     <div class="category oe_filter_category"><t t-esc="facet.get('category')"/></div>
1336
1337     <t t-set="val" t-value="facet.get('json')"/>
1338
1339     <div t-if="!(val instanceof Array)" class="search_facet_input_container">
1340         <t t-esc="facet.get('value')"/>
1341     </div>
1342     <t t-if="val instanceof Array">
1343         <div class="search_facet_input_container"
1344                 t-foreach="facet.get('json')" t-as="filter">
1345             <t t-esc="filter.attrs.string || filter.attrs.name"/>
1346         </div>
1347     </t>
1348
1349     <div class="search_facet_remove VS-icon VS-icon-cancel"/>
1350 </t>
1351 <t t-name="SearchView.field">
1352     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1353            t-att-title="attrs.help"
1354            t-att-for="element_id"
1355            t-att-style="style">
1356         <t t-esc="attrs.string || attrs.name"/>
1357         <span t-if="attrs.help">?</span>
1358     </label>
1359     <div t-att-style="style">
1360         <input type="text" size="15" t-att-name="attrs.name"
1361                t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined"
1362                t-att-id="element_id"
1363                t-att-value="defaults[attrs.name] || ''"/>
1364         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1365     </div>
1366 </t>
1367 <t t-name="SearchView.date">
1368     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1369            t-att-title="attrs.help"
1370            t-att-for="element_id"
1371            t-att-style="style">
1372         <t t-esc="attrs.string || attrs.name"/>
1373         <span t-if="attrs.help">?</span>
1374     </label>
1375     <div t-att-style="style">
1376         <span t-att-id="element_id"/>
1377         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1378     </div>
1379 </t>
1380 <t t-name="SearchView.field.selection">
1381     <label t-att-title="attrs.help"
1382            t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1383            t-att-for="element_id"
1384            t-att-style="style">
1385         <t t-esc="attrs.string || attrs.name"/>
1386         <span t-if="attrs.help">?</span>
1387     </label>
1388     <div t-att-style="style">
1389         <select t-att-name="attrs.name" t-att-id="element_id"
1390                 t-att-autofocus="attrs.default_focus === '1' || undefined">
1391             <option t-if="prepend_empty"/>
1392             <t t-foreach="attrs.selection" t-as="option">
1393                 <t t-set="selected" t-value="defaults[attrs.name] === option[0]"/>
1394                 <option t-if="selected"
1395                         t-attf-selected="selected"
1396                         t-att-value="option_index">
1397                     <t t-esc="option[1]"/>
1398                 </option>
1399                 <option t-if="!selected" t-att-value="option_index">
1400                     <t t-esc="option[1]"/>
1401                 </option>
1402             </t>
1403         </select>
1404         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1405     </div>
1406 </t>
1407 <t t-name="SearchView.util.expand">
1408     <div t-att-class="'searchview_group ' + (expand == '0' ? 'folded' : 'expanded')">
1409         <a t-if="label" class="searchview_group_string" href="#">
1410             <t t-esc="label"/>
1411         </a>
1412         <div class="searchview_group_content">
1413             <t t-raw="content"/>
1414         </div>
1415     </div>
1416 </t>
1417 <t t-name="SearchView.group">
1418     <t t-call="SearchView.util.expand">
1419         <t t-set="expand" t-value="attrs.expand"/>
1420         <t t-set="label" t-value="attrs.string"/>
1421         <t t-set="content">
1422             <t t-call="SearchView.render_lines"/>
1423         </t>
1424     </t>
1425 </t>
1426 <div t-name="SearchView.Filters" class="oe_searchview_filters oe_searchview_section">
1427
1428 </div>
1429 <div t-name="SearchView.CustomFilters" class="oe_searchview_custom oe_searchview_section">
1430     <div>
1431         <h3><span class="oe_i">M</span> Custom Filters</h3>
1432         <ul class="oe_searchview_custom_list"/>
1433         <div class="oe_searchview_custom">
1434           <h4>Save current filter</h4>
1435           <form>
1436             <p><input id="oe_searchview_custom_input" placeholder="Filter name"/></p>
1437             <p><input id="oe_searchview_custom_public" type="checkbox"/>
1438               <label for="oe_searchview_custom_public">Share with all users</label></p>
1439             <button>Save</button>
1440           </form>
1441         </div>
1442     </div>
1443     <div>
1444     </div>
1445 </div>
1446 <div t-name="SearchView.addtodashboard" class="oe_searchview_dashboard">
1447     <h4>Add to Dashboard</h4>
1448     <form>
1449         <p><input placeholder="Title of new Dashboard item"
1450                   title="Title of new Dashboard item" type="text"/></p>
1451         <button class="oe_apply" type="submit">Save</button>
1452     </form>
1453 </div>
1454 <t t-name="SearchView.addtodashboard.selection">
1455     <select title="Select Dashboard to add this filter to">
1456         <option t-foreach="selections" t-as="element"
1457                 t-att-value="element.id || element.res_id ">
1458             <t t-esc="element.name"/></option>
1459     </select>
1460 </t>
1461 <div t-name="SearchView.advanced" class="oe_searchview_advanced">
1462     <h4>Advanced Search</h4>
1463     <form>
1464         <ul>
1465
1466         </ul>
1467         <button class="oe_add_condition button" type="button">Add a condition</button><br/>
1468         <button class="oe_apply" type="submit">Apply</button>
1469     </form>
1470 </div>
1471 <t t-name="SearchView.extended_search.proposition">
1472     <li>
1473         <select class="searchview_extended_prop_field">
1474             <t t-foreach="widget.attrs.fields" t-as="field">
1475                 <option t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
1476                         t-att-value="field.name">
1477                     <t t-esc="field.string"/>
1478                 </option>
1479             </t>
1480         </select>
1481         <select class="searchview_extended_prop_op"/>
1482         <span class="searchview_extended_prop_value"/>
1483         <a class="searchview_extended_delete_prop button">x</a>
1484     </li>
1485 </t>
1486 <t t-name="SearchView.extended_search.proposition.char">
1487     <input class="field_char"/>
1488 </t>
1489 <t t-name="SearchView.extended_search.proposition.empty">
1490     <span/>
1491 </t>
1492 <t t-name="SearchView.extended_search.proposition.integer">
1493     <input type="number" class="field_integer" step="1"/>
1494 </t>
1495 <t t-name="SearchView.extended_search.proposition.float">
1496     <input type="number" class="field_float" step="0.01"/>
1497 </t>
1498 <t t-name="SearchView.extended_search.proposition.selection">
1499     <select>
1500         <t t-foreach="widget.field.selection" t-as="element">
1501         <option t-att-value="element[0]"><t t-esc="element[1]"/></option>
1502         </t>
1503     </select>
1504 </t>
1505
1506 <t t-name="view_editor">
1507     <table class="oe_view_editor">
1508         <t t-call="view_editor.row"/>
1509     </table>
1510 </t>
1511 <t t-name="view_editor.row">
1512     <tr  t-att-id="'viewedit-' + rec.id"  t-att-level="rec.level" t-foreach="data" t-as="rec">
1513         <td width="90%">
1514             <table class="oe_view_editor_field">
1515                 <tr>
1516                     <td width="16px" t-att-style="'background-position: ' + 20*rec.level + 'px; padding-left: ' + 20*rec.level + 'px'">
1517                         <img t-if="rec.child_id.length" t-att-id="'parentimg-' + rec.id"
1518                             t-att-src='_s + "/web/static/src/img/collapse.gif"' width="16" height="16" border="0"/>
1519                     </td>
1520                     <td style="cursor: pointer;">
1521                         <a style="text-decoration:none" href="javascript:void(0);">
1522                             <t t-esc="rec.name"/>
1523                         </a>
1524                     </td>
1525                 </tr>
1526             </table>
1527         </td>
1528         <td width="2%">
1529             <img t-if="rec.att_list.length"
1530                 id="side-add" t-att-src='_s + "/web/static/src/img/icons/gtk-add.png"' style="cursor: pointer;"/>
1531         </td>
1532         <td width="2%">
1533             <img  id="side-remove" t-att-src='_s + "/web/static/src/img/icons/gtk-remove.png"' style="cursor: pointer;"/>
1534         </td>
1535         <td width="2%">
1536             <img t-if="rec.att_list.length and !_.include(no_properties, rec.att_list[0])"
1537                 id="side-edit" t-att-src='_s + "/web/static/src/img/icons/gtk-edit.png"' style="cursor: pointer;"/>
1538         </td>
1539         <td width="2%">
1540             <img t-if="rec.att_list.length"
1541                 id="side-up" t-att-src='_s + "/web/static/src/img/icons/gtk-go-up.png"' style="cursor: pointer;"/>
1542         </td>
1543         <td width="2%">
1544             <img t-if="rec.att_list.length"
1545                 id="side-down" t-att-src='_s + "/web/static/src/img/icons/gtk-go-down.png"' style="cursor: pointer;"/>
1546         </td>
1547         <t t-if="rec.child_id.length">
1548             <t t-set="data" t-value="rec.child_id"/>
1549             <t t-call="view_editor.row"/>
1550         </t>
1551     </tr>
1552 </t>
1553 <t t-name="vieweditor_char">
1554     <input type="text" t-att-id="widget.name" class="field_char" size="50"/>
1555 </t>
1556 <t t-name="vieweditor_selection">
1557     <select t-att-id="widget.name" >
1558         <t t-if="widget.selection" t-foreach="widget.selection" t-as="option">
1559             <option
1560                 t-att-value="typeof option === 'object' ? option[0] : option">
1561                 <t t-esc="typeof option === 'object' ? option[1] : option"/>
1562             </option>
1563         </t>
1564     </select>
1565 </t>
1566 <t t-name="vieweditor_boolean">
1567     <input type="checkbox" t-att-id="widget.name"/>
1568 </t>
1569
1570 <t t-name="ExportView">
1571     <a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
1572 </t>
1573 <table t-name="ExportTreeView" class="oe_export"
1574        style="background-color: #F3F3F3;">
1575     <tr>
1576         <td colspan="3">
1577             This wizard will export all data that matches the current search criteria to a CSV file.
1578             You can export all data or only the fields that can be reimported after modification.
1579         </td>
1580     </tr>
1581     <tr>
1582         <td colspan="3">
1583             <label for="import_compat">Export Type:</label>
1584             <select id="import_compat" name="import_compat">
1585                 <option value="yes">Import Compatible Export</option>
1586                 <option value="">Export all Data</option>
1587             </select>
1588
1589             <label for="export_format">Export Formats</label>
1590             <select id="export_format" name="export_format"></select>
1591         </td>
1592     </tr>
1593
1594     <tr>
1595         <th>Available fields</th>
1596         <th/>
1597         <th>
1598             Fields to export
1599             <a style="color: blue; text-decoration: none;" href="#" id="export_new_list">Save fields list</a>
1600             <div id="savenewlist"></div>
1601             <div id="ExistsExportList"></div>
1602         </th>
1603     </tr>
1604     <tr style="height: 400px;">
1605         <td class="oe_export_fields_selector_left">
1606             <div id="left_field_panel">
1607             </div>
1608         </td>
1609         <td class="oe_export_fields_selector_center">
1610             <!-- TODO: replace ids by 'oe_*' classes -->
1611             <button class="oe_button" id="add_field">Add</button>
1612             <button class="oe_button" id="remove_field">Remove</button>
1613             <button class="oe_button" id="remove_all_field">Remove All</button>
1614         </td>
1615         <td class="oe_export_fields_selector_right">
1616             <select name="fields_list" id="fields_list"
1617                     multiple="multiple"></select>
1618         </td>
1619     </tr>
1620 </table>
1621 <table t-name="ExportTreeView-Secondary"
1622        id="field-tree-structure" class="oe_export_fields_selector_export"
1623        cellspacing="0" cellpadding="0">
1624     <tr><th class="oe_export_tree_header"> Name </th></tr>
1625     <t t-call="ExportTreeView-Secondary.children"/>
1626 </table>
1627 <tr t-name="ExportTreeView-Secondary.children"
1628     t-foreach="fields" t-as="field"
1629     t-att-id="'treerow-' + field.id" class="oe_export_row">
1630     <td>
1631         <table class="tree_grid" border="0">
1632             <tr class="oe_export_row">
1633                 <t t-foreach="(field.id).split('/')" t-as="level" >
1634                     <t t-if="(field.id).split('/')[0] != level">
1635                         <td width="18" t-translation="off">&amp;nbsp;</td>
1636                     </t>
1637                 </t>
1638                 <td valign="top" align="left" style="cursor: pointer;" width="18">
1639                     <t t-if="field.children">
1640                         <t t-if="(field.id).split('/').length != 3">
1641                             <img t-att-id="'parentimg-' + field.id" t-att-src='_s + "/web/static/src/img/expand.gif"' width="16" height="16" border="0"/>
1642                         </t>
1643                     </t>
1644                 </td>
1645                 <td id="tree-column" valign="middle" align="left" style="cursor: pointer;">
1646                     <a t-att-id="'export-' + field.id"  t-att-string="field.string" href="javascript: void(0);" style="text-decoration: none;">
1647                         <t t-esc="field.string"/>
1648                     </a>
1649                 </td>
1650             </tr>
1651         </table>
1652     </td>
1653 </tr>
1654 <t t-name="ExportNewList">
1655     <tr>
1656         <th><label>Save as:</label></th>
1657         <td><input size="10" type="text" id="savelist_name"/></td>
1658         <td><button class="oe_button oe_export_button_export" id="add_export_list">Ok</button></td>
1659     </tr>
1660 </t>
1661 <t t-name="Exists.ExportList">
1662     <label for="saved_export_list">Saved exports:</label>
1663
1664     <select id="saved_export_list">
1665         <option></option>
1666         <t t-foreach="existing_exports" t-as="export">
1667             <option t-att-value="export.id"><t t-esc="export.name"/></option>
1668         </t>
1669     </select>
1670     <button class="oe_button oe_export_button_export" id="delete_export_list" type="button">Delete</button>
1671 </t>
1672
1673 <t t-name="ImportView">
1674     <a id="importview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Import</a>
1675 </t>
1676 <t t-name="ImportDataView">
1677 <form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data"
1678         class="oe_import oe_import_no_result">
1679     <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
1680     <h2 class="separator horizontal">1. Import a .CSV file</h2>
1681     <p>Select a .CSV file to import. If you need a sample of file to import,
1682        you should use the export tool with the "Import Compatible" option.
1683     </p>
1684     <p>
1685         <label for="csvfile">CSV File:</label>
1686         <input type="file" id="csvfile" size="50" name="csvfile"/>
1687     </p>
1688     <h2 class="separator horizontal oe_import_result">2. Check your file format</h2>
1689     <div id="result" class="oe_import_result"></div>
1690     <fieldset class="oe_closed oe_import_result">
1691         <legend>Import Options</legend>
1692         <table>
1693             <tr>
1694                 <td colspan="4">
1695                     <label for="file_has_headers">Does your file have titles?</label>
1696                     <input type="checkbox" checked="checked"
1697                            id="file_has_headers"/>
1698                 </td>
1699             </tr>
1700             <tr>
1701                 <td><label for="csv_separator">Separator:</label></td>
1702                 <td><input type="text" name="csvsep" id="csv_separator" value=","/></td>
1703                 <td><label for="csv_delimiter">Delimiter:</label></td>
1704                 <td><input type="text" name="csvdel" id="csv_delimiter" value='"'/></td>
1705             </tr>
1706             <tr>
1707                 <td><label for="csv_encoding">Encoding:</label></td>
1708                 <td>
1709                     <select name="csvcode" id="csv_encoding">
1710                         <option value="utf-8">UTF-8</option>
1711                         <option value="latin1">Latin 1</option>
1712                     </select>
1713                 </td>
1714                 <td><label for="csv_skip" title="For use if CSV files have titles on multiple lines, skips more than a single line during import">
1715                     Lines to skip<sup>?</sup>:</label></td>
1716                 <td><input type="number" id="csv_skip" value="0" min="0"/></td>
1717             </tr>
1718         </table>
1719     </fieldset>
1720 </form>
1721 </t>
1722 <t t-name="ImportView.result">
1723     <table class="oe_import_grid" width="100%" style="margin: 5px 0;">
1724         <tr t-if="headers" class="oe_import_grid-header">
1725             <td t-foreach="headers" t-as="header" class="oe_import_grid-cell">
1726                 <t t-esc="header"/></td>
1727         </tr>
1728         <tr>
1729             <td t-foreach="records[0]" t-as="column">
1730                 <input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe_m2o_drop_down_button">
1731                         <img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
1732             </td>
1733         </tr>
1734         <tr t-foreach="records" t-as="record" class="oe_import_grid-row">
1735             <td t-foreach="record" t-as="cell" class="oe_import_grid-cell">
1736                 <t t-esc="cell"/></td>
1737         </tr>
1738     </table>
1739 </t>
1740 <t t-name="ImportView.error">
1741     <p style="white-space:pre;">The import failed due to:<t t-esc="error.message"/></p>
1742     <t t-if="error.preview">
1743         <p>Here is a preview of the file we could not import:</p>
1744         <pre><t t-esc="error.preview"/></pre>
1745     </t>
1746 </t>
1747 <div t-name="Many2ManyKanban.quick_create" class="oe_kanban_quick_create">
1748     <input t-att-placeholder="_t('Type name to search')"/>
1749 </div>
1750
1751 </templates>