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