d62382b57fe9a36feefbbea7d7ade3edd2955097
[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="Interface">
6     <div id="oe_loading" class="loading"></div>
7     <div id="oe_notification" class="oe_notification">
8         <div id="oe_notification_default">
9             <a class="ui-notify-cross ui-notify-close" href="#">x</a>
10             <h1>#{title}</h1>
11             <p>#{text}</p>
12         </div>
13         <div id="oe_notification_alert" class="ui-state-error">
14             <a class="ui-notify-cross ui-notify-close" href="#">x</a>
15             <span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-alert"></span>
16             <h1>#{title}</h1>
17             <p>#{text}</p>
18         </div>
19     </div>
20     <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table">
21     <tr>
22         <td colspan="2" valign="top">
23             <div id="oe_header" class="header"></div>
24             <div id="oe_menu" class="menu"></div>
25         </td>
26     </tr>
27     <tr>
28         <td valign="top" class="login-container" colspan="2">
29             <div id="oe_login" class="login"></div>
30         </td>
31     </tr>
32     <tr class="db_options_row">
33         <td valign="top" class="db_container">
34             <div id="oe_database" class="database"></div>
35         </td>
36         <td valign="top">
37                 <div id="oe_db_options"></div>
38         </td>
39     </tr>
40     <tr>
41         <td colspan="2" valign="top" height="100%">
42             <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
43             <tr>
44                 <td valign="top" id="oe_secondary_menu" class="secondary_menu">
45                 </td>
46                 <td valign="top" class="oe-application-container">
47                     <div id="oe_app" class="oe-application">
48                     </div>
49                 </td>
50             </tr>
51             </table>
52         </td>
53     </tr>
54     <tr>
55         <td colspan="2">
56             <div id="oe_footer" class="oe_footer">
57                 <p class="oe_footer_powered">Powered by <a href="http://www.openerp.com">openerp.com</a>.</p>
58             </div>
59         </td>
60     </tr>
61     </table>
62 </t>
63 <t t-name="Loading">
64     Loading...
65 </t>
66 <t t-name="Database">
67     <ul class="db_options" style="padding: 0px; display: inline;">
68         <li id="db-create">Create</li>
69         <li id="db-drop">Drop</li>
70         <li id="db-backup">Backup</li>
71         <li id="db-restore">Restore</li>
72         <li id="db-change-password">Password</li>
73         <li id="back-to-login">Back to Login</li>
74     </ul>
75 </t>
76 <t t-name="Database.CreateDB">
77     <form name="create_db_form" class="oe_forms" method="POST">
78         <table width="100%">
79             <tr>
80                 <td class="option_string">
81                     CREATE DATABASE
82                 </td>
83             </tr>
84         </table>
85         <table align="center" class="db_option_table">
86             <tr>
87                 <td><label for="super_admin_pwd">Master password:</label></td>
88                 <td><input type="password" name="super_admin_pwd" class="required" value="admin"/></td>
89             </tr>
90             <tr>
91                 <td><label for="db_name">New database name:</label></td>
92                 <td><input type="text" name="db_name" class="required"/></td>
93             </tr>
94             <tr>
95                 <td><label for="demo_data">Load Demonstration data:</label></td>
96                 <td><input type="checkbox" name="demo_data"/></td>
97             </tr>
98             <tr>
99                 <td><label for="db_lang">Default language:</label></td>
100                 <td>
101                     <select name="db_lang" t-if="lang_list">
102                         <t t-foreach="lang_list" t-as="lang">
103                             <option t-att-value="lang[0]" t-att-selected="lang[0] === 'en_US' ? 'selected' : undefined"><t t-esc="lang[1]"/></option>
104                         </t>
105                     </select>
106                 </td>
107             </tr>
108             <tr>
109                 <td><label for="create_admin_pwd">Admin password:</label></td>
110                 <td><input type="password" name="create_admin_pwd" class="required"/></td>
111             </tr>
112             <tr>
113                 <td><label for="create_confirm_pwd">Confirm password:</label></td>
114                 <td><input type="password" name="create_confirm_pwd" class="required"
115                            equalTo="input[name=create_admin_pwd]"/></td>
116             </tr>
117             <tr>
118                 <td colspan="2" align="right"><input type="submit" value="Create"/></td>
119             </tr>
120         </table>
121     </form>
122 </t>
123 <t t-name="DropDB">
124     <form name="drop_db_form" class="oe_forms" method="POST">
125         <table width="100%">
126             <tr>
127                 <td class="option_string">
128                     DROP DATABASE
129                 </td>
130             </tr>
131         </table>
132         <table align="center" class="db_option_table">
133             <tr>
134                 <td><label for="drop_db">Database:</label></td>
135                 <td>
136                     <select t-if="db_list" name="drop_db" autofocus="autofocus">
137                         <t t-foreach="db_list" t-as="db">
138                             <option t-att-value="db"><t t-esc="db"/></option>
139                         </t>
140                     </select>
141                 </td>
142             </tr>
143             <tr>
144                 <td><label for="drop_password">Master Password:</label></td>
145                 <td><input type="password" name="drop_pwd" class="required"/></td>
146             </tr>
147             <tr>
148                 <td colspan="2" align="right"><input type="submit" value="Drop"/></td>
149             </tr>
150         </table>
151     </form>
152 </t>
153 <t t-name="BackupDB">
154     <form name="backup_db_form" class="oe_forms" method="POST" target="backup-target"
155           action="/web/database/backup">
156         <input type="hidden" name="token"/>
157         <table width="100%">
158             <tr>
159                 <td class="option_string">
160                     BACKUP DATABASE
161                 </td>
162             </tr>
163         </table>
164         <table align="center" class="db_option_table">
165             <tr>
166                 <td><label for="backup_db">Database:</label></td>
167                 <td>
168                     <select t-if="db_list" name="backup_db" autofocus="autofocus">
169                         <t t-foreach="db_list" t-as="db">
170                             <option t-att-value="db"><t t-esc="db"/></option>
171                         </t>
172                     </select>
173                 </td>
174             </tr>
175             <tr>
176                 <td><label for="backup_pwd">Master Password:</label></td>
177                 <td><input type="password" name="backup_pwd" class="required"/></td>
178             </tr>
179             <tr>
180                 <td colspan="2" align="right"><input type="submit" value="Backup"/></td>
181             </tr>
182         </table>
183     </form>
184 </t>
185 <t t-name="RestoreDB">
186     <form name="restore_db_form" class="oe_forms" method="POST">
187         <table width="100%">
188             <tr>
189                 <td class="option_string">
190                     RESTORE DATABASE
191                 </td>
192             </tr>
193         </table>
194         <table align="center" class="db_option_table">
195             <tr>
196                 <td><label for="restore_db">File:</label></td>
197                 <td><input type="file" name="db_file" class="required"
198                          autofocus="autofocus"/></td>
199             </tr>
200             <tr>
201                 <td><label for="restore_pwd">Master Password:</label></td>
202                 <td><input type="password" name="restore_pwd" class="required"/></td>
203             </tr>
204         <tr>
205                 <td><label for="new_db">New database name:</label></td>
206                 <td><input type="text" name="new_db" class="required"/></td>
207             </tr>
208         <tr>
209             <td colspan="2" align="right"><input type="submit" value="Restore"/></td>
210             </tr>
211         </table>
212     </form>
213 </t>
214 <t t-name="Change_DB_Pwd">
215     <form name="change_pwd_form" class="oe_forms" method="POST">
216         <table width="100%">
217             <tr>
218                 <td class="option_string">
219                     CHANGE MASTER PASSWORD
220                 </td>
221             </tr>
222         </table>
223         <table align="center" class="db_option_table">
224             <tr>
225                 <td><label for="old_pwd">Master password:</label></td>
226                 <td><input type="password" name="old_pwd" class="required"
227                            minlength="1" autofocus="autofocus"/></td>
228             </tr>
229             <tr>
230             <td><label for="new_pwd">New master password:</label></td>
231             <td><input type="password" name="new_pwd" class="required"
232                        minlength="1"/></td>
233             </tr>
234             <tr>
235                 <td><label for="confirm_pwd">Confirm new master password:</label></td>
236                 <td><input type="password" name="confirm_pwd" class="required"
237                            equalTo="input[name=new_pwd]" minlength="1"/></td>
238             </tr>
239             <tr>
240                 <td colspan="2" align="right"><input type="submit" value="Change Password"/></td>
241             </tr>
242         </table>
243     </form>
244 </t>
245
246 <t t-name="Login_dblist">
247     <select name="db">
248         <t t-foreach="db_list" t-as="db">
249             <t t-if="selected_db === db">
250                 <option t-att-value="db" selected="true">
251                     <t t-esc="db"/></option>
252             </t>
253             <t t-if="selected_db !== db">
254                 <option t-att-value="db"><t t-esc="db"/></option>
255             </t>
256         </t>
257     </select>
258 </t>
259
260 <t t-name="Login">
261     <div>
262     <form class="oe_forms">
263         <fieldset>
264             <legend style="">
265                 <img src="/web/static/src/img/stock_person.png" alt="" />
266             </legend>
267             <div class="oe_box2">
268                 <table align="center" cellspacing="2px" cellpadding="0">
269                     <tr>
270                         <td><label for="db">Database:</label></td>
271                         <td>
272                             <input type="text" name="db" t-att-value="widget.selected_db || ''" autofocus="true"/>
273                         </td>
274                     </tr>
275                     <tr>
276                         <td><label for="login">User:</label></td>
277                         <td><input type="text" name="login"
278                             t-att-value="widget.selected_login || ''" autofocus="true"/></td>
279                     </tr>
280                     <tr>
281                         <td><label for="password">Password:</label></td>
282                         <td><input type="password" name="password"
283                                 t-att-value="widget.selected_password || ''"/></td>
284                     </tr>
285                     <tr>
286                         <td></td>
287                         <td>
288                                 <button type="button" id="oe-db-config">Database</button>
289                             <button type="submit" name="submit">Login</button>
290                         </td>
291                     </tr>
292                 </table>
293             </div>
294         </fieldset>
295         <div class="login_error_message">Bad username or password</div>
296     </form>
297     <div class="oe_login_right_pane">
298         <p>We think that daily job activities can be more intuitive, efficient, automated, .. and even fun.</p>
299         <h3>OpenERP's vision to be:</h3>
300
301         <table cellpadding="0" cellspacing="0" width="100%" style="border:none;">
302             <tbody>
303             <tr>
304                 <td>
305                     <img src="/web/static/src/img/product.png"/>
306                 </td>
307                 <td>
308                     <strong>Full featured</strong><br />
309                     Today's enterprise challenges are multiple. We provide one module for each need.
310                 </td>
311             </tr>
312             <tr>
313                 <td>
314                     <img src="/web/static/src/img/accessories-archiver.png"/>
315                 </td>
316                 <td>
317                     <strong>Open Source</strong><br />
318                     To Build a great product, we rely on the knowledge of thousands of contributors.
319                 </td>
320             </tr>
321             <tr>
322                 <td>
323                     <img src="/web/static/src/img/partner.png" />
324                 </td>
325                 <td>
326                     <strong>User Friendly</strong><br />
327                     In order to be productive, people need clean and easy to use interface.
328                 </td>
329             </tr>
330             </tbody>
331         </table>
332
333     </div>
334     </div>
335 </t>
336 <t t-name="Header">
337     <div>
338         <a t-att-href="'/' + widget.qs" class="company_logo_link">
339             <div class="company_logo" />
340         </a>
341     </div>
342 </t>
343 <t t-name="Header-content">
344     <h1 class="header_title">
345         <t t-esc="user.company_id[1]"/> (<t t-esc="widget.session.db"/>)<br/>
346         <small class="username"><t t-esc="user.name"/></small>
347     </h1>
348     <div class="header_corner">
349         <ul class="block">
350             <li>
351                 <a t-att-href="'/' + widget.qs" title="Home" class="home"><img src="/web/static/src/img/header-home.png" width="16" height="16" border="0"/></a>
352             </li>
353             <li class="preferences">
354                 <a href="javascript:void(0)" title="Preferences" class="preferences"><img src="/web/static/src/img/header-preferences.png" width="16" height="16" border="0"/></a>
355             </li>
356             <li>
357                 <a href="javascript:void(0)" title="About" class="about"><img src="/web/static/src/img/header-about.png" width="16" height="16" border="0"/></a>
358             </li>
359         </ul>
360         <div class="block">
361             <a href="#logout" class="logout">LOGOUT</a>
362         </div>
363
364     </div>
365     <div class="oe-shortcuts"> </div>
366 </t>
367 <ul t-name="Shortcuts">
368     <li t-foreach="shortcuts" t-as="shortcut"
369             t-att-data-id="shortcut.res_id"
370             t-att-data-shortcut-id="shortcut.id"
371         ><t t-esc="shortcut.name"/></li>
372 </ul>
373 <t t-name="Menu">
374     <table align="center">
375     <tr>
376         <td t-foreach="widget.data.data.children" t-as="menu">
377             <a href="#" t-att-data-menu="menu.id">
378                 <t t-esc="menu.name"/>
379             </a>
380         </td>
381     </tr>
382     </table>
383 </t>
384 <t t-name="Menu.secondary">
385     <div t-attf-class="oe_toggle_secondary_menu">
386         <span class="oe_menu_fold" title="Fold menu">&amp;laquo;</span>
387         <span class="oe_menu_unfold" title="Unfold menu">&amp;raquo;</span>
388     </div>
389     <div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
390         <t t-foreach="menu.children" t-as="menu">
391             <t t-set="classname">oe_secondary_menu_item</t>
392             <t t-set="level" t-value="0"/>
393             <t t-call="Menu.secondary.children"/>
394         </t>
395     </div>
396 </t>
397 <t t-name="Menu.secondary.children">
398     <t t-set="level" t-value="level + 1"/>
399     <a href="#" t-att-id="menu.children.length ? 'menu_' + menu.id : undefined"
400         t-att-class="classname + (menu.children.length ? ' submenu' : ' leaf') + (menu_first and level == 1 ? ' opened' : '')"
401         t-att-data-menu="menu.children.length ? undefined : menu.id">
402         <span t-attf-style="padding-left: #{(level - 2) * 20}px"> <t t-esc="menu.name"/></span>
403     </a>
404     <div t-attf-class="oe_secondary_submenu" t-if="menu.children.length" t-att-style="menu_first and level == 1 ? undefined : 'display: none'">
405         <t t-foreach="menu.children" t-as="menu">
406             <t t-set="classname">oe_secondary_submenu_item</t>
407             <t t-call="Menu.secondary.children"/>
408         </t>
409     </div>
410 </t>
411 <t t-name="ViewManager">
412     <table class="view-manager-main-table">
413     <tr>
414         <td class="view-manager-main-content">
415             <div class="oe-view-manager-header">
416                 <div class="oe_vm_switch">
417                     <t t-if="views.length != 1" t-foreach="views" t-as="view">
418                         <button type="button" t-att-data-view-type="view.view_type">
419                             <t t-esc="view.view_type"/>
420                         </button>
421                     </t>
422                 </div>
423             </div>
424             <div t-attf-id="#{prefix}_search" t-opentag="true"/>
425             <t t-foreach="views" t-as="view">
426                 <div t-attf-id="#{prefix}_view_#{view.view_type}"/>
427             </t>
428         </td>
429         <td class="view-manager-main-sidebar" height="100%">
430             <t t-foreach="views" t-as="view">
431                 <div t-attf-id="#{prefix}_sidebar_#{view.view_type}" class="sidebar-main-div closed-sidebar" style="display: none"/>
432             </t>
433         </td>
434     </tr>
435     </table>
436 </t>
437
438 <t t-extend="ViewManager" t-name="ViewManagerAction">
439     <t t-jquery=".oe-view-manager-header" t-operation="prepend">
440         <blockquote t-if="self.action.help and !self.flags.low_profile
441                          and !(self.action.id in self.session.hidden_menutips)">
442             <p><t t-esc="self.action.help"/></p>
443             <div>
444                 <button type="button" name="hide">Hide this tip</button>
445                 <button type="button" name="disable">Disable all tips</button>
446             </div>
447         </blockquote>
448         <a class="oe-shortcut-toggle" title="Add / Remove Shortcut..."
449            href="javascript: void(0)"> </a>
450         <h2 class="oe_view_title" t-if="self.session.debug || self.flags.display_title !==false">
451             <t t-if="self.flags.display_title !==false" t-esc="self.action.name"/>
452             <button t-if="self.session.debug" class="oe_get_xml_view">
453                 View#<span></span>
454             </button>
455         </h2>
456     </t>
457     <t t-jquery=".oe-view-manager-header" t-operation="after">
458         <ul class="oe-view-manager-logs"></ul>
459     </t>
460 </t>
461
462 <t t-name="Sidebar">
463     <a class="toggle-sidebar"></a>
464     <div class="sidebar-content">
465         <div class="sidebar-actions">
466         </div>
467     </div>
468 </t>
469 <t t-name="Sidebar.section">
470     <h2><t t-esc="name"/></h2>
471     <div t-att-id="section_id" t-att-class="classname">
472         <ul t-if="items">
473             <li t-foreach="items" t-as="item" t-att-class="item.classname">
474                 <a class="oe_sidebar_action_a" t-att-id="item.element_id" t-att-title="item.title" href="#">
475                     <t t-esc="item.label"/>
476                 </a>
477             </li>
478         </ul>
479     </div>
480 </t>
481 <t t-name="TranslateDialog">
482     <ul class="oe_translate_tabs">
483         <li><a t-attf-href="##{widget.element_id}_fields">Fields</a></li>
484         <li><a t-attf-href="##{widget.element_id}_view">View labels</a></li>
485         <li><a t-attf-href="##{widget.element_id}_sidebar">Sidebar Relates</a></li>
486     </ul>
487     <div t-attf-id="#{widget.element_id}_fields">
488         <table t-if="widget.view.translatable_fields" class="oe_frame oe_forms oe_translation_form" border="0" cellpadding="0" cellspacing="0" width="100%">
489         <tr>
490             <td class="oe_form_separator" width="1%" nowrap="nowrap">
491                 <div class="separator horizontal">Field</div>
492             </td>
493             <th t-foreach="widget.languages" align="left">
494                 <div class="separator horizontal"><t t-esc="name"/></div>
495             </th>
496         </tr>
497         <tr t-foreach="widget.view.translatable_fields" t-as="field">
498             <td class="oe_form_frame_cell" width="1%" nowrap="nowrap">
499                 <label class="oe_label"><t t-esc="field.string"/>:</label>
500             </td>
501             <td t-foreach="widget.languages" t-as="lg" class="oe_form_frame_cell">
502                 <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%"/>
503                 <textarea t-if="field.type == 'text'" t-attf-name="#{lg.code}-#{field.name}" data-value="" class="oe_trad_field" style="width: 100%"></textarea>
504             </td>
505         </tr>
506         </table>
507     </div>
508     <div t-attf-id="#{widget.element_id}_view">
509         Translate view
510     </div>
511     <div t-attf-id="#{widget.element_id}_sidebar">
512         Translate sidebar
513     </div>
514 </t>
515 <t t-name="TreeView">
516     <select t-if="toolbar" style="width: 30%">
517     </select>
518     <table class="oe-treeview-table">
519         <thead>
520             <tr>
521                 <th t-foreach="fields_view" t-as="field"
522                     t-if="!field.attrs.modifiers.tree_invisible"
523                     class="treeview-header">
524                     <t t-esc="fields[field.attrs.name].string" />
525                 </th>
526             </tr>
527         </thead>
528         <tbody>
529         </tbody>
530     </table>
531 </t>
532 <tr t-name="TreeView.rows"
533         t-foreach="records" t-as="record"
534         t-att-id="'treerow_' + record.id"
535         t-att-data-id="record.id" t-att-data-level="level + 1">
536     <t t-set="children" t-value="record[children_field]"/>
537     <t t-set="has_children" t-value="children and children.length"/>
538
539     <td t-foreach="fields_view" t-as="field"
540         t-if="!field.attrs.modifiers.tree_invisible"
541         t-att-data-id="record.id"
542         t-att-style="!field_index ? 'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px' : undefined"
543         t-att-class="!field_index and has_children ? 'treeview-tr' : 'treeview-td'">
544         <span t-if="!field.attrs.modifiers.invisible">
545             <t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
546         </span>
547     </td>
548 </tr>
549 <table t-name="ListView" class="oe-listview-content">
550     <t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
551     <thead class="ui-widget-header">
552         <tr t-if="options.action_buttons !== false or options.pager !== false">
553             <th t-att-colspan="columns_count">
554                 <table>
555                     <tr>
556                         <td t-if="options.action_buttons !== false" class="oe-actions">
557                             <button type="button" class="oe-list-add"
558                                     t-if="options.addable">
559                                 <t t-esc="options.addable"/>
560                             </button>
561                             <button type="button" class="oe-list-delete"
562                                     t-if="options.selectable and options.deletable">
563                                 Delete
564                             </button>
565                         </td>
566                         <th t-if="options.pager !== false" class="oe-list-pager">
567                             <button type="button" disabled="disabled"
568                                     data-pager-action="first">First</button>
569                             <button type="button" disabled="disabled"
570                                     data-pager-action="previous"
571                                     >&lt;</button>
572
573                             <span class="oe-pager-state">
574                             </span>
575
576                             <button type="button" disabled="disabled"
577                                     data-pager-action="next">&gt;</button>
578                             <button type="button" disabled="disabled"
579                                     data-pager-action="last">Last</button>
580                         </th>
581                     </tr>
582                 </table>
583             </th>
584         </tr>
585         <tr t-if="options.header" class="oe-listview-header-columns">
586             <t t-foreach="columns" t-as="column">
587                 <th t-if="column.meta">
588                     <t t-esc="column.string"/>
589                 </th>
590             </t>
591             <th t-if="options.selectable" width="1"/>
592             <t t-foreach="columns" t-as="column">
593                 <th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
594                     t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
595                     <t t-if="column.tag !== 'button'"
596                         ><t t-esc="column.string"/></t>
597                 </th>
598             </t>
599             <th t-if="options.deletable" width="1"/>
600         </tr>
601     </thead>
602     <tfoot class="ui-widget-header">
603         <tr>
604             <td t-if="options.selectable"/>
605             <td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe-number"
606                 t-att-data-field="column.id" t-att-title="column.label">
607             </td>
608             <td t-if="options.deletable"/>
609         </tr>
610     </tfoot>
611 </table>
612 <t t-name="ListView.rows" t-foreach="records.length" t-as="index">
613     <t t-call="ListView.row">
614         <t t-set="record" t-value="records.at(index)"/>
615         <t t-set="row_parity" t-value="index_parity"/>
616     </t>
617 </t>
618 <tr t-name="ListView.row" t-att-class="row_parity"
619         t-att-data-id="record.get('id')"
620         t-att-style="view.color_for(record)">
621     <t t-foreach="columns" t-as="column">
622         <td t-if="column.meta">
623
624         </td>
625     </t>
626     <th t-if="options.selectable" class="oe-record-selector" width="1">
627         <input type="checkbox"/>
628     </th>
629     <t t-foreach="columns" t-as="column">
630         <t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
631         <td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
632             t-att-class="'oe-field-cell' + (align ? ' oe-number' : '')"
633             t-att-data-field="column.id">
634             <t t-raw="render_cell(record.toForm().data, column)"/>
635         </td>
636     </t>
637     <td t-if="options.deletable" class='oe-record-delete' width="1">
638         <button type="button" name="delete">♻</button>
639     </td>
640 </tr>
641 <t t-name="ListView.row.form">
642     <t t-raw="frame.render()"/>
643 </t>
644 <t t-name="FormView">
645     <div class="oe_form_header">
646         <div class="oe_form_buttons" t-if="view.options.action_buttons !== false">
647             <!--<button type="button" class="oe_form_button_save">
648                 <span class="oe_form_on_update">Save</span>
649                 <span class="oe_form_on_create">Create</span>
650             </button>-->
651             <button type="button" class="oe_form_button_save_edit">
652                 <span class="oe_form_on_update">Save &amp; Edit</span>
653                 <span class="oe_form_on_create">Create &amp; Edit</span>
654             </button>
655             <!--<button type="button" class="oe_form_button_cancel">Cancel</button>-->
656             <button type="button" class="oe_form_button_new">New</button>
657             <button type="button" class="oe_form_button_duplicate oe_form_on_update">Duplicate</button>
658             <button type="button" class="oe_form_button_toggle">Readonly/Editable</button>
659         </div>
660         <div class="oe_form_pager" t-if="view.options.pager !== false">
661             <button type="button" data-pager-action="first">First</button>
662             <button type="button" data-pager-action="previous">&lt;&lt;</button>
663
664             <span class="oe_pager_index">0</span> / <span class="oe_pager_count">0</span>
665
666             <button type="button" data-pager-action="next">&gt;&gt;</button>
667             <button type="button" data-pager-action="last">Last</button>
668         </div>
669     </div>
670     <t t-raw="frame.render()"/>
671 </t>
672 <t t-name="FormView.sidebar.attachments">
673     <div class="oe-sidebar-attachments-toolbar">
674         <div class="oe-binary-file-set" style="float: right">
675             <form class="oe-binary-form" t-attf-target="#{element_id}_iframe"
676                 method="post" enctype="multipart/form-data" action="/web/binary/upload_attachment">
677                 <input type="hidden" name="session_id" t-att-value="session.session_id"/>
678                 <input type="hidden" name="callback" t-attf-value="#{element_id}_iframe"/>
679                 <input type="hidden" name="model" t-att-value="view.dataset.model"/>
680                 <input type="hidden" name="id" t-att-value="view.datarecord.id"/>
681                 <button class="button" type="button">
682                     <img src="/web/static/src/img/throbber.gif" width="16" height="16" style="display: none"/>
683                     <span>Add</span>
684                 </button>
685                 <input type="file" class="oe-binary-file" name="ufile" title="Add attachment"
686                     t-att-onclick="view.datarecord.id ? null : 'alert(\'No record selected ! You can only attach to existing record.\'); return false;'"/>
687             </form>
688             <iframe t-attf-id="#{element_id}_iframe" t-attf-name="#{element_id}_iframe" style="display: none"> </iframe>
689         </div>
690     </div>
691     <br style="clear: both"/>
692     <ul class="oe-sidebar-attachments-items">
693         <li t-foreach="attachments" t-as="attachment">
694             <t t-if="attachment.type == 'binary'" t-set="attachment.url" t-value="'/web/binary/saveas?session_id='
695                 + session.session_id + '&amp;model=ir.attachment&amp;id=' + attachment.id
696                 + '&amp;field=datas&amp;fieldname=name&amp;t=' + (new Date().getTime())"/>
697             <a class="oe-sidebar-attachments-link" t-att-href="attachment.url" target="_blank">
698                 <t t-esc="attachment.name"/>
699             </a>
700             <a href="#" class="oe-sidebar-attachment-delete" t-att-data-id="attachment.id" t-attf-title="Delete the attachment #{attachment.name}">
701                 <img src="/web/static/src/img/attachments-close.png" width="15" height="15" border="0"/>
702             </a>
703         </li>
704     </ul>
705 </t>
706 <t t-name="Widget">
707     Unhandled widget
708     <t t-raw="console.log('Unhandled widget', widget)"/>
709 </t>
710 <t t-name="WidgetFrame">
711     <table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms">
712     <tr t-foreach="widget.table" t-as="row">
713         <t t-foreach="row" t-as="td">
714             <td t-att-colspan="td.colspan gt 1 ? td.colspan : undefined"
715                 t-att-width="td.width"
716                 t-att-nowrap="td.nowrap or td.is_field_m2o? 'true' : undefined"
717                 t-att-valign="td.table ? 'top' : undefined"
718                 t-attf-class="oe_form_frame_cell #{td.classname} #{td.element_class}"
719             >
720                 <t t-raw="td.render()"/>
721             </td>
722         </t>
723     </tr>
724     </table>
725 </t>
726 <t t-name="WidgetNotebook">
727     <ul>
728         <li t-foreach="widget.pages" t-as="page">
729             <a href="#">
730                 <t t-esc="page.string"/>
731             </a>
732         </li>
733     </ul>
734     <t t-foreach="widget.pages" t-as="page">
735         <t t-raw="page.render()"/>
736     </t>
737 </t>
738 <t t-name="WidgetNotebookPage">
739     <div>
740         <t t-call="WidgetFrame"/>
741     </div>
742 </t>
743 <t t-name="WidgetNotebook.readonly">
744     <t t-foreach="widget.pages" t-as="page">
745         <h3><t t-esc="page.string"/></h3>
746         <t t-raw="page.render()"/>
747     </t>
748 </t>
749 <t t-name="WidgetSeparator">
750     <div t-if="widget.orientation !== 'vertical'" t-att-class="'separator ' + widget.orientation">
751         <t t-esc="widget.string"/>
752     </div>
753 </t>
754 <t t-name="WidgetLabel">
755     <label t-att-for="widget.element_id"
756            t-att-class="'oe_label' + (widget.help ? '_help' : '')"
757            t-att-title="widget.help">
758         <t t-esc="widget.string"/>
759         <span t-if="widget.help">?</span>
760         <t t-if="widget.string and widget.node.tag != 'label'">:</t>
761     </label>
762 </t>
763 <t t-name="WidgetParagraph">
764     <p class="oe_form_paragraph"><t t-esc="widget.string"/></p>
765 </t>
766 <t t-name="FieldChar">
767     <input type="text" size="1"
768         t-att-name="widget.name"
769         t-att-id="widget.element_id"
770         t-attf-class="field_#{widget.type}"
771         t-attf-style="width: #{widget.field.translate ? '99' : '100'}%"
772     />
773     <img class="oe_field_translate" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
774 </t>
775 <t t-name="FieldChar.readonly">
776     <div
777         t-att-id="widget.element_id"
778         t-attf-class="field_#{widget.type}"
779         t-attf-style="width: #{widget.field.translate ? '99' : '100'}%">
780     </div>
781 </t>
782 <t t-name="FieldURI.readonly">
783     <a href="#">#</a>
784 </t>
785 <t t-name="FieldEmail">
786     <table cellpadding="0" cellspacing="0" border="0" width="100%">
787     <tr>
788         <td width="100%">
789             <t t-call="FieldChar"/>
790         </td>
791         <td width="16">
792             <button type="button" class="button" title="Send an e-mail with your default e-mail client">
793                 <img src="/web/static/src/img/icons/terp-mail-message-new.png"/>
794             </button>
795         </td>
796     </tr>
797     </table>
798 </t>
799 <t t-name="FieldUrl">
800     <table cellpadding="0" cellspacing="0" border="0" width="100%">
801     <tr>
802         <td width="100%">
803             <t t-call="FieldChar"/>
804         </td>
805         <td width="16">
806             <button type="button" class="button" title="Open this resource">
807                 <img src="/web/static/src/img/icons/gtk-ok.png"/>
808             </button>
809         </td>
810     </tr>
811     </table>
812 </t>
813 <t t-name="FieldText">
814     <textarea rows="6"
815         t-att-name="widget.name"
816         t-att-id="widget.element_id"
817         t-attf-class="field_#{widget.type}"
818         t-attf-style="width: #{widget.field.translate ? '99' : '100'}%"
819     ></textarea>
820     <img class="oe_field_translate" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
821 </t>
822 <t t-name="web.datetimepicker">
823     <div class="oe_datepicker_root">
824         <input type="text" size="1" style="width: 100%"/>
825         <img class="oe_input_icon oe_datepicker_trigger" src="/web/static/src/img/ui/field_calendar.png"
826              title="Select date" width="16" height="16" border="0"/>
827         <div class="oe_datepicker ui-widget-content ui-corner-all" style="display: none; position: absolute; z-index: 1;">
828             <div class="oe_datepicker_container"/>
829             <button type="button" class="oe_datepicker_close ui-state-default ui-priority-primary ui-corner-all" style="float: right;">Done</button>
830         </div>
831     </div>
832 </t>
833 <t t-name="FieldSelection">
834     <select
835         t-att-name="widget.name"
836         t-att-id="widget.element_id"
837         t-attf-class="field_#{widget.type}"
838         style="width: 100%">
839             <t t-foreach="widget.values" t-as="option">
840                 <option><t t-esc="option[1]"/></option>
841             </t>
842     </select>
843 </t>
844 <t t-name="FieldMany2One">
845     <div class="oe-m2o">
846         <input type="text" size="1" style="width: 100%;"
847                 t-att-id="widget.element_id"/>
848         <span class="oe-m2o-drop-down-button">
849             <img src="/web/static/src/img/down-arrow.png" /></span>
850         <span class="oe-m2o-cm-button" t-att-id="widget.name + '_open'">
851             <img src="/web/static/src/img/icons/gtk-index.png"/></span>
852         <div t-att-id="widget.cm_id" class="contextMenu" style="display:none">
853         </div>
854     </div>
855 </t>
856 <t t-name="FieldMany2One.context_menu">
857     <ul>
858         <li t-att-id="widget.cm_id + '_open'" style="color:grey">Open...</li>
859         <li t-att-id="widget.cm_id + '_create'">Create...</li>
860         <li t-att-id="widget.cm_id + '_search'" class="oe_m2o_menu_item_mandatory">Search...</li>
861         <t t-set="i" t-value="0"/>
862         <t t-foreach="widget.related_entries" t-as="entry">
863             <li t-att-id="widget.cm_id + '_related_' + i" style="color:grey" class="oe_m2o_menu_item_mandatory">
864                 ... <t t-esc="(entry[2] || {})['name'] || ''"/>
865             </li>
866             <t t-set="i" t-value="i+1"/>
867         </t>
868     </ul>
869 </t>
870 <t t-name="FieldOne2Many">
871 </t>
872 <t t-name="FieldMany2Many">
873     <div t-att-id="widget.list_id"></div>
874 </t>
875 <t t-name="FieldReference">
876     <table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms">
877     <tr>
878         <td t-attf-class="oe_form_frame_cell oe_form_selection #{widget.selection.element_class}">
879             <t t-raw="widget.selection.render()"/>
880         </td>
881         <td t-attf-class="oe_form_frame_cell oe_form_many2one #{widget.m2o.element_class}" nowrap="true" style="display: none">
882             <t t-raw="widget.m2o.render()"/>
883         </td>
884     </tr>
885     </table>
886 </t>
887 <t t-name="FieldBoolean">
888     <input type="checkbox"
889         t-att-name="widget.name"
890         t-att-id="widget.element_id"
891         t-attf-class="field_#{widget.type}"/>
892 </t>
893 <t t-name="FieldProgressBar">
894     <div t-opentag="true" class="oe-progressbar">
895         <span></span>
896     </div>
897 </t>
898 <t t-name="FieldBinaryImage">
899     <table cellpadding="0" cellspacing="0" border="0">
900     <tr>
901         <td align="center">
902             <img src="/web/static/src/img/placeholder.png" class="oe-binary-image"
903                 t-att-border="widget.readonly ? 0 : 1"
904                 t-att-id="widget.element_id + '_field'"
905                 t-att-name="widget.name"
906                 t-attf-class="field_#{widget.type}"
907                 t-att-width="widget.node.attrs.img_width || widget.node.attrs.width"
908                 t-att-height="widget.node.attrs.img_height || widget.node.attrs.height"
909             />
910         </td>
911     </tr>
912     <tr>
913         <td align="center" valign="bottom" height="25">
914             <div class="oe-binary">
915                 <table cellspacing="0" cellpadding="0" border="0">
916                 <tr>
917                     <td>
918                         <div class="oe-binary-file-set" style="width: 40px; height:22px;">
919                             <form class="oe-binary-form" t-att-target="widget.iframe"
920                                 method="post" enctype="multipart/form-data" action="/web/binary/upload">
921                                 <input type="hidden" name="session_id" value=""/>
922                                 <input type="hidden" name="callback" t-att-value="widget.iframe"/>
923                                 <button class="button" type="button" title="Set Image">
924                                     <img src="/web/static/src/img/icons/STOCK_DIRECTORY.png"/>
925                                 </button>
926                                 <input type="file" class="oe-binary-file" name="ufile"/>
927                             </form>
928                         </div>
929                     </td>
930                     <td>
931                         <button class="button oe-binary-file-clear" type="button" title="Clear">
932                             <img src="/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"/>
933                         </button>
934                     </td>
935                 </tr>
936                 </table>
937             </div>
938             <div class="oe-binary-progress" style="display: none">
939                 <img src="/web/static/src/img/throbber.gif" width="16" height="16"/>
940                 <b>Uploading ...</b>
941             </div>
942             <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"> </iframe>
943         </td>
944     </tr>
945     </table>
946 </t>
947 <t t-name="FieldBinaryFile">
948     <table cellpadding="0" cellspacing="0" border="0" width="100%">
949     <tr>
950         <td width="100%">
951             <input type="text" size="1"
952                 t-att-name="widget.name"
953                 t-att-id="widget.element_id + '_field'"
954                 t-attf-class="field_#{widget.type}" style="width: 100%"
955             />
956         </td>
957         <td class="oe-binary" nowrap="true">
958             <table cellspacing="0" cellpadding="0" border="0">
959             <tr>
960                 <td>
961                     <div class="oe-binary-file-set" style="width: 80px; height:22px;">
962                         <form class="oe-binary-form" t-att-target="widget.iframe"
963                             method="post" enctype="multipart/form-data" action="/web/binary/upload">
964                             <input type="hidden" name="session_id" value=""/>
965                             <input type="hidden" name="callback" t-att-value="widget.iframe"/>
966                             <button class="button" type="button" title="Set Image">
967                                 <img src="/web/static/src/img/icons/STOCK_DIRECTORY.png"/>
968                                 <span>Select</span>
969                             </button>
970                             <input type="file" class="oe-binary-file" name="ufile"/>
971                         </form>
972                     </div>
973                 </td>
974                 <td>
975                     <button class="button oe-binary-file-save" type="button" title="Save As">
976                         <img src="/web/static/src/img/icons/gtk-save.png"/>
977                         <span>Save As</span>
978                     </button>
979                 </td>
980                 <td>
981                     <button class="button oe-binary-file-clear" type="button" title="Clear">
982                         <img src="/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"/>
983                         <span>Clear</span>
984                     </button>
985                 </td>
986             </tr>
987             </table>
988         </td>
989         <td class="oe-binary-progress" style="display: none" nowrap="true">
990             <img src="/web/static/src/img/throbber.gif" width="16" height="16"/>
991             <b>Uploading ...</b>
992             <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"> </iframe>
993         </td>
994     </tr>
995     </table>
996 </t>
997 <t t-name="WidgetButton">
998     <button type="button"
999         t-att-title="widget.help"
1000         style="width: 100%" class="button">
1001         <img t-if="widget.node.attrs.icon" t-att-src="'/web/static/src/img/icons/' + widget.node.attrs.icon + '.png'" width="16" height="16"/>
1002         <span t-if="widget.string"><t t-esc="widget.string"/></span>
1003     </button>
1004 </t>
1005 <t t-name="SearchView">
1006     <form class="oe_forms">
1007         <t t-call="SearchView.render_lines"/>
1008         <div class="oe_search-view-buttons" style="text-align: right;">
1009             <input type="submit" value="Search"/>
1010             <input type="reset" value="Clear"/>
1011             <button class="oe_search-view-custom-filter-btn"><span>Advanced Filter</span></button>
1012             <select class="oe_search-view-filters-management">
1013             </select>
1014         </div>
1015     </form>
1016 </t>
1017 <t t-name="SearchView.managed-filters">
1018     <option value="_filters">-- Filters --</option>
1019     <t t-set="i" t-value="0"/>
1020     <t t-foreach="filters" t-as="filter">
1021         <option t-att-value="'get:' + i"><t t-esc="filter.name"/></option>
1022         <t t-set="i" t-value="i+1"/>
1023     </t>
1024     <option value="_actions">-- Actions --</option>
1025     <option value="save_filter">Save Filter</option>
1026     <option value="manage_filters">Manage Filters</option>
1027 </t>
1028 <t t-name="SearchView.managed-filters.add">
1029     <div>
1030         <p>Filter Name:</p>
1031         <input type="text"/>
1032         <p>(Any existing filter with the same name will be replaced)</p>
1033     </div>
1034 </t>
1035 <t t-name="SearchView.render_lines">
1036     <table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
1037            t-foreach="lines" t-as="line">
1038         <tr>
1039             <td t-foreach="line" t-as="widget">
1040                 <t t-raw="widget.render(defaults)"/>
1041             </td>
1042         </tr>
1043     </table>
1044 </t>
1045 <button t-name="SearchView.filter" type="button"
1046         t-att-id="element_id"
1047         t-att-title="attrs.help"
1048         t-att-class="classes.join(' ')"
1049         t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined">
1050     <img t-if="attrs.icon" t-att-src="'/web/static/src/img/icons/' + attrs.icon + '.png'" width="16" height="16"/>
1051     <br t-if="attrs.icon and attrs.string"/>
1052     <t t-esc="attrs.string"/>
1053 </button>
1054 <span t-name="SearchView.filters" class="filter_label_group"
1055     ><t t-foreach="filters" t-as="filter"
1056         ><t t-raw="filter.render(defaults)"/></t
1057 ></span>
1058 <t t-name="SearchView.field">
1059     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1060            t-att-title="attrs.help"
1061            t-att-for="element_id">
1062         <t t-esc="attrs.string || attrs.name"/>
1063         <span t-if="attrs.help">?</span>
1064     </label>
1065     <div style="white-space: nowrap;">
1066         <input type="text" size="15" t-att-name="attrs.name"
1067                t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined"
1068                t-att-id="element_id"
1069                t-att-value="defaults[attrs.name] || ''"/>
1070         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1071     </div>
1072 </t>
1073 <t t-name="SearchView.date">
1074     <label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1075            t-att-title="attrs.help"
1076            t-att-for="element_id">
1077         <t t-esc="attrs.string || attrs.name"/>
1078         <span t-if="attrs.help">?</span>
1079     </label>
1080     <div style="white-space: nowrap;">
1081         <span t-att-id="element_id"></span>
1082         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1083     </div>
1084 </t>
1085 <t t-name="SearchView.field.selection">
1086     <label t-att-title="attrs.help"
1087            t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
1088            t-att-for="element_id">
1089         <t t-esc="attrs.string || attrs.name"/>
1090         <span t-if="attrs.help">?</span>
1091     </label>
1092     <div style="white-space: nowrap;">
1093         <select t-att-name="attrs.name" t-att-id="element_id"
1094                 t-att-autofocus="attrs.default_focus === '1' || undefined">
1095             <option t-if="prepend_empty"/>
1096             <t t-foreach="attrs.selection" t-as="option">
1097                 <t t-set="selected" t-value="defaults[attrs.name] === option[0]"/>
1098                 <option t-if="selected"
1099                         t-att-value="option_index" selected="selected">
1100                     <t t-esc="option[1]"/>
1101                 </option>
1102                 <option t-if="!selected" t-att-value="option_index">
1103                     <t t-esc="option[1]"/>
1104                 </option>
1105             </t>
1106         </select>
1107         <t t-if="filters.length" t-raw="filters.render(defaults)"/>
1108     </div>
1109 </t>
1110 <t t-name="SearchView.util.expand">
1111     <div t-att-class="'searchview_group ' + (expand == '0' ? 'folded' : 'expanded')"
1112          t-att-id="element_id">
1113         <a t-if="label" class="searchview_group_string" href="#">
1114             <t t-esc="label"/>
1115         </a>
1116         <div class="searchview_group_content">
1117             <t t-raw="content"/>
1118         </div>
1119     </div>
1120 </t>
1121 <t t-name="SearchView.group">
1122     <t t-call="SearchView.util.expand">
1123         <t t-set="expand" t-value="attrs.expand"/>
1124         <t t-set="label" t-value="attrs.string"/>
1125         <t t-set="content">
1126             <t t-call="SearchView.render_lines"/>
1127         </t>
1128     </t>
1129 </t>
1130 <t t-name="SearchView.extended_search">
1131     <t t-call="SearchView.util.expand">
1132         <t t-set="expand" t-value="false"/>
1133         <t t-set="label" t-value="'Advanced Filters'"/>
1134         <t t-set="content">
1135             <div class="searchview_extended_groups_list">
1136             </div>
1137         </t>
1138     </t>
1139 </t>
1140 <t t-name="SearchView.extended_search.group">
1141     <div t-att-id="element_id" class="searchview_extended_group">
1142         <select class="searchview_extended_group_choice">
1143             <option value="any">Any of the following conditions must match</option>
1144             <option value="all">All the following conditions must match</option>
1145             <option value="none">None of the following conditions must match</option>
1146         </select>
1147         <a class="searchview_extended_delete_group"
1148                 href="javascript:void(0)"><span></span></a>
1149         <div class="searchview_extended_propositions_list">
1150         </div>
1151         <a class="searchview_extended_add_proposition" href="javascript:void(0)">
1152             <span>Add condition</span></a>
1153         <div class="oe_adv_filters_and"><span>and</span></div>
1154     </div>
1155 </t>
1156 <t t-name="SearchView.extended_search.proposition">
1157     <div t-att-id="element_id">
1158         <select class="searchview_extended_prop_field">
1159             <t t-foreach="attrs.fields" t-as="field">
1160                 <option t-if="typeof field.store === 'undefined' || field.store || field.fnct_search"
1161                         t-att="{'selected': field === attrs.selected ? 'selected' : null}"
1162                         t-att-value="field.name">
1163                     <t t-esc="field.string"/>
1164                 </option>
1165             </t>
1166         </select>
1167         <select class="searchview_extended_prop_op"/>
1168         <span class="searchview_extended_prop_value"/>
1169         <a class="searchview_extended_delete_prop"
1170                 href="javascript:void(0)"><span> </span></a>
1171     </div>
1172 </t>
1173 <t t-name="SearchView.extended_search.proposition.char">
1174     <input t-att-id="element_id" class="field_char"/>
1175 </t>
1176 <t t-name="SearchView.extended_search.proposition.empty">
1177     <span t-att-id="element_id"></span>
1178 </t>
1179 <t t-name="SearchView.extended_search.proposition.integer">
1180     <input type="number" t-att-id="element_id" class="field_integer" step="1"/>
1181 </t>
1182 <t t-name="SearchView.extended_search.proposition.float">
1183     <input type="number" t-att-id="element_id" class="field_float" step="0.01"/>
1184 </t>
1185 <t t-name="SearchView.extended_search.proposition.boolean">
1186 </t>
1187 <t t-name="SearchView.extended_search.proposition.selection">
1188     <select t-att-id="element_id">
1189         <t t-foreach="field.selection" t-as="element">
1190         <option t-att-value="element[0]"><t t-esc="element[1]"/></option>
1191         </t>
1192     </select>
1193 </t>
1194 <t t-name="DialogWarning">
1195     <table cellspacing="0" cellpadding="0" border="0" class="oe-dialog-warning">
1196     <tr>
1197         <td><img src="/web/static/src/img/warning.png" class="oe-dialog-icon"/></td>
1198         <td>
1199             <p>
1200                 <t t-js="d">
1201                     var message = d.message ? d.message : d.error.data.fault_code;
1202                     d.html_error = context.engine.tools.html_escape(message)
1203                         .replace(/\n/g, '<br/>');
1204                 </t>
1205                 <t t-raw="html_error"/>
1206             </p>
1207         </td>
1208     </tr>
1209     </table>
1210 </t>
1211 <t t-name="DialogTraceback">
1212     <pre><t t-esc="error.message"/></pre>
1213     <hr/>
1214     <pre><t t-esc="error.data.debug"/></pre>
1215 </t>
1216 <t t-name="SelectCreatePopup">
1217     <div t-att-id="element_id">
1218         <table style="width:100%">
1219             <tr style="width:100%">
1220                 <td style="width:100%">
1221                     <div t-att-id="element_id + '_search'" style="width:100%"></div>
1222                 </td>
1223             </tr>
1224             <tr style="width:100%">
1225                 <td style="width:100%">
1226                     <div t-att-id="element_id + '_view_list'" style="width:100%"></div>
1227                 </td>
1228             </tr>
1229         </table>
1230         <div t-att-id="element_id + '_view_form'" style="width:100%"></div>
1231     </div>
1232 </t>
1233 <t t-name="SelectCreatePopup.search.buttons">
1234     <button type="button" class="oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
1235     <button type="button" class="oe_selectcreatepopup-search-close">Cancel</button>
1236 </t>
1237 <t t-name="SelectCreatePopup.form.buttons">
1238     <t t-if="widget.options.disable_multiple_selection">
1239         <button type="button" class="oe_selectcreatepopup-form-save">Save</button>
1240     </t>
1241     <t t-if="! widget.options.disable_multiple_selection">
1242         <button type="button" class="oe_selectcreatepopup-form-save-new">Save &amp; New</button>
1243         <button type="button" class="oe_selectcreatepopup-form-save">Save &amp; Close</button>
1244     </t>
1245     <button type="button" class="oe_selectcreatepopup-form-close">Cancel</button>
1246 </t>
1247 <t t-name="FormOpenPopup">
1248     <div t-att-id="element_id">
1249         <div t-att-id="element_id + '_view_form'" style="width:100%"></div>
1250     </div>
1251 </t>
1252 <t t-name="FormOpenPopup.form.buttons">
1253     <button type="button" class="oe_formopenpopup-form-save">Save</button>
1254     <button type="button" class="oe_formopenpopup-form-close">Cancel</button>
1255 </t>
1256 <t t-name="ListView.row.frame" t-extend="WidgetFrame">
1257     <t t-jquery="tr">
1258         $(document.createElement('t'))
1259             .append(this.contents())
1260             .attr({
1261                 't-foreach': this.attr('t-foreach'),
1262                 't-as': this.attr('t-as')
1263             })
1264             .replaceAll(this)
1265             .after($(document.createElement('td')).append(
1266                 $(document.createElement('button')).attr({
1267                     'class': 'oe-edit-row-save', 'type': 'button'}).text('Save')))
1268             .before($(document.createElement('td')).append(
1269                 $(document.createElement('button')).attr({
1270                     'class': 'oe-edit-row-cancel', 'type': 'button'}).text('Cancel')))
1271             .unwrap();
1272     </t>
1273 </t>
1274
1275 <t t-name="ExportView">
1276     <a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
1277 </t>
1278 <table t-name="ExportTreeView" class="oe-export"
1279        style="background-color: #F3F3F3;">
1280     <tr>
1281         <td colspan="3">
1282             This wizard will export all data that matches the current search criteria to a CSV file.
1283             You can export all data or only the fields that can be reimported after modification.
1284         </td>
1285     </tr>
1286     <tr>
1287         <td colspan="3">
1288             <label for="import_compat">Export Type:</label>
1289             <select id="import_compat" name="import_compat">
1290                 <option value="yes">Import Compatible Export</option>
1291                 <option value="">Export all Data</option>
1292             </select>
1293
1294             <label for="export_format">Export Formats</label>
1295             <select id="export_format" name="export_format"></select>
1296         </td>
1297     </tr>
1298
1299     <tr>
1300         <th>Available fields</th>
1301         <th/>
1302         <th>
1303             Fields to export
1304             <a style="color: blue; text-decoration: none;" href="#" id="export_new_list">Save fields list</a>
1305             <div id="savenewlist"></div>
1306             <div id="ExistsExportList"></div>
1307         </th>
1308     </tr>
1309     <tr style="height: 400px;">
1310         <td class="oe_export_fields_selector_left">
1311             <div id="left_field_panel">
1312             </div>
1313         </td>
1314         <td class="oe_export_fields_selector_center">
1315             <button id="add_field">Add</button>
1316             <button id="remove_field">Remove</button>
1317             <button id="remove_all_field">Remove All</button>
1318         </td>
1319         <td class="oe_export_fields_selector_right">
1320             <select name="fields_list" id="fields_list"
1321                     multiple="multiple"></select>
1322         </td>
1323     </tr>
1324 </table>
1325
1326 <table t-name="ExportTreeView-Secondary"
1327        id="field-tree-structure" class="oe_export_fields_selector_export"
1328        cellspacing="0" cellpadding="0">
1329     <tr><th class="oe_export_tree_header"> Name </th></tr>
1330     <t t-call="ExportTreeView-Secondary.children"/>
1331 </table>
1332 <tr t-name="ExportTreeView-Secondary.children"
1333     t-foreach="fields" t-as="field"
1334     t-att-id="'treerow-' + field.id" class="oe_export_row">
1335     <td>
1336         <table class="tree_grid" border="0">
1337             <tr class="oe_export_row">
1338                 <t t-foreach="(field.id).split('/')" t-as="level" >
1339                     <t t-if="(field.id).split('/')[0] != level">
1340                         <td width="18">&amp;nbsp;</td>
1341                     </t>
1342                 </t>
1343                 <td valign="top" align="left" style="cursor: pointer;" width="18">
1344                     <t t-if="field.children">
1345                         <t t-if="(field.id).split('/').length != 3">
1346                             <img t-att-id="'parentimg-' + field.id" src="/web/static/src/img/expand.gif" width="16" height="16" border="0"/>
1347                         </t>
1348                     </t>
1349                 </td>
1350                 <td id="tree-column" valign="middle" align="left" style="cursor: pointer;">
1351                     <a t-att-id="'export-' + field.id"  t-att-string="field.string" href="javascript: void(0);" style="text-decoration: none;">
1352                         <t t-esc="field.string"/>
1353                     </a>
1354                 </td>
1355             </tr>
1356         </table>
1357     </td>
1358 </tr>
1359
1360 <t t-name="ExportNewList">
1361     <tr>
1362         <th><label>Save as:</label></th>
1363         <td><input size="10" type="text" id="savelist_name"/></td>
1364         <td><button class="oe_export_button_export" id="add_export_list">Ok</button></td>
1365     </tr>
1366 </t>
1367
1368 <t t-name="Exists.ExportList">
1369     <label for="saved_export_list">Saved exports:</label>
1370
1371     <select id="saved_export_list">
1372         <option></option>
1373         <t t-foreach="existing_exports" t-as="export">
1374             <option t-att-value="export.id"><t t-esc="export.name"/></option>
1375         </t>
1376     </select>
1377     <button class="oe_export_button_export" id="delete_export_list" type="button">Delete</button>
1378 </t>
1379 <t t-name="Change_Pwd">
1380     <form name="change_password_form" class="oe_forms" method="POST">
1381         <table align="center">
1382             <tr>
1383                 <td><label for="old_pwd">Old Password:</label></td>
1384                 <td><input type="password" name="old_pwd"
1385                            minlength="1" autofocus="autofocus"/></td>
1386             </tr>
1387             <tr>
1388             <td><label for="new_password">New Password:</label></td>
1389             <td><input type="password" name="new_password"
1390                        minlength="1" autofocus="autofocus"/></td>
1391             </tr>
1392             <tr>
1393                 <td><label for="confirm_pwd">Confirm Password:</label></td>
1394                 <td><input type="password" name="confirm_pwd"
1395                              minlength="1"/></td>
1396             </tr>
1397             <tr>
1398                 <td colspan="2" align="right"><input type="submit" value="Change Password"/></td>
1399             </tr>
1400         </table>
1401     </form>
1402 </t>
1403
1404 <t t-name="ImportView">
1405     <a id="importview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Import</a>
1406 </t>
1407 <t t-name="ImportDataView">
1408 <form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data">
1409     <input type="hidden" name="session_id" t-att-value="session.session_id"/>
1410     <h2 class="separator horizontal">1. Import a .CSV file</h2>
1411     <p>Select a .CSV file to import. If you need a sample of file to import,
1412        you should use the export tool with the "Import Compatible" option.
1413     </p>
1414     <p>
1415         <label for="csvfile">CSV File:</label>
1416         <input type="file" id="csvfile" size="50" name="csvfile"/>
1417     </p>
1418     <h2 class="separator horizontal">2. Check your file format</h2>
1419     <div id="result"></div>
1420     <fieldset>
1421         <legend style="cursor:pointer;">Import Options</legend>
1422         <table style="display:none">
1423             <tr>
1424                 <td colspan="4">
1425                     <label for="file_has_headers">Does your file have titles?</label>
1426                     <input type="checkbox" checked="checked"
1427                            id="file_has_headers"/>
1428                 </td>
1429             </tr>
1430             <tr>
1431                 <td><label for="csv_separator">Separator:</label></td>
1432                 <td><input type="text" name="csvsep" id="csv_separator" value=","/></td>
1433                 <td><label for="csv_delimiter">Delimiter:</label></td>
1434                 <td><input type="text" name="csvdel" id="csv_delimiter" value='"'/></td>
1435             </tr>
1436             <tr>
1437                 <td><label for="csv_encoding">Encoding:</label></td>
1438                 <td>
1439                     <select name="csvcode" id="csv_encoding">
1440                         <option value="utf-8">UTF-8</option>
1441                         <option value="latin1">Latin 1</option>
1442                     </select>
1443                 </td>
1444                 <td><label for="csv_skip" title="For use if CSV files have titles on multiple lines, skips more than a single line during import">
1445                     Lines to skip<sup>?</sup>:</label></td>
1446                 <td><input type="number" id="csv_skip" value="0" min="0"/></td>
1447             </tr>
1448         </table>
1449     </fieldset>
1450 </form>
1451 </t>
1452 <table t-name="ImportView.result"
1453         class="oe_import_grid" width="100%" style="margin: 5px 0;">
1454     <tr t-if="headers" class="oe_import_grid-header">
1455         <td t-foreach="headers" t-as="header" class="oe_import_grid-cell">
1456             <t t-esc="header"/></td>
1457     </tr>
1458     <tr>
1459         <td t-foreach="records[0]" t-as="column">
1460             <input class="sel_fields"/>
1461         </td>
1462     </tr>
1463     <tr t-foreach="records" t-as="record" class="oe_import_grid-row">
1464         <td t-foreach="record" t-as="cell" class="oe_import_grid-cell">
1465             <t t-esc="cell"/></td>
1466     </tr>
1467 </table>
1468 <t t-name="ImportView.error">
1469     <p style="white-space:pre-line;">The import failed due to:<t t-esc="error.message"/></p>
1470     <t t-if="error.preview">
1471         <p>Here is a preview of the file we could not import:</p>
1472         <pre><t t-esc="error.preview"/></pre>
1473     </t>
1474 </t>
1475
1476 <t t-name="About-Page">
1477     <div>
1478         <h1>OpenERP Web</h1>
1479         <h3 style="padding:0 5px 5px">Version <t t-esc="version_info.version"/></h3>
1480         <p>
1481             Copyright © 2011-TODAY OpenERP SA. All Rights Reserved.<br />
1482             OpenERP is a trademark of the <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP SA Company</a>.
1483         </p>
1484         <p>
1485             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>
1486         </p>
1487         <br />
1488         <h1>About OpenERP</h1>
1489         <p>
1490             <a target="_blank" href="http://openerp.com/" style="text-decoration: underline;">OpenERP</a> is a free enterprise-scale software system that is designed to boost
1491             productivity and profit through data integration. It connects, improves and
1492             manages business processes in areas such as sales, finance, supply chain,
1493             project management, production, services, CRM, etc...
1494         </p>
1495         <p>
1496             The system is platform-independent, and can be installed on Windows, Mac OS X,
1497             and various Linux and other Unix-based distributions. Its architecture enables
1498             new functionality to be rapidly created, modifications to be made to a
1499             production system and migration to a new version to be straightforward.
1500         </p>
1501         <p>
1502             Depending on your needs, OpenERP is available through a web or application client.
1503         </p>
1504     </div>
1505 </t>
1506 <t t-name="FieldStatus.content">
1507     <ul class="oe-arrow-list">
1508         <t t-set="size" t-value="widget.to_show.length"/>
1509         <t t-foreach="_.range(size)" t-as="i">
1510             <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe-arrow-list-selected' : ''">
1511                 <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>
1512             </li>
1513         </t>
1514     </ul>
1515 </t>
1516 <t t-name="EmptyComponent">
1517     <div></div>
1518 </t>
1519 </templates>