0df4ca7177729c4740f95effb86f6092f698e415
[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_form_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" class="oe_forms" 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_]+$"/></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" class="oe_forms" 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" class="oe_forms" 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" class="oe_forms" 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" class="oe_forms" 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="WebClient">
268     <table class="oe_webclient">
269         <tr>
270             <td colspan="2" class="oe_topbar">
271                 <div class="oe_menu_placeholder"/>
272                 <div class="oe_user_menu_placeholder"/>
273                 <div class="oe_systray"/>
274             </td>
275         </tr>
276         <tr>
277             <td class="oe_leftbar" valign="top">
278                 <a href="#" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
279                 <div class="oe_secondary_menus_container"/>
280                 <div class="oe_footer">
281                     Powered by <a href="http://www.openerp.com"><span>Open</span>ERP</a>
282                 </div>
283             </td>
284             <td class="oe_application">
285             </td>
286         </tr>
287     </table>
288 </t>
289
290 <t t-name="Menu">
291     <ul class="oe_menu" t-if="widget.data">
292         <li t-foreach="widget.data.data.children" t-as="menu">
293             <t t-call="Menu.secondary.link"/>
294         </li>
295     </ul>
296 </t>
297 <t t-name="Menu.more">
298     <li class="oe_menu_more_container">
299         <a href="#" class="oe_menu_more_link oe_dropdown_toggle">More</a>
300         <ul class="oe_menu_more" style="display: none;"/>
301     </li>
302 </t>
303 <t t-name="Menu.secondary">
304     <div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
305         <t t-foreach="menu.children" t-as="menu">
306             <div class="oe_secondary_menu_section">
307                 <t t-esc="menu.name"/>
308                 <!--
309                     Shall the section be still clickable ?
310                     <t t-call="Menu.secondary.link"/>
311                 -->
312             </div>
313             <t t-call="Menu.secondary.submenu"/>
314         </t>
315     </div>
316 </t>
317 <t t-name="Menu.secondary.submenu">
318     <ul t-if="menu.children.length" class="oe_secondary_submenu">
319         <li t-foreach="menu.children" t-as="menu">
320             <t t-call="Menu.secondary.link"/>
321             <!--<span class="oe_menu_label">8</span>-->
322             <t t-call="Menu.secondary.submenu"/>
323         </li>
324     </ul>
325 </t>
326 <t t-name="Menu.secondary.link">
327     <a href="#"
328         t-att-class="menu.children.length ? 'oe_menu_toggler' : 'oe_menu_leaf'"
329         t-att-data-menu="menu.id"
330         t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
331         t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
332         <t t-esc="menu.name"/>
333         <t t-if="menu.needaction_enabled">
334             <div class="oe_menu_counter">
335                 <t t-esc="menu.needaction_counter"/>
336             </div>
337         </t>
338     </a>
339 </t>
340
341 <t t-name="UserMenu">
342     <ul class="oe_user_menu oe_topbar_item">
343         <li class="oe_dropdown">
344             <a href="#" class="oe_dropdown_toggle">
345                 <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/topbar-avatar.png'"/>
346                 <span class="oe_topbar_name"/>
347             </a>
348             <ul class="oe_dropdown_options">
349                 <!--<li><a href="#" data-menu="profile">Profile</a></li>-->
350                 <li><a href="#" data-menu="settings">Settings</a></li>
351                 <li><a href="#" data-menu="logout">Log out</a></li>
352                 <li><hr/></li>
353                 <li><a href="#" data-menu="about">About OpenERP</a></li>
354                 <li><hr/></li>
355             </ul>
356         </li>
357     </ul>
358 </t>
359 <t t-name="UserMenu.shortcut">
360     <li t-foreach="shortcuts" t-as="shortcut">
361         <a href="#" data-menu="shortcut" t-att-data-id="shortcut.res_id" t-att-data-shortcut-id="shortcut.id">
362             <t t-esc="shortcut.name"/>
363         </a>
364     </li>
365 </t>
366 <t t-name="About-Page">
367     <div>
368         <a class="oe_activate_debug_mode" href="?debug" style="float:right; font-size: 80%;">Activate the developper mode</a>
369         <h1 style="margin:0;">OpenERP</h1>
370         <h3 style="margin:15px 0;padding:0;">Version <t t-esc="version_info.version"/></h3>
371         <p>
372             Copyright Â© 2004-TODAY OpenERP SA. All Rights Reserved.<br />
373             OpenERP is a trademark of the <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP SA Company</a>.
374         </p>
375         <p>
376             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>
377         </p>
378         <p>
379             For more information visit <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP.com</a>
380         </p>
381     </div>
382 </t>
383 <t t-name="Change_Pwd">
384     <form name="change_password_form" class="oe_forms" method="POST">
385         <table align="center">
386             <tr>
387                 <td><label for="old_pwd">Old Password:</label></td>
388                 <td><input type="password" name="old_pwd"
389                            minlength="1" autofocus="autofocus"/></td>
390             </tr>
391             <tr>
392             <td><label for="new_password">New Password:</label></td>
393             <td><input type="password" name="new_password"
394                        minlength="1" autofocus="autofocus"/></td>
395             </tr>
396             <tr>
397                 <td><label for="confirm_pwd">Confirm Password:</label></td>
398                 <td><input type="password" name="confirm_pwd"
399                              minlength="1"/></td>
400             </tr>
401             <tr>
402                 <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
403             </tr>
404         </table>
405     </form>
406 </t>
407
408 <t t-name="ViewManager">
409     <div class="oe_view_manager">
410         <table class="oe_view_manager_header2">
411             <col width="33%"/>
412             <col width="33%"/>
413             <col width="34%"/>
414             <tr>
415                 <td colspan="2">
416                     <h2 class="oe_view_title" t-if="widget.flags.display_title !== false">
417                         <span class="oe_view_title_text"><t t-esc="widget.display_title()"/></span>
418                     </h2>
419                 </td>
420                 <td> <div class="oe_view_manager_view_search" t-opentag="true"/> </td>
421             </tr>
422             <tr>
423                 <td> <div class="oe_view_manager_buttons"/> </td>
424                 <td> <div class="oe_view_manager_sidebar"/> </td>
425                 <td>
426                     <ul class="oe_view_manager_switch oe_button_group oe_right">
427                         <t t-if="widget.views_src.length != 1" t-foreach="widget.views_src" t-as="view">
428                           <li><a t-attf-class="oe_vm_switch_#{view.view_type} oe_i" t-att-data-view-type="view.view_type" t-att-title="view.label || view.view_type">
429                             </a></li>
430                         </t>
431                     </ul>
432                     <div class="oe_view_manager_pager oe_right"/>
433                 </td>
434             </tr>
435         </table>
436         <div class="oe_view_manager_body">
437             <t t-foreach="widget.views_src" t-as="view">
438                 <div t-attf-class="oe_view_manager_view_#{view.view_type}"/>
439             </t>
440         </div>
441     </div>
442 </t>
443 <t t-name="ViewManagerAction" t-extend="ViewManager">
444     <t t-jquery="h2.oe_view_title" t-operation="prepend">
445         <a t-if="widget.flags.display_title !== false" class="oe-shortcut-toggle" title="Add / Remove Shortcut..."
446             href="javascript: void(0)"> </a>
447     </t>
448     <t t-jquery="h2.oe_view_title" t-operation="after">
449         <select t-if="widget.session.debug" class="oe_debug_view"/>
450     </t>
451 </t>
452 <t t-name="ViewManagerDebug">
453     <option value="">Debug View#<t t-esc="view.fields_view.view_id"/></option>
454     <option t-if="view_manager.active_view === 'form'" value="perm_read" data-views="form,page">View Log (perm_read)</option>
455     <option t-if="view_manager.active_view === 'form'" value="toggle_layout_outline">Toggle Form Layout Outline</option>
456     <option value="fields">View Fields</option>
457     <option value="fvg">Fields View Get</option>
458     <t t-if="view_manager.session.uid === 1">
459         <option value="manage_views">Manage Views</option>
460         <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>
461         <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>
462         <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>
463         <option value="edit_workflow">Edit Workflow</option>
464     </t>
465 </t>
466 <t t-name="ViewManagerDebugViewLog">
467     <div class="oe_debug_view_log">
468         <label>ID:</label>
469         <span><t t-esc="perm.id"/></span>
470
471         <label>XML ID:</label>
472         <span><t t-esc="perm.xmlid"/></span>
473
474         <label>Creation User:</label>
475         <span><t t-esc="format(perm.create_uid, { 'type' : 'many2one' }, '/')"/></span>
476
477         <label>Creation Date:</label>
478         <span><t t-esc="format(perm.create_date, { 'type' : 'datetime' }, '/')"/></span>
479
480         <label>Latest Modification by:</label>
481         <span><t t-esc="format(perm.write_uid, { 'type' : 'many2one' }, '/')"/></span>
482
483         <label>Latest Modification Date:</label>
484         <span><t t-esc="format(perm.write_date, { 'type' : 'datetime' }, '/')"/></span>
485     </div>
486 </t>
487 <t t-name="ViewPager">
488     <div class="oe_pager_value">
489         <t t-raw="__content__"/>
490     </div>
491     <ul class="oe_pager_group">
492         <!--
493         <button class="oe_button oe_button_pager" type="button" data-pager-action="first">
494             <img t-att-src='_s + "/web/static/src/img/pager_first.png"'/>
495         </button>
496         -->
497         <li>
498             <a class="oe_i" type="button" data-pager-action="previous">(</a>
499         </li>
500         <li>
501             <a class="oe_i" type="button" data-pager-action="next">)</a>
502         </li>
503         <!--
504         <button class="oe_button oe_button_pager" type="button" data-pager-action="last">
505             <img t-att-src='_s + "/web/static/src/img/pager_last.png"'/>
506         </button>
507         -->
508     </ul>
509 </t>
510
511 <t t-name="Sidebar">
512     <div class="oe_sidebar">
513         <t t-foreach="widget.sections" t-as="section">
514             <div class="oe_form_dropdown_section">
515                 <button class="oe_dropdown_toggle"><t t-esc="section.label"/></button>
516                 <ul class="oe_dropdown_menu">
517                     <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
518                         <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">
519                             <t t-raw="item.label"/>
520                         </a>
521                     </li>
522                 </ul>
523             </div>
524         </t>
525     </div>
526 </t>
527 <t t-name="Sidebar.attachments">
528     <div class="oe-sidebar-attachments-toolbar">
529         <div class="oe-binary-file-set" style="float: right">
530             <form class="oe-binary-form" t-attf-target="#{element_id}_iframe"
531                 method="post" enctype="multipart/form-data" action="/web/binary/upload_attachment">
532                 <input type="hidden" name="session_id" t-att-value="session.session_id"/>
533                 <input type="hidden" name="callback" t-attf-value="#{element_id}_iframe"/>
534                 <input type="hidden" name="model" t-att-value="view.dataset.model"/>
535                 <input type="hidden" name="id" t-att-value="view.datarecord.id"/>
536                 <button class="oe_button" type="button">
537                     <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16" style="display: none"/>
538                     <span>Add</span>
539                 </button>
540                 <input type="file" class="oe-binary-file" name="ufile" title="Add attachment"
541                     t-att-onclick="view.datarecord.id ? null : 'alert(\'No record selected ! You can only attach to existing record.\'); return false;'"/>
542             </form>
543             <iframe t-attf-id="#{element_id}_iframe" t-attf-name="#{element_id}_iframe" style="display: none"/>
544         </div>
545     </div>
546     <br style="clear: both"/>
547     <ul class="oe-sidebar-attachments-items">
548         <li t-foreach="attachments" t-as="attachment">
549             <t t-if="attachment.type == 'binary'" t-set="attachment.url" t-value="_s + '/web/binary/saveas?session_id='
550                 + session.session_id + '&amp;model=ir.attachment&amp;id=' + attachment.id
551                 + '&amp;field=datas&amp;filename_field=name&amp;t=' + (new Date().getTime())"/>
552             <a class="oe-sidebar-attachments-link" t-att-href="attachment.url" target="_blank">
553                 <t t-esc="attachment.name"/>
554             </a>
555             <a href="#" class="oe-sidebar-attachment-delete" t-att-data-id="attachment.id" t-attf-title="Delete the attachment #{attachment.name}">
556                 <img t-att-src='_s + "/web/static/src/img/attachments-close.png"' width="15" height="15" border="0"/>
557             </a>
558         </li>
559     </ul>
560 </t>
561
562 <t t-name="TreeView">
563     <select t-if="toolbar" style="width: 30%">
564     </select>
565     <table class="oe-treeview-table">
566         <thead>
567             <tr>
568                 <th t-foreach="fields_view" t-as="field"
569                     t-if="!field.attrs.modifiers.tree_invisible"
570                     class="treeview-header">
571                     <t t-esc="fields[field.attrs.name].string" />
572                 </th>
573             </tr>
574         </thead>
575         <tbody>
576         </tbody>
577     </table>
578 </t>
579 <tr t-name="TreeView.rows"
580         t-foreach="records" t-as="record"
581         t-att-id="'treerow_' + record.id"
582         t-att-data-id="record.id" t-att-data-level="level + 1">
583     <t t-set="children" t-value="record[children_field]"/>
584     <t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
585     <t t-set="rank" t-value="'oe-treeview-first'"/>
586     <t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
587
588     <td t-foreach="fields_view" t-as="field"
589         t-if="!field.attrs.modifiers.tree_invisible"
590         t-att-data-id="record.id"
591         t-att-style="color_for(record) + style "
592         t-attf-class="#{class} #{rank} #{(fields[field.attrs.name].type === 'float') or (fields[field.attrs.name].type === 'integer') ? 'oe-number' : ''}">
593
594         <span t-if="!field.attrs.modifiers.invisible" >
595             <t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
596         </span>
597
598         <t t-set="class" t-value="'treeview-td'"/>
599         <t t-set="rank" t-value="''"/>
600         <t t-set="style" t-value="''"/>
601     </td>
602 </tr>
603
604 <table t-name="ListView" class="oe-listview-content">
605     <t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0) + (options.isClarkGable ? 1 : 0)"/>
606     <thead>
607         <tr t-if="options.action_buttons !== false or options.pager !== false">
608             <th t-att-colspan="columns_count">
609                 <div class="oe_list_buttons"/>
610                 <div class="oe_list_sidebar"/>
611                 <div class="oe_list_pager"/>
612             </th>
613         </tr>
614         <tr t-if="options.header" class="oe-listview-header-columns">
615             <t t-foreach="columns" t-as="column">
616                 <th t-if="column.meta">
617                     <t t-esc="column.string"/>
618                 </th>
619             </t>
620             <th t-if="options.selectable" width="1"  >
621                 <input type="checkbox" class="all-record-selector"/>
622             </th>
623             <th t-if="options.isClarkGable" width="1"></th>
624             <t t-foreach="columns" t-as="column">
625                 <th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
626                     t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
627                     <t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
628                 </th>
629             </t>
630             <th t-if="options.deletable" width="1"/>
631         </tr>
632     </thead>
633     <tfoot>
634         <tr>
635             <td t-if="options.selectable"/>
636             <td t-if="options.isClarkGable"/>
637             <td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe-number"
638                 t-att-data-field="column.id" t-att-title="column.label">
639             </td>
640             <td t-if="options.deletable"/>
641         </tr>
642     </tfoot>
643 </table>
644 <div t-name="ListView.buttons" class="oe_list_buttons">
645     <t t-if="!widget.no_leaf and widget.options.action_buttons !== false">
646         <button type="button" class="oe_button oe_list_add" t-if="widget.options.addable">
647             <t t-esc="widget.options.addable"/>
648         </button>
649         <button type="button" class="oe_button oe_list_delete" t-if="widget.options.selectable and widget.options.deletable">
650             Delete
651         </button>
652     </t>
653 </div>
654 <t t-name="ListView.pager">
655     <div class="oe_list_pager" t-att-colspan="widget.columns_count">
656         <t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
657             <span class="oe-pager-state">
658             </span>
659         </t>
660     </div>
661 </t>
662 <t t-name="ListView.rows" t-foreach="records.length" t-as="index">
663     <t t-call="ListView.row">
664         <t t-set="record" t-value="records.at(index)"/>
665         <t t-set="row_parity" t-value="index_parity"/>
666     </t>
667 </t>
668 <tr t-name="ListView.row" t-att-class="row_parity"
669         t-att-data-id="record.get('id')"
670         t-att-style="view.color_for(record)">
671     <t t-foreach="columns" t-as="column">
672         <td t-if="column.meta">
673
674         </td>
675     </t>
676     <th t-if="options.selectable" class="oe-record-selector" width="1">
677         <t t-set="checked" t-value="options.select_view_id == record.get('id') ? 'checked' : null"/>
678         <input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
679         <input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
680     </th>
681     <th t-if="options.isClarkGable" class="oe-record-edit-link" width="1">
682         <img src="/web/static/src/img/pencil.gif" width="12" height="12" class="oe-record-edit-link-img"/>
683     </th>
684     <t t-foreach="columns" t-as="column">
685         <t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
686         <td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
687             t-att-class="'oe-field-cell' + (align ? ' oe-number' : '')
688                          + (column.tag === 'button' ? ' oe-button' : '')"
689             t-att-data-field="column.id">
690             <t t-raw="render_cell(record, column)"/>
691         </td>
692     </t>
693     <td t-if="options.deletable" class='oe-record-delete' width="1">
694         <button type="button" name="delete" class="oe_i">d</button>
695     </td>
696 </tr>
697
698 <t t-name="FormView">
699     <div class="oe_formview">
700         <div class="oe_form_buttons"/>
701         <div class="oe_form_sidebar"/>
702         <div class="oe_form_pager"/>
703         <div class="oe_form_container"/>
704     </div>
705 </t>
706 <div t-name="FormView.buttons" class="oe_form_buttons">
707     <t t-if="widget.options.action_buttons !== false">
708         <span class="oe_form_buttons_view">
709             <button type="button" class="oe_button oe_form_button_edit">Edit</button>
710             <button type="button" class="oe_button oe_form_button_create">Create</button>
711             <button type="button" class="oe_button oe_form_button_duplicate">Duplicate</button>
712             <button type="button" class="oe_button oe_form_button_delete">Delete</button>
713         </span>
714         <span class="oe_form_buttons_edit">
715             <button type="button" class="oe_button oe_form_button_save">Save</button>
716             <button type="button" class="oe_button oe_form_button_cancel">Cancel</button>
717         </span>
718     </t>
719 </div>
720 <t t-name="FormView.pager">
721     <div class="oe_form_pager">
722         <t t-if="widget.options.pager !== false" t-call="ViewPager">
723             <span class="oe_pager_index">0</span><span class="oe_pager_separator"> / </span><span class="oe_pager_count">0</span>
724         </t>
725     </div>
726 </t>
727 <form t-name="FormView.set_default" class="oe_forms oe_frame">
728     <t t-set="args" t-value="widget.dialog_options.args"/>
729     <table style="width: 100%">
730         <tr>
731             <td>
732                 <label for="formview_default_fields"
733                        class="oe_label oe_align_right">
734                     Default:
735                 </label>
736             </td>
737             <td class="oe_form_required">
738                 <select id="formview_default_fields">
739                     <option value=""/>
740                     <option t-foreach="args.fields" t-as="field"
741                             t-att-value="field.name">
742                         <t t-esc="field.string"/> = <t t-esc="field.displayed"/>
743                     </option>
744                 </select>
745             </td>
746         </tr>
747         <tr t-if="args.conditions.length">
748             <td>
749                 <label for="formview_default_conditions"
750                        class="oe_label oe_align_right">
751                     Condition:
752                 </label>
753             </td>
754             <td>
755                 <select id="formview_default_conditions">
756                     <option value=""/>
757                     <option t-foreach="args.conditions" t-as="cond"
758                             t-att-value="cond.name + '=' + cond.value">
759                         <t t-esc="cond.string"/>=<t t-esc="cond.displayed"/>
760                     </option>
761                 </select>
762             </td>
763         </tr>
764         <tr>
765             <td colspan="2">
766                 <input type="radio" id="formview_default_self"
767                        value="self" name="scope" checked="checked"/>
768                 <label for="formview_default_self" class="oe_label"
769                        style="display: inline;">
770                     Only you
771                 </label>
772                 <br/>
773                 <input type="radio" id="formview_default_all"
774                        value="all" name="scope"/>
775                 <label for="formview_default_all" class="oe_label"
776                        style="display: inline;">
777                     All users
778                 </label>
779             </td>
780         </tr>
781     </table>
782 </form>
783
784 <t t-name="FormRenderingForm.manual">
785     <div class="oe_form_manual_layout"/>
786 </t>
787 <t t-name="FormRenderingForm">
788     <div class="oe_form_sheetbg">
789         <div t-attf-class="oe_form_sheet oe_form_sheet_width #{classnames}">
790             <group col="4"/>
791         </div>
792     </div>
793 </t>
794 <t t-name="FormRenderingGroup">
795     <t t-set="table">
796         <table border="0" cellpadding="0" cellspacing="0" width="100%" t-att-class="classnames"/>
797     </t>
798     <t t-if="string">
799         <fieldset class="oe_group_box">
800             <legend><t t-esc="string"/></legend>
801             <t t-raw="table"/>
802         </fieldset>
803     </t>
804     <t t-if="!string">
805         <t t-raw="table"/>
806     </t>
807 </t>
808 <t t-name="FormRenderingNotebook">
809     <div>
810         <ul t-attf-class="oe_form_notebook #{classnames}">
811             <li t-foreach="pages" t-as="page">
812                 <a t-attf-href="##{page.id}">
813                     <t t-esc="page.string"/>
814                 </a>
815             </li>
816         </ul>
817     </div>
818 </t>
819 <t t-name="FormRenderingNotebookPage">
820     <div t-attf-class="oe_form_notebook_page #{classnames}" t-att-id="id">
821         <group t-if="layout === 'auto'" col="4"/>
822     </div>
823 </t>
824 <t t-name="FormRenderingSeparator">
825     <div t-attf-class="oe_horizontal_separator #{classnames}">
826         <t t-esc="string"/>
827     </div>
828 </t>
829 <t t-name="FormRenderingLabel">
830     <label  t-att-for="_for"
831             t-att-title="help"
832             t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}">
833         <t t-esc="string"/>
834         <span t-if="help">?</span>
835         :
836     </label>
837 </t>
838
839 <t t-name="Widget">
840     Unhandled widget
841     <t t-js="dict">console.warn('Unhandled widget', dict.widget);</t>
842 </t>
843 <t t-name="WidgetLabel.tooltip">
844     <div class="oe_tooltip_string" t-if="widget.string">
845         <t t-esc="widget.node.attrs.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t>
846     </div>
847     <p t-if="widget.help" class="oe_tooltip_help"><t t-esc="widget.help"/></p>
848     <ul t-if="debug" class="oe_tooltip_technical">
849         <li data-item="field" t-if="widget.name">
850             <span class="oe_tooltip_technical_title">Field:</span>
851             <t t-esc="widget.name"/>
852         </li>
853         <li data-item="object" t-if="widget.view and widget.view.fields_view">
854             <span class="oe_tooltip_technical_title">Object:</span>
855             <t t-esc="widget.view.fields_view.model"/>
856         </li>
857         <li data-item="type" t-if="widget.field">
858             <span class="oe_tooltip_technical_title">Type:</span>
859             <t t-esc="widget.field.type"/>
860         </li>
861         <li t-if="widget.node.attrs.widget" data-item="widget">
862             <span class="oe_tooltip_technical_title">Widget:</span>
863             <t t-esc="widget.node.attrs.widget"/>
864         </li>
865         <li t-if="widget.node.attrs.size || (widget.field and widget.field.size)" data-item="size">
866             <span class="oe_tooltip_technical_title">Size:</span>
867             <t t-esc="widget.node.attrs.size || widget.field.size"/>
868         </li>
869         <li t-if="widget.node.attrs.context" data-item="context">
870             <span class="oe_tooltip_technical_title">Context:</span>
871             <t t-esc="widget.node.attrs.context_string"/>
872         </li>
873         <li t-if="widget.node.attrs.domain" data-item="domain">
874             <span class="oe_tooltip_technical_title">Domain:</span>
875             <t t-esc="widget.node.attrs.domain_string"/>
876         </li>
877         <li t-if="widget.node.attrs.modifiers and widget.node.attrs.modifiers != '{}'" data-item="modifiers">
878             <span class="oe_tooltip_technical_title">Modifiers:</span>
879             <t t-esc="widget.node.attrs.modifiers"/>
880         </li>
881         <li t-if="widget.field and widget.field.change_default" data-item="change_default">
882             <span class="oe_tooltip_technical_title">Change default:</span>
883             Yes
884         </li>
885         <li t-if="widget.node.attrs.on_change" data-item="on_change">
886             <span class="oe_tooltip_technical_title">On change:</span>
887             <t t-esc="widget.node.attrs.on_change"/>
888         </li>
889         <li t-if="widget.field and widget.field.relation" data-item="relation">
890             <span class="oe_tooltip_technical_title">Relation:</span>
891             <t t-esc="widget.field.relation"/>
892         </li>
893         <li t-if="widget.field and widget.field.selection" data-item="selection">
894             <span class="oe_tooltip_technical_title">Selection:</span>
895             <ul>
896                 <li t-foreach="widget.field.selection" t-as="option">
897                     [<t t-esc="option[0]"/>]
898                     <t t-if="option[1]"> - </t>
899                     <t t-esc="option[1]"/>
900                 </li>
901             </ul>
902         </li>
903     </ul>
904 </t>
905 <t t-name="FieldChar">
906     <t t-if="!widget.get('effective_readonly')">
907         <div class="oe_form_field_char">
908             <input t-att-type="widget.password ? 'password' : 'text'"
909                 t-att-id="widget.id_for_label"
910                 t-att-tabindex="widget.node.attrs.tabindex"
911                 t-att-autofocus="widget.node.attrs.autofocus"
912                 t-attf-class="field_char #{widget.is_field_number ? 'oe-number' : ''}"
913             /><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"/>
914         </div>
915     </t>
916     <t t-if="widget.get('effective_readonly')">
917         <div t-attf-class="oe_form_field_char #{widget.is_field_number ? 'oe-number' : ''}">
918         </div>
919     </t>
920 </t>
921 <t t-name="FieldEmail">
922     <t t-if="!widget.get('effective_readonly')">
923         <table class="oe_form_field_email" cellpadding="0" cellspacing="0" border="0">
924         <tr>
925             <td>
926                 <input type="text"
927                     t-att-id="widget.id_for_label"
928                     t-att-tabindex="widget.node.attrs.tabindex"
929                     t-att-autofocus="widget.node.attrs.autofocus"
930                 />
931             </td>
932             <td width="16">
933                 <button class="oe_button oe_field_button" tabindex="-1" type="button" title="Send an e-mail with your default e-mail client">
934                     <img t-att-src='_s + "/web/static/src/img/icons/terp-mail-message-new.png"'/>
935                 </button>
936             </td>
937         </tr>
938         </table>
939     </t>
940     <t t-if="widget.get('effective_readonly')">
941         <div>
942             <a href="#" class="oe_form_uri"/>
943         </div>
944     </t>
945 </t>
946 <t t-name="FieldUrl">
947     <t t-if="!widget.get('effective_readonly')">
948         <table class="oe_form_field_url" cellpadding="0" cellspacing="0" border="0">
949         <tr>
950             <td>
951                 <input type="text"
952                     t-att-id="widget.id_for_label"
953                     t-att-tabindex="widget.node.attrs.tabindex"
954                     t-att-autofocus="widget.node.attrs.autofocus"
955                 />
956             </td>
957             <td width="16">
958                 <button class="oe_button oe_field_button" tabindex="-1" type="button" title="Open this resource">
959                     <img t-att-src='_s + "/web/static/src/img/icons/gtk-ok.png"'/>
960                 </button>
961             </td>
962         </tr>
963         </table>
964     </t>
965     <t t-if="widget.get('effective_readonly')">
966         <div>
967             <a href="#" class="oe_form_uri"/>
968         </div>
969     </t>
970 </t>
971 <t t-name="FieldText">
972     <t t-if="!widget.get('effective_readonly')">
973         <div class="oe_form_field_text">
974             <textarea rows="6"
975                 t-att-name="widget.name"
976                 class="field_text"
977                 t-att-tabindex="widget.node.attrs.tabindex"
978                 t-att-autofocus="widget.node.attrs.autofocus"
979             ></textarea><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"/>
980         </div>
981     </t>
982 </t>
983 <t t-name="web.datetimepicker">
984     <div class="oe_datepicker_root oe_form_field_datetime">
985         <input type="text" class="oe_datepicker_container" disabled="disabled" style="display: none;"/>
986         <input type="text"
987             t-att-name="widget.name"
988             t-attf-class="oe_datepicker_master field_#{widget.type_of_date}"
989         /><img class="oe_input_icon oe_datepicker_trigger" t-att-src='_s + "/web/static/src/img/ui/field_calendar.png"'
990              title="Select date" width="16" height="16" border="0"/>
991     </div>
992 </t>
993 <t t-name="FieldSelection">
994     <t t-if="!widget.get('effective_readonly')">
995         <div class="oe_form_field_selection">
996             <select
997                 t-att-name="widget.name"
998                 t-att-tabindex="widget.node.attrs.tabindex"
999                 t-att-autofocus="widget.node.attrs.autofocus"
1000                 t-att-id="widget.id_for_label">
1001                     <t t-foreach="widget.values" t-as="option">
1002                         <option><t t-esc="option[1]"/></option>
1003                     </t>
1004             </select>
1005         </div>
1006     </t>
1007     <t t-if="widget.get('effective_readonly')">
1008         <div class="field_selection">
1009         </div>
1010     </t>
1011 </t>
1012 <t t-name="FieldMany2One">
1013     <t t-if="!widget.get('effective_readonly')">
1014         <table class="oe_form_field_many2one" cellpadding="0" cellspacing="0" border="0">
1015         <tr>
1016             <td valign="top">
1017                 <input type="text"
1018                     t-att-id="widget.id_for_label"
1019                     t-att-tabindex="widget.node.attrs.tabindex"
1020                     t-att-autofocus="widget.node.attrs.autofocus"
1021                 />
1022                 <span class="oe-m2o-drop-down-button">
1023                     <img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
1024             </td>
1025             <td width="16">
1026                 <button class="oe_button oe_field_button oe-m2o-cm-button">
1027                     <img t-att-src='_s + "/web/static/src/img/icons/gtk-go-forward.png"'/>
1028                 </button>
1029             </td>
1030         </tr>
1031         </table>
1032     </t>
1033     <t t-if="widget.get('effective_readonly')">
1034         <div>
1035             <a href="#" class="oe_form_uri"/>
1036         </div>
1037     </t>
1038 </t>
1039 <t t-name="FieldReference">
1040     <t t-if="!widget.get('effective_readonly')">
1041         <table class="oe_form_field_reference oe_frame oe_forms" border="0" cellpadding="0" cellspacing="0">
1042         <tr>
1043             <td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection">
1044             </td>
1045             <td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none">
1046             </td>
1047         </tr>
1048         </table>
1049     </t>
1050     <t t-if="widget.get('effective_readonly')">
1051         <a href="#" class="oe_form_uri"/>
1052     </t>
1053 </t>
1054 <t t-name="FieldBoolean">
1055     <span class="oe_form_field_boolean">
1056         <input type="checkbox"
1057             t-att-id="widget.id_for_label"
1058             t-att-name="widget.name"
1059             t-att-tabindex="widget.node.attrs.tabindex"
1060             t-att-autofocus="widget.node.attrs.autofocus"
1061             class="field_boolean"/>
1062     </span>
1063 </t>
1064 <t t-name="FieldProgressBar">
1065     <div class="oe_form_field_progressbar" t-opentag="true">
1066         <span></span>
1067     </div>
1068 </t>
1069 <t t-name="FieldStatus.content">
1070     <ul class="oe-arrow-list">
1071         <t t-set="size" t-value="widget.to_show.length"/>
1072         <t t-foreach="_.range(size)" t-as="i">
1073             <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe-arrow-list-selected' : ''">
1074                 <span class="oe-arrow-list-before" t-if="i &gt; 0"></span><span><t t-esc="widget.to_show[i][1]"/></span><span class="oe-arrow-list-after" t-if="i &lt; size - 1"></span>
1075             </li>
1076         </t>
1077     </ul>
1078 </t>
1079 <t t-name="FieldStatus.content">
1080     <ul class="oe_form_steps">
1081         <t t-set="size" t-value="widget.to_show.length"/>
1082         <t t-foreach="_.range(size)" t-as="i">
1083             <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
1084                 <t t-esc="widget.to_show[i][1]"/>
1085                 <img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
1086             </li>
1087         </t>
1088     </ul>
1089 </t>
1090 <t t-name="FieldBinaryImage">
1091     <table cellpadding="0" cellspacing="0" border="0" width="100%">
1092     <tr>
1093         <td class="oe_form_field-binary-image-placeholder" align="center">
1094
1095         </td>
1096     </tr>
1097     <tr>
1098         <td align="center" valign="bottom" height="25">
1099             <div class="oe-binary">
1100                 <table cellspacing="0" cellpadding="0" border="0">
1101                 <tr>
1102                     <td>
1103                         <div class="oe-binary-file-set">
1104                             <form class="oe-binary-form" t-att-target="widget.iframe"
1105                                 method="post" enctype="multipart/form-data" action="/web/binary/upload">
1106                                 <input type="hidden" name="session_id" value=""/>
1107                                 <input type="hidden" name="callback" t-att-value="widget.iframe"/>
1108                                 <button class="oe_button" type="button" title="Set Image">
1109                                     <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
1110                                 </button>
1111                                 <input type="file" class="oe-binary-file" name="ufile"
1112                                     t-att-tabindex="widget.node.attrs.tabindex"
1113                                     t-att-autofocus="widget.node.attrs.autofocus"
1114                                 />
1115                             </form>
1116                         </div>
1117                     </td>
1118                     <td>
1119                         <button class="oe_button oe-binary-file-clear" type="button" title="Clear">
1120                             <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
1121                         </button>
1122                     </td>
1123                 </tr>
1124                 </table>
1125             </div>
1126             <div class="oe-binary-progress" style="display: none">
1127                 <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
1128                 <b>Uploading ...</b>
1129             </div>
1130             <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/>
1131         </td>
1132     </tr>
1133     </table>
1134 </t>
1135 <t t-name="FieldBinaryImage-img">
1136     <img t-att-src='url' class="oe-binary-image field_image"
1137         t-att-border="widget.readonly ? 0 : 1"
1138         t-att-name="widget.name"
1139         t-att-width="widget.node.attrs.img_width || widget.node.attrs.width"
1140         t-att-height="widget.node.attrs.img_height || widget.node.attrs.height"
1141         t-att-style="'max-width: ' + (widget.$element.width() > 60 ? widget.$element.width() : 60) + 'px'"
1142     />
1143 </t>
1144 <t t-name="FieldBinaryFile">
1145     <t t-if="!widget.get('effective_readonly')">
1146         <table class="oe_form_field_binary" cellpadding="0" cellspacing="0" border="0">
1147         <tr>
1148             <td>
1149                 <input type="text" size="1" readonly="readonly"
1150                     t-att-name="widget.name"
1151                     t-att-tabindex="widget.node.attrs.tabindex"
1152                     t-att-autofocus="widget.node.attrs.autofocus"
1153                     class="field_binary"
1154                 />
1155             </td>
1156             <td class="oe-binary" nowrap="true">
1157                 <table cellspacing="0" cellpadding="0" border="0">
1158                 <tr>
1159                     <td>
1160                         <div class="oe-binary-file-set" style="width: 80px; height:22px;">
1161                             <form class="oe-binary-form" t-att-target="widget.iframe"
1162                                 method="post" enctype="multipart/form-data" action="/web/binary/upload">
1163                                 <input type="hidden" name="session_id" value=""/>
1164                                 <input type="hidden" name="callback" t-att-value="widget.iframe"/>
1165                                 <button class="oe_button oe_field_button" type="button" title="Set Image">
1166                                     <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
1167                                     <span>Select</span>
1168                                 </button>
1169                                 <input type="file" class="oe-binary-file" name="ufile"/>
1170                             </form>
1171                         </div>
1172                     </td>
1173                     <td>
1174                         <button class="oe_button oe-binary-file-save" type="button" title="Save As">
1175                             <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>
1176                             <span>Save As</span>
1177                         </button>
1178                     </td>
1179                     <td>
1180                         <button class="oe_button oe-binary-file-clear" type="button" title="Clear">
1181                             <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
1182                             <span>Clear</span>
1183                         </button>
1184                     </td>
1185                 </tr>
1186                 </table>
1187             </td>
1188             <td class="oe-binary-progress" style="display: none" nowrap="true">
1189                 <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
1190                 <b>Uploading ...</b>
1191                 <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/>
1192             </td>
1193         </tr>
1194         </table>
1195     </t>
1196     <t t-if="widget.get('effective_readonly')">
1197         <div>
1198             <a href="javascript:void(0)" class="oe_form_uri"/>
1199         </div>
1200     </t>
1201 </t>
1202 <t t-name="WidgetButton">
1203     <button type="button" class="oe_button oe_form_button"
1204         t-att-tabindex="widget.node.attrs.tabindex"
1205         t-att-autofocus="widget.node.attrs.autofocus">
1206         <img t-if="widget.node.attrs.icon" t-att-src="_s + '/web/static/src/img/icons/' + widget.node.attrs.icon + '.png'" width="16" height="16"/>
1207         <span t-if="widget.string"><t t-esc="widget.string"/></span>
1208     </button>
1209 </t>
1210 <t t-name="WidgetButton.tooltip" t-extend="WidgetLabel.tooltip">
1211     <t t-jquery="div.oe_tooltip_string" t-operation="replace">
1212         <div class="oe_tooltip_string" t-if="debug || widget.string">
1213             <t t-if="debug">
1214                 Button
1215                 <t t-if="widget.string">: </t>
1216                 <t t-if="!widget.string"> (no string)</t>
1217             </t>
1218             <t t-esc="widget.string"/>
1219         </div>
1220     </t>
1221     <t t-jquery="ul.oe_tooltip_technical" t-operation="append">
1222         <li t-if="widget.node.attrs.special" data-item="special">
1223             <span class="oe_tooltip_technical_title">Special:</span>
1224             <t t-esc="widget.node.attrs.special"/>
1225         </li>
1226         <t t-set="button_type" t-value="widget.node.attrs.type"/>
1227         <li t-if="button_type" data-item="button_type">
1228             <span class="oe_tooltip_technical_title">Button Type:</span>
1229             <t t-esc="button_type"/>
1230         </li>
1231         <li t-if="button_type === 'object'" data-item="button_method">
1232             <span class="oe_tooltip_technical_title">Method:</span>
1233             <t t-esc="widget.node.attrs.name"/>
1234         </li>
1235         <li t-if="button_type === 'action'" data-item="button_action">
1236             <span class="oe_tooltip_technical_title">Action ID:</span>
1237             <t t-esc="widget.node.attrs.name"/>
1238         </li>
1239     </t>
1240 </t>
1241
1242 <t t-name="TranslateDialog">
1243     <table t-if="widget.view.translatable_fields" class="oe_form oe_translation_form" border="0" cellpadding="0" cellspacing="0" width="100%">
1244     <tr>
1245         <td class="oe_form_separator" width="1%" nowrap="nowrap">
1246             <div class="oe_horizontal_separator">Field</div>
1247         </td>
1248         <th t-foreach="widget.languages" align="left">
1249             <div class="oe_horizontal_separator"><t t-esc="name"/></div>
1250         </th>
1251     </tr>
1252     <tr t-foreach="widget.view.translatable_fields" t-as="field" t-att-data-field="field.name">
1253         <td class="oe_form_group_cell" width="1%" nowrap="nowrap">
1254             <label class="oe_label"><t t-esc="field.node.attrs.string"/>:</label>
1255         </td>
1256         <td t-foreach="widget.languages" t-as="lg" class="oe_form_group_cell">
1257             <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%"/>
1258             <textarea t-if="field.type == 'text'" t-attf-name="#{lg.code}-#{field.name}" data-value="" class="oe_trad_field" style="width: 100%"></textarea>
1259         </td>
1260     </tr>
1261     </table>
1262 </t>
1263
1264 <t t-name="One2Many.viewmanager" t-extend="ViewManager">
1265     <t t-jquery="span.oe_view_title_text" t-operation="replace"/>
1266
1267     <t t-jquery=".oe-view-manager-header">
1268         this.attr('t-if', 'views.length != 1');
1269     </t>
1270 </t>
1271 <t t-name="One2Many.formview" t-extend="FormView">
1272     <t t-jquery=".oe_form_buttons" t-operation="inner">
1273         <button type="button" class="oe_button oe_form_button_create">Add</button>
1274     </t>
1275 </t>
1276 <t t-name="One2Many.listview" t-extend="ListView">
1277     <t t-jquery="thead.ui-widget-header > tr:first">
1278         this.removeAttr('t-if');
1279     </t>
1280
1281     <t t-jquery="tfoot &gt; tr:last-child" t-operation="replace"/>
1282
1283     <t t-jquery="td.oe-actions">
1284         this.removeAttr('t-if');
1285     </t>
1286     <t t-jquery="td.oe-actions" t-operation="prepend">
1287         <h3 class="oe_view_title"><t t-esc="fields_view.arch.attrs.string"/></h3>
1288     </t>
1289 </t>
1290
1291 <div t-name="SearchView" class="oe_searchview">
1292 </div>
1293 <t t-name="SearchView.managed-filters">
1294     <option class="oe-filters-title" value="">Filters</option>
1295     <optgroup label="-- Filters --">
1296         <t t-foreach="filters" t-as="filter">
1297             <option t-attf-value="get:#{filter_index}"
1298                     t-att-disabled="filter.disabled and 'disabled'"
1299                     t-att-title="filter.disabled and disabled_filter_message">
1300                 <t t-esc="filter.name"/>
1301             </option>
1302         </t>
1303     </optgroup>
1304     <optgroup label="-- Actions --">
1305         <option value="advanced_filter">Add Advanced Filter</option>
1306         <option value="save_filter">Save Filter</option>
1307         <option value="add_to_dashboard">Add to Dashboard</option>
1308         <option value="manage_filters">Manage Filters</option>
1309     </optgroup>
1310 </t>
1311 <t t-name="SearchView.managed-filters.add">
1312     <div>
1313         <p>Filter Name:</p>
1314         <input type="text"/>
1315         <p>(Any existing filter with the same name will be replaced)</p>
1316     </div>
1317 </t>
1318 <t t-name="SearchView.add_to_dashboard">
1319     <div class="oe_forms">
1320         <p><b>Select Dashboard to add this filter to:</b></p>
1321         <select style="width: 100%; margin-right: 1em;">
1322             <option t-foreach="dashboards" t-as="menu" t-att-value="menu.id" t-att-selected="(menu.id == selected_menu_id) || undefined"><t t-esc="menu.name"/></option>
1323         </select>
1324         <p><b>Title of new Dashboard item:</b></p>
1325         <input type="text" style="width: 100%; margin-right: 1em;"/>
1326     </div>
1327 </t>
1328 <t t-name="SearchView.render_lines">
1329     <table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
1330            t-foreach="lines" t-as="line">
1331         <tr>
1332             <td t-foreach="line" t-as="widget" class="oe_searchview_field">
1333                 <t t-raw="widget.render(defaults)"/>
1334             </td>
1335         </tr>
1336     </table>
1337 </t>
1338 <button t-name="SearchView.filter" type="button"
1339         t-att-id="element_id"
1340         t-att-title="attrs.help"
1341         t-att-class="classes.join(' ')"
1342         t-att-style="style"
1343         t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined">
1344     <img t-att-src="_s + '/web/static/src/img/icons/' + (attrs.icon || 'gtk-home') + '.png'" width="16" height="16"/>
1345     <br t-if="attrs.string"/>
1346     <t t-esc="attrs.string"/>
1347 </button>
1348 <ul t-name="SearchView.filters">
1349     <li t-foreach="widget.filters" t-as="filter">
1350         <t t-esc="filter.attrs.string or filter.attrs.name or 'Ω'"/>
1351     </li>
1352 </ul>
1353 <t t-name="SearchView.filters.facet">
1354     <div class="category oe_filter_category"><t t-esc="facet.get('category')"/></div>
1355
1356     <t t-set="val" t-value="facet.get('json')"/>
1357
1358     <div t-if="!(val instanceof Array)" class="search_facet_input_container">
1359         <t t-esc="facet.get('value')"/>
1360     </div>
1361     <t t-if="val instanceof Array">
1362         <div class="search_facet_input_container"
1363                 t-foreach="facet.get('json')" t-as="filter">
1364             <t t-esc="filter.attrs.string || filter.attrs.name"/>
1365         </div>
1366     </t>
1367
1368     <div class="search_facet_remove VS-icon VS-icon-cancel"/>
1369 </t>
1370 <t t-name="SearchView.field">
1371     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1372            t-att-title="attrs.help"
1373            t-att-for="element_id"
1374            t-att-style="style">
1375         <t t-esc="attrs.string || attrs.name"/>
1376         <span t-if="attrs.help">?</span>
1377     </label>
1378     <div t-att-style="style">
1379         <input type="text" size="15" t-att-name="attrs.name"
1380                t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined"
1381                t-att-id="element_id"
1382                t-att-value="defaults[attrs.name] || ''"/>
1383         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1384     </div>
1385 </t>
1386 <t t-name="SearchView.date">
1387     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1388            t-att-title="attrs.help"
1389            t-att-for="element_id"
1390            t-att-style="style">
1391         <t t-esc="attrs.string || attrs.name"/>
1392         <span t-if="attrs.help">?</span>
1393     </label>
1394     <div t-att-style="style">
1395         <span t-att-id="element_id"/>
1396         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1397     </div>
1398 </t>
1399 <t t-name="SearchView.field.selection">
1400     <label t-att-title="attrs.help"
1401            t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1402            t-att-for="element_id"
1403            t-att-style="style">
1404         <t t-esc="attrs.string || attrs.name"/>
1405         <span t-if="attrs.help">?</span>
1406     </label>
1407     <div t-att-style="style">
1408         <select t-att-name="attrs.name" t-att-id="element_id"
1409                 t-att-autofocus="attrs.default_focus === '1' || undefined">
1410             <option t-if="prepend_empty"/>
1411             <t t-foreach="attrs.selection" t-as="option">
1412                 <t t-set="selected" t-value="defaults[attrs.name] === option[0]"/>
1413                 <option t-if="selected"
1414                         t-attf-selected="selected"
1415                         t-att-value="option_index">
1416                     <t t-esc="option[1]"/>
1417                 </option>
1418                 <option t-if="!selected" t-att-value="option_index">
1419                     <t t-esc="option[1]"/>
1420                 </option>
1421             </t>
1422         </select>
1423         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1424     </div>
1425 </t>
1426 <t t-name="SearchView.util.expand">
1427     <div t-att-class="'searchview_group ' + (expand == '0' ? 'folded' : 'expanded')">
1428         <a t-if="label" class="searchview_group_string" href="#">
1429             <t t-esc="label"/>
1430         </a>
1431         <div class="searchview_group_content">
1432             <t t-raw="content"/>
1433         </div>
1434     </div>
1435 </t>
1436 <t t-name="SearchView.group">
1437     <t t-call="SearchView.util.expand">
1438         <t t-set="expand" t-value="attrs.expand"/>
1439         <t t-set="label" t-value="attrs.string"/>
1440         <t t-set="content">
1441             <t t-call="SearchView.render_lines"/>
1442         </t>
1443     </t>
1444 </t>
1445 <div t-name="SearchView.advanced" class="oe_searchview_advanced">
1446     <h4>Advanced Search...</h4>
1447     <form>
1448         <ul>
1449
1450         </ul>
1451         <button class="oe_add_condition" type="button">Add a condition</button>
1452         <button class="oe_apply" type="submit">Apply</button>
1453     </form>
1454 </div>
1455 <t t-name="SearchView.extended_search.proposition">
1456     <li>
1457         <select class="searchview_extended_prop_field">
1458             <t t-foreach="widget.attrs.fields" t-as="field">
1459                 <option t-if="typeof field.store === 'undefined' || field.store || field.fnct_search"
1460                         t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
1461                         t-att-value="field.name">
1462                     <t t-esc="field.string"/>
1463                 </option>
1464             </t>
1465         </select>
1466         <select class="searchview_extended_prop_op"/>
1467         <span class="searchview_extended_prop_value"/>
1468         <a class="searchview_extended_delete_prop"
1469                 href="javascript:void(0)"><span> </span></a>
1470     </li>
1471 </t>
1472 <t t-name="SearchView.extended_search.proposition.char">
1473     <input t-att-id="widget.element_id" class="field_char"/>
1474 </t>
1475 <t t-name="SearchView.extended_search.proposition.empty">
1476     <span t-att-id="widget.element_id"></span>
1477 </t>
1478 <t t-name="SearchView.extended_search.proposition.integer">
1479     <input type="number" t-att-id="widget.element_id" class="field_integer" step="1"/>
1480 </t>
1481 <t t-name="SearchView.extended_search.proposition.float">
1482     <input type="number" t-att-id="widget.element_id" class="field_float" step="0.01"/>
1483 </t>
1484 <t t-name="SearchView.extended_search.proposition.boolean">
1485 </t>
1486 <t t-name="SearchView.extended_search.proposition.selection">
1487     <select t-att-id="widget.element_id">
1488         <t t-foreach="widget.field.selection" t-as="element">
1489         <option t-att-value="element[0]"><t t-esc="element[1]"/></option>
1490         </t>
1491     </select>
1492 </t>
1493 <t t-name="SelectCreatePopup">
1494     <div>
1495         <table style="width:100%">
1496             <tr style="width:100%">
1497                 <td style="width:100%">
1498                     <div class="oe-select-create-popup-view-search" style="width:100%"></div>
1499                 </td>
1500             </tr>
1501             <tr style="width:100%">
1502                 <td style="width:100%">
1503                     <div class="oe-select-create-popup-view-list" style="width:100%"></div>
1504                 </td>
1505             </tr>
1506         </table>
1507         <div class="oe-select-create-popup-view-form" style="width:100%"></div>
1508     </div>
1509 </t>
1510 <t t-name="SelectCreatePopup.search.buttons">
1511     <button type="button" class="oe_button oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
1512     <button type="button" class="oe_button oe_selectcreatepopup-search-close">Cancel</button>
1513 </t>
1514 <t t-name="SelectCreatePopup.form.buttons">
1515     <t t-if="widget.options.disable_multiple_selection">
1516         <button type="button" class="oe_button oe_selectcreatepopup-form-save">Save</button>
1517     </t>
1518     <t t-if="! widget.options.disable_multiple_selection">
1519         <button type="button" class="oe_button oe_selectcreatepopup-form-save-new">Save &amp; New</button>
1520         <button type="button" class="oe_button oe_selectcreatepopup-form-save">Save &amp; Close</button>
1521     </t>
1522     <button type="button" class="oe_button oe_selectcreatepopup-form-close">Cancel</button>
1523 </t>
1524 <t t-name="FormOpenPopup">
1525     <div>
1526         <div class="oe-form-open-popup-form-view" style="width:100%"></div>
1527     </div>
1528 </t>
1529 <t t-name="FormOpenPopup.form.buttons">
1530     <button type="button" class="oe_button oe_formopenpopup-form-save">Save</button>
1531     <button type="button" class="oe_button oe_formopenpopup-form-close">Cancel</button>
1532 </t>
1533 <t t-extend="ListView.row">
1534     <!-- adds back padding to row being rendered after edition, if necessary
1535          (if not deletable add back padding), otherwise the row being added is
1536          missing columns
1537      -->
1538     <t t-jquery="&gt; :last" t-operation="after">
1539         <td t-if="edited and !options.deletable" class="oe-listview-padding"/>
1540     </t>
1541 </t>
1542
1543 <t t-name="view_editor">
1544     <table class="oe_view_editor">
1545         <t t-call="view_editor.row"/>
1546     </table>
1547 </t>
1548 <t t-name="view_editor.row">
1549     <tr  t-att-id="'viewedit-' + rec.id"  t-att-level="rec.level" t-foreach="data" t-as="rec">
1550         <td width="90%">
1551             <table class="oe_view_editor_field">
1552                 <tr>
1553                     <td width="16px" t-att-style="'background-position: ' + 20*rec.level + 'px; padding-left: ' + 20*rec.level + 'px'">
1554                         <img t-if="rec.child_id.length" t-att-id="'parentimg-' + rec.id"
1555                             src="/web/static/src/img/collapse.gif" width="16" height="16" border="0"/>
1556                     </td>
1557                     <td style="cursor: pointer;">
1558                         <a style="text-decoration:none" href="javascript:void(0);">
1559                             <t t-esc="rec.name"/>
1560                         </a>
1561                     </td>
1562                 </tr>
1563             </table>
1564         </td>
1565         <td width="2%">
1566             <img t-if="rec.att_list.length"
1567                 id="side-add" src="/web/static/src/img/icons/gtk-add.png" style="cursor: pointer;"/>
1568         </td>
1569         <td width="2%">
1570             <img  id="side-remove" src="/web/static/src/img/icons/gtk-remove.png" style="cursor: pointer;"/>
1571         </td>
1572         <td width="2%">
1573             <img t-if="rec.att_list.length and !_.include(no_properties, rec.att_list[0])"
1574                 id="side-edit" src="/web/static/src/img/icons/gtk-edit.png" style="cursor: pointer;"/>
1575         </td>
1576         <td width="2%">
1577             <img t-if="rec.att_list.length"
1578                 id="side-up" src="/web/static/src/img/icons/gtk-go-up.png" style="cursor: pointer;"/>
1579         </td>
1580         <td width="2%">
1581             <img t-if="rec.att_list.length"
1582                 id="side-down" src="/web/static/src/img/icons/gtk-go-down.png" style="cursor: pointer;"/>
1583         </td>
1584         <t t-if="rec.child_id.length">
1585             <t t-set="data" t-value="rec.child_id"/>
1586             <t t-call="view_editor.row"/>
1587         </t>
1588     </tr>
1589 </t>
1590 <t t-name="vieweditor_char">
1591     <input type="text" t-att-id="widget.name" class="field_char" size="50"/>
1592 </t>
1593 <t t-name="vieweditor_selection">
1594     <select t-att-id="widget.name" >
1595         <t t-if="widget.selection" t-foreach="widget.selection" t-as="option">
1596             <option
1597                 t-att-value="typeof option === 'object' ? option[0] : option">
1598                 <t t-esc="typeof option === 'object' ? option[1] : option"/>
1599             </option>
1600         </t>
1601     </select>
1602 </t>
1603 <t t-name="vieweditor_boolean">
1604     <input type="checkbox" t-att-id="widget.name"/>
1605 </t>
1606
1607 <t t-name="ExportView">
1608     <a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
1609 </t>
1610 <table t-name="ExportTreeView" class="oe-export"
1611        style="background-color: #F3F3F3;">
1612     <tr>
1613         <td colspan="3">
1614             This wizard will export all data that matches the current search criteria to a CSV file.
1615             You can export all data or only the fields that can be reimported after modification.
1616         </td>
1617     </tr>
1618     <tr>
1619         <td colspan="3">
1620             <label for="import_compat">Export Type:</label>
1621             <select id="import_compat" name="import_compat">
1622                 <option value="yes">Import Compatible Export</option>
1623                 <option value="">Export all Data</option>
1624             </select>
1625
1626             <label for="export_format">Export Formats</label>
1627             <select id="export_format" name="export_format"></select>
1628         </td>
1629     </tr>
1630
1631     <tr>
1632         <th>Available fields</th>
1633         <th/>
1634         <th>
1635             Fields to export
1636             <a style="color: blue; text-decoration: none;" href="#" id="export_new_list">Save fields list</a>
1637             <div id="savenewlist"></div>
1638             <div id="ExistsExportList"></div>
1639         </th>
1640     </tr>
1641     <tr style="height: 400px;">
1642         <td class="oe_export_fields_selector_left">
1643             <div id="left_field_panel">
1644             </div>
1645         </td>
1646         <td class="oe_export_fields_selector_center">
1647             <!-- TODO: replace ids by 'oe_*' classes -->
1648             <button class="oe_button" id="add_field">Add</button>
1649             <button class="oe_button" id="remove_field">Remove</button>
1650             <button class="oe_button" id="remove_all_field">Remove All</button>
1651         </td>
1652         <td class="oe_export_fields_selector_right">
1653             <select name="fields_list" id="fields_list"
1654                     multiple="multiple"></select>
1655         </td>
1656     </tr>
1657 </table>
1658 <table t-name="ExportTreeView-Secondary"
1659        id="field-tree-structure" class="oe_export_fields_selector_export"
1660        cellspacing="0" cellpadding="0">
1661     <tr><th class="oe_export_tree_header"> Name </th></tr>
1662     <t t-call="ExportTreeView-Secondary.children"/>
1663 </table>
1664 <tr t-name="ExportTreeView-Secondary.children"
1665     t-foreach="fields" t-as="field"
1666     t-att-id="'treerow-' + field.id" class="oe_export_row">
1667     <td>
1668         <table class="tree_grid" border="0">
1669             <tr class="oe_export_row">
1670                 <t t-foreach="(field.id).split('/')" t-as="level" >
1671                     <t t-if="(field.id).split('/')[0] != level">
1672                         <td width="18" t-translation="off">&amp;nbsp;</td>
1673                     </t>
1674                 </t>
1675                 <td valign="top" align="left" style="cursor: pointer;" width="18">
1676                     <t t-if="field.children">
1677                         <t t-if="(field.id).split('/').length != 3">
1678                             <img t-att-id="'parentimg-' + field.id" t-att-src='_s + "/web/static/src/img/expand.gif"' width="16" height="16" border="0"/>
1679                         </t>
1680                     </t>
1681                 </td>
1682                 <td id="tree-column" valign="middle" align="left" style="cursor: pointer;">
1683                     <a t-att-id="'export-' + field.id"  t-att-string="field.string" href="javascript: void(0);" style="text-decoration: none;">
1684                         <t t-esc="field.string"/>
1685                     </a>
1686                 </td>
1687             </tr>
1688         </table>
1689     </td>
1690 </tr>
1691 <t t-name="ExportNewList">
1692     <tr>
1693         <th><label>Save as:</label></th>
1694         <td><input size="10" type="text" id="savelist_name"/></td>
1695         <td><button class="oe_button oe_export_button_export" id="add_export_list">Ok</button></td>
1696     </tr>
1697 </t>
1698 <t t-name="Exists.ExportList">
1699     <label for="saved_export_list">Saved exports:</label>
1700
1701     <select id="saved_export_list">
1702         <option></option>
1703         <t t-foreach="existing_exports" t-as="export">
1704             <option t-att-value="export.id"><t t-esc="export.name"/></option>
1705         </t>
1706     </select>
1707     <button class="oe_button oe_export_button_export" id="delete_export_list" type="button">Delete</button>
1708 </t>
1709
1710 <t t-name="ImportView">
1711     <a id="importview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Import</a>
1712 </t>
1713 <t t-name="ImportDataView">
1714 <form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data"
1715         class="oe-import oe-import-no-result">
1716     <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
1717     <h2 class="separator horizontal">1. Import a .CSV file</h2>
1718     <p>Select a .CSV file to import. If you need a sample of file to import,
1719        you should use the export tool with the "Import Compatible" option.
1720     </p>
1721     <p>
1722         <label for="csvfile">CSV File:</label>
1723         <input type="file" id="csvfile" size="50" name="csvfile"/>
1724     </p>
1725     <h2 class="separator horizontal oe-import-result">2. Check your file format</h2>
1726     <div id="result" class="oe-import-result"></div>
1727     <fieldset class="oe-closed oe-import-result">
1728         <legend>Import Options</legend>
1729         <table>
1730             <tr>
1731                 <td colspan="4">
1732                     <label for="file_has_headers">Does your file have titles?</label>
1733                     <input type="checkbox" checked="checked"
1734                            id="file_has_headers"/>
1735                 </td>
1736             </tr>
1737             <tr>
1738                 <td><label for="csv_separator">Separator:</label></td>
1739                 <td><input type="text" name="csvsep" id="csv_separator" value=","/></td>
1740                 <td><label for="csv_delimiter">Delimiter:</label></td>
1741                 <td><input type="text" name="csvdel" id="csv_delimiter" value='"'/></td>
1742             </tr>
1743             <tr>
1744                 <td><label for="csv_encoding">Encoding:</label></td>
1745                 <td>
1746                     <select name="csvcode" id="csv_encoding">
1747                         <option value="utf-8">UTF-8</option>
1748                         <option value="latin1">Latin 1</option>
1749                     </select>
1750                 </td>
1751                 <td><label for="csv_skip" title="For use if CSV files have titles on multiple lines, skips more than a single line during import">
1752                     Lines to skip<sup>?</sup>:</label></td>
1753                 <td><input type="number" id="csv_skip" value="0" min="0"/></td>
1754             </tr>
1755         </table>
1756     </fieldset>
1757 </form>
1758 </t>
1759 <t t-name="ImportView.result">
1760     <table class="oe_import_grid" width="100%" style="margin: 5px 0;">
1761         <tr t-if="headers" class="oe_import_grid-header">
1762             <td t-foreach="headers" t-as="header" class="oe_import_grid-cell">
1763                 <t t-esc="header"/></td>
1764         </tr>
1765         <tr>
1766             <td t-foreach="records[0]" t-as="column">
1767                 <input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe-m2o-drop-down-button">
1768                         <img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
1769             </td>
1770         </tr>
1771         <tr t-foreach="records" t-as="record" class="oe_import_grid-row">
1772             <td t-foreach="record" t-as="cell" class="oe_import_grid-cell">
1773                 <t t-esc="cell"/></td>
1774         </tr>
1775     </table>
1776 </t>
1777 <t t-name="ImportView.error">
1778     <p style="white-space:pre;">The import failed due to:<t t-esc="error.message"/></p>
1779     <t t-if="error.preview">
1780         <p>Here is a preview of the file we could not import:</p>
1781         <pre><t t-esc="error.preview"/></pre>
1782     </t>
1783 </t>
1784
1785 </templates>