[IMP] hr_timesheet_sheet: improve stat button in timesheet to show Number of hour
[odoo/odoo.git] / addons / website_quote / views / website_quotation.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4   <template id="pricing" name="Price">
5       <section>
6           <h1 class="page-header">Pricing</h1>
7       </section>
8       <section id="quote">
9           <table class="table">
10               <thead>
11                   <tr>
12                       <th>Products</th>
13                       <th>Quantity</th>
14                       <th>Taxes</th>
15                       <th></th>
16                       <th class="text-right">Unit Price</th>
17                       <th class="text-right">Price</th>
18                   </tr>
19               </thead>
20               <tbody>
21                   <tr t-foreach="quotation.order_line" t-as="line">
22                       <td>
23                           <div t-field="line.name"/>
24                       </td>
25                       <td>
26                           <div id="quote_qty">
27                               <span t-field="line.product_uom_qty"/>
28                               <span t-field="line.product_uom"/>
29                           </div>
30                       </td>
31                       <td>
32                           <div t-foreach="line.tax_id" t-as="tax">
33                               <t t-esc="tax.name"/>
34                           </div>
35                       </td>
36                       <td>
37                           <strong t-if="line.discount" class="text-info">
38                               <t t-esc="((line.discount % 1) and '%s' or '%d') % line.discount"/>% discount
39                           </strong>
40                       </td>
41                       <td>
42                           <strong class="text-right">
43                               <div t-field="line.price_unit"
44                                   t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
45                                   t-att-style="line.discount and 'text-decoration: line-through' or ''"
46                                   t-att-class="line.discount and 'text-danger' or ''"/>
47                               <!-- TODO: apply monetary widget formating -->
48                               <div t-if="line.discount">
49                                   <t t-esc="'%.2f' % ((1-line.discount / 100.0) * line.price_unit)"/>
50                               </div>
51                           </strong>
52                       </td>
53                       <td>
54                           <div class="text-right"
55                               t-field="line.price_subtotal"
56                               t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'/>
57                       </td>
58                       <td>
59                           <a t-attf-href="./update_line/#{ line.id }/?order_id=#{ quotation.id }&amp;unlink=True&amp;token=#{ quotation.access_token }" class="mb8 js_update_line_json pull-right hidden-print" t-if="line.option_line_id">
60                               <span class="fa fa-trash-o"></span>
61                           </a>
62                       </td>
63                   </tr>
64                   <tr>
65                       <td></td><td></td><td></td><td></td>
66                       <td class="text-right"><strong>Subtotal:</strong></td>
67                       <td class="text-right">
68                           <strong data-id="total_amount" t-field="quotation.amount_untaxed" t-field-options='{"widget": "monetary","display_currency": "quotation.pricelist_id.currency_id"}'/>
69                       </td>
70                   </tr>
71                   <tr>
72                       <td></td><td></td><td></td><td></td>
73                       <td class="text-right">Taxes:</td>
74                       <td class="text-right">
75                           <span data-id="total_amount" t-field="quotation.amount_tax" t-field-options='{"widget": "monetary","display_currency": "quotation.pricelist_id.currency_id"}'/>
76                       </td>
77                   </tr>
78                   <tr>
79                       <td></td><td></td><td></td><td></td>
80                       <td class="text-right"><strong>Total:</strong></td>
81                       <td class="text-right">
82                           <strong data-id="total_amount" t-field="quotation.amount_total" t-field-options='{"widget": "monetary","display_currency": "quotation.pricelist_id.currency_id"}'/>
83                       </td>
84                   </tr>
85               </tbody>
86           </table>
87       </section>
88       <t t-call="website_quote.quotation_toolbar"/>
89       <section id="terms" class="container" t-if="quotation.note">
90           <h2 class="page-header">Terms &amp; Conditions</h2>
91           <p t-field="quotation.note"/>
92       </section>
93   </template>
94
95   <template id="change_quantity" inherit_id="website_quote.pricing" active="False" customize_show="True" name="Change Quantity">
96       <xpath expr="//div[@id='quote_qty']" position="replace">
97           <div class="input-group">
98               <span class="input-group-addon hidden-print">
99                   <a t-attf-href="./update_line/#{ line.id }/?order_id=#{ quotation.id }&amp;remove=True&amp;token=#{ quotation.access_token }" class="mb8 js_update_line_json">
100                       <span class="fa fa-minus"/>
101                   </a>
102               </span>
103               <input type="text" class="js_quantity form-control" t-att-data-id="line.id" t-att-value="line.product_uom_qty"/>
104               <span class="input-group-addon hidden-print">
105                   <a t-attf-href="./update_line/#{ line.id }/?order_id=#{ quotation.id }&amp;token=#{ quotation.access_token }" class="mb8 js_update_line_json">
106                       <span class="fa fa-plus"/>
107                   </a>
108               </span>
109           </div>
110       </xpath>
111   </template>
112
113   <template id="chatter">
114       <h1 class="page-header hidden-print">History</h1>
115       <ul class="media-list hidden-print" id="comments-list">
116           <t t-foreach="quotation.message_ids" t-as="message">
117               <li class="media" t-if="message.type &lt;&gt; 'comment' or message.subtype_id">
118                   <div class="media-body">
119                       <img class="media-object pull-left" t-attf-src="/website/image/res.partner/{{ message.author_id.id }}/image_small" style="width: 50px; margin-right: 10px;"/>
120                       <div class="media-body">
121                           <h5 class="media-heading">
122                               <span t-field="message.author_id"/> <small>on <span t-field="message.date"/></small>
123                           </h5>
124                           <div t-field="message.body"/>
125                       </div>
126                   </div>
127               </li>
128           </t>
129       </ul>
130   </template>
131
132   <!-- Options:Quotation Chatter: user can reply -->
133   <template id="opt_quotation_chatter_post_complete_comment" name="Allow Comments" customize_show="True" inherit_id="website_quote.chatter">
134       <xpath expr="//h1" position="after">
135           <section class="mb32 css_editable_mode_hidden hidden-print">
136               <form id="comment" t-attf-action="/quote/#{quotation.id}/#{quotation.access_token}/post" method="POST">
137                   <img class="img pull-left img-rounded" t-attf-src="/website/image/res.partner/{{ user_id.partner_id.id }}/image_small" style="width: 50px; margin-right: 10px;"/>
138                   <div class="pull-left mb32" style="width: 75%%">
139                       <textarea rows="4" name="comment" class="form-control" placeholder="Send us a note..."></textarea>
140                       <button type="submit" class="btn btn-primary mt8">Send</button>
141                   </div>
142               </form>
143           </section>
144           <div class="clearfix"/>
145       </xpath>
146   </template>
147
148   <template id="quotation_toolbar">
149       <div class="text-center hidden-print" t-if="quotation.state in ('draft', 'sent', 'waiting_date')">
150           <a class="btn btn-success fa fa-check" data-toggle="modal" data-target="#modelaccept">
151               Accept
152           </a>
153           <a class="btn btn-info fa fa-comment" type="submit" href="#discussion">
154               Feedback
155           </a>
156           <a class="btn btn-danger fa fa-times" data-toggle="modal" data-target="#modeldecline">
157               Reject
158           </a>
159       </div>
160   </template>
161
162   <template id="so_quotation" name="Product Quotation">
163       <t t-call="website.layout">
164         <t t-set="head">
165             <script type="text/javascript" src="/website_quote/static/src/js/website_quotation.js"></script>
166             <script type="text/javascript" src="/website_quote/static/lib/jSignature/jSignature.min.js"></script>
167             <link rel='stylesheet' href='/website_quote/static/src/css/website_quotation.css'/>
168             <t t-raw="head or ''"/>
169         </t>
170         <body data-spy="scroll" data-target=".navspy" data-offset="50">
171             <div class="container">
172               <div class="row mt16">
173                   <div class="col-md-3">
174                       <div class="bs-sidebar">
175                           <div class="text-center hidden-print" t-if="quotation.state in ('draft', 'sent', 'waiting_date')" style="padding: 10px">
176                               <a t-if="order_valid" class="btn btn-primary btn-block fa fa-check" data-toggle="modal" data-target="#modelaccept">
177                                   Accept Order
178                               </a>
179                               <a t-if="not order_valid" href="#discussion" class="btn btn-info btn-block">
180                                   <strong>This offer expired!</strong><br/>
181                                   Contact us for new quote.
182                               </a>
183                               <div class="mt8" t-if="order_valid">
184                                   <a type="submit" href="#discussion">
185                                       Ask Changes
186                                   </a> or 
187                                   <a data-toggle="modal" data-target="#modeldecline">
188                                       Reject
189                                   </a>
190                               </div>
191                           </div>
192                           <hr class="mt0 mb0"/>
193                           <t t-call="website_quote.navigation_menu"/>
194                           <hr class="mt0 mb0"/>
195                           <div t-if="order_valid" class="text-center hidden-print">
196                               <input type="hidden" t-att-value="quotation.validity_date" id="validity_date"/>
197                               <div class="mt8" t-if="days_valid &gt; 0">
198                                   <strong>This offer expires in</strong>
199                                   <div class="fa fa-clock-o fa-2x day_counter mt8 mb16">
200                                       <t t-esc="days_valid"/>
201                                       <t t-if="days_valid &gt; 1">
202                                           days
203                                       </t>
204                                       <t t-if="days_valid &lt;= 1">
205                                           day
206                                       </t>
207                                   </div>
208                               </div>
209
210
211                               <div class="text-center mb16" t-if="quotation.amount_undiscounted &gt; quotation.amount_total">
212                                   <p class="text-muted mb8">Your advantage:</p>
213                                   <strong t-field="quotation.amount_total" 
214                                         t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'/>
215                                   <strong t-field="quotation.amount_undiscounted"
216                                         t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
217                                         style="text-decoration: line-through"
218                                         class="text-danger"/>
219                               </div>
220                          </div>
221                       </div>
222                   </div>
223                   <div class="col-md-9">
224                       <div class="alert alert-success alert-dismissable" t-if="message==1">
225                           <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
226                           Your message has been successfully sent!
227                       </div>
228                       <div class="alert alert-warning alert-dismissable" t-if="message==2">
229                           <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
230                           This quotation has been rejected. <a href="#discussion">Contact us</a> if you want a new one.
231                       </div>
232                       <div class="alert alert-warning alert-dismissable" t-if="message==3">
233                           <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
234                           This order has been validated. Thanks for your trust
235                           and do not hesitate to <a href="#discussion">contact us</a> for
236                           any question.
237                       </div>
238                       <a id="introduction"/>
239                       <h1 class="page-header mt16">
240                           <span t-if="quotation.state in ('draft','sent','cancel')">Your Quotation</span>
241                           <span t-if="quotation.state not in ('draft','sent','cancel')">Your Order</span>
242                           <em t-esc="quotation.name"/>
243                           <small t-field="quotation.state"/>
244                           <div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden">
245                               <a class="btn btn-info hidden-print" t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s&amp;action=%s&amp;view_type=form' % (quotation._name, quotation.id, action)">Update Quote</a>
246                           </div>
247                       </h1>
248
249                       <div class="modal fade" id="modelaccept" role="dialog" aria-hidden="true">
250                         <div class="modal-dialog">
251                           <form id="accept" method="POST" t-attf-action="/quote/accept/#{quotation.id}/?token=#{quotation.access_token}" class="js_accept_json modal-content">
252                             <div class="modal-header">
253                               <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&amp;times;</button>
254                               <h4 class="modal-title">Validate Order</h4>
255                             </div>
256                             <div class="modal-body" id="sign-dialog">
257                               <p>
258                                   I agree that by signing this proposal, I
259                                   accept it on the behalf of <b t-field="quotation.company_id"/>,
260                                   for an amount of 
261                                   <b data-id="total_amount" t-field="quotation.amount_total"
262                                     t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'/>
263                                   with payment terms: <b t-field="quotation.payment_term"/>.
264                               </p>
265                               <div id="signer" class="form-group">
266                                   <label class="control-label" for="name">Your Name:</label>
267                                   <input type="text" name="signer" id="name" class="form-control"/>
268                               </div>
269                             </div>
270                             <div class="modal-footer">
271                                 <button type="submit" t-attf-class="btn btn-primary">Sign Order</button> or
272                                 <button type="button" class="btn btn-link" data-dismiss="modal" style="padding: 0">Cancel</button>
273                             </div>
274                           </form>
275                         </div>
276                       </div>
277
278                       <div class="alert alert-warning alert-dismissable" t-if="quotation.state == 'cancel'">
279                           <button type="button" class="close hidden-print" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
280                           <strong>This quotation has been canceled.</strong> Contact us to get a new quote.
281                       </div>
282
283                       <div class="modal fade" id="modeldecline" role="dialog" aria-hidden="true">
284                         <div class="modal-dialog">
285                           <form id="decline" method="POST" t-attf-action="/quote/#{quotation.id}/#{quotation.access_token}/decline" class="modal-content">
286                             <div class="modal-header">
287                               <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&amp;times;</button>
288                               <h4 class="modal-title">Reject This Quote</h4>
289                             </div>
290                             <div class="modal-body">
291                               <p>
292                                   Tell us why you are refusing this quotation, this will help us improve our services.
293                               </p>
294                               <textarea rows="4" name="decline_message" placeholder="Your feedback....." class="form-control"/>
295                             </div>
296                             <div class="modal-footer">
297                                 <button type="submit" t-att-id="quotation.id" class="btn btn-primary">Reject</button> or
298                                 <button type="button" class="btn btn-link" data-dismiss="modal" style="padding: 0">Cancel</button>
299                             </div>
300                           </form>
301                         </div>
302                       </div>
303
304                       <div class="row mt32">
305                           <div class="col-md-6">
306                               <div class="row">
307                                   <label class="col-sm-4 text-right">Customer:</label>
308                                   <div class="col-sm-8">
309                                       <div t-field="quotation.partner_id"/>
310                                   </div>
311                               </div>
312                               <div class="row">
313                                   <label class="col-sm-4 text-right">Bill To:</label>
314                                   <div class="col-sm-8">
315                                       <div t-field="quotation.partner_invoice_id" t-field-options='{
316                                           "widget": "contact",
317                                           "fields": ["address", "name", "phone", "email"]
318                                           }'/>
319                                   </div>
320                               </div>
321                               <div t-if="quotation.partner_shipping_id.id != quotation.partner_invoice_id.id" class="row">
322                                   <label class="col-sm-4 text-right">Ship To:</label>
323                                   <div class="col-sm-8">
324                                       <div t-field="quotation.partner_shipping_id" t-field-options='{
325                                         "widget": "contact",
326                                         "fields": ["address", "name", "phone"]
327                                         }'/>
328                                   </div>
329                               </div>
330                           </div>
331                           <div class="col-md-6">
332                               <div class="row">
333                                   <label class="col-sm-5 text-right">Your Contact:</label>
334                                   <div class="col-sm-7">
335                                       <div t-field="quotation.user_id" t-field-options='{
336                                           "widget": "contact",
337                                           "fields": ["name", "phone", "email"]
338                                           }'/>
339                                   </div>
340                               </div>
341                               <div class="row">
342                                   <label class="col-sm-5 text-right">Quote Date:</label>
343                                   <div class="col-sm-7">
344                                       <span t-field="quotation.date_order"/>
345                                   </div>
346                                   <div class="clearfix"/>
347                                   <div t-if="quotation.client_order_ref">
348                                       <label class="col-sm-5 text-right">Your Reference:</label>
349                                       <div class="col-sm-7">
350                                           <span t-field="quotation.client_order_ref"/>
351                                       </div>
352                                   </div>
353                               </div>
354                           </div>
355                       </div>
356
357                       <a id="offer"/>
358                       <div t-field="quotation.website_description" class="oe_no_empty"/>
359
360                       <t t-foreach="quotation.order_line" t-as="line">
361                           <a t-att-id="line.id"/>
362                           <div t-field="line.website_description" class="oe_no_empty"/>
363                       </t>
364     
365                       <div class="oe_structure"/>
366
367                       <a id="pricing"/>
368                       <t t-call="website_quote.pricing"/>
369                       
370                       <a id="options"/>
371                       <t t-call="website_quote.optional_products"/>
372
373                       <a id="discussion"/>
374                       <t t-call="website_quote.chatter"/>
375                   </div>
376               </div>
377             </div>
378         </body>
379       </t>
380   </template>
381
382   <template id="navigation_menu">
383     <div class="hidden-print navspy" t-ignore="true" role="complementary">
384         <ul class="nav bs-sidenav" data-id="quote_sidebar">
385             <li><a href="#introduction">Introduction</a></li>
386         </ul>
387     </div>
388   </template>
389
390   <!-- Options:Quotation Signature -->
391   <template id="opt_quotation_signature" name="Ask Signature" customize_show="True" inherit_id="website_quote.so_quotation">
392       <xpath expr="//div[@id='sign-dialog']" position="inside">
393         <div class="panel panel-default mt16 mb0" id="drawsign">
394             <div class="panel-heading">
395                 <div class="pull-right">
396                     <a id="sign_clean" class="btn btn-xs">Clear</a>
397                 </div>
398                 <strong>Draw your signature</strong>
399             </div>
400             <div id="signature" class="panel-body" style="padding: 0"/>
401         </div>
402       </xpath>
403   </template>
404
405   <template id="optional_products">
406     <div class="container mt32" t-if="option">
407         <section>
408             <h1 class="page-header">Options</h1>
409         </section>
410         <section id="options">
411             <table class="table table-hover">
412                 <thead>
413                     <tr>
414                         <th>Products</th>
415                         <th>Description</th>
416                         <th></th>
417                         <th class="text-right">Price</th>
418                     </tr>
419                 </thead>
420                 <tbody>
421                     <tr t-foreach="quotation.options" t-as="option">
422                         <t t-if="not option.line_id">
423                             <td>
424                                 <div t-field="option.product_id.name"/>
425                             </td>
426                             <td>
427                                 <div t-field="option.name"/>
428                             </td>
429                             <td>
430                                 <strong t-if="option.discount" class="text-info">
431                                     <t t-esc="((option.discount % 1) and '%s' or '%d') % option.discount"/>% discount
432                                 </strong>
433                             </td>
434                             <td>
435                                 <strong class="text-right">
436                                     <div t-field="option.price_unit"
437                                     t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
438                                     t-att-style="option.discount and 'text-decoration: line-through' or ''"
439                                     t-att-class="option.discount and 'text-danger' or ''"/>
440                                     <div t-if="option.discount">
441                                         <t t-esc="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)"/>
442                                     </div>
443                                 </strong>
444                             </td>
445                             <td class="pull-right">
446                                 <a t-attf-href="/quote/add_line/#{ option.id }/#{ quotation.id }/#{ quotation.access_token }" class="mb8 hidden-print">
447                                     <span class="fa fa-shopping-cart"/>
448                                 </a>
449                             </td>
450                         </t>
451                     </tr>
452                 </tbody>
453             </table>
454         </section>
455     </div>
456   </template>
457
458   <template id="so_template" name="SO Template">
459     <t t-call="website.layout">
460         <t t-set="head">
461             <script type="text/javascript" src="/website_quote/static/src/js/website_quotation.js"></script>
462             <link rel='stylesheet' href='/website_quote/static/src/css/website_quotation.css'/>
463             <t t-raw="head or ''"/>
464         </t>
465         <body data-spy="scroll" data-target=".navspy" data-offset="50">
466             <div class="container">
467                 <div class="row mt16">
468                     <div class="col-md-3">
469                         <div class="bs-sidebar">
470                             <div class="hidden-print navspy" role="complementary" t-ignore="True">
471                                 <ul class="nav bs-sidenav" data-id="quote_sidebar"/>
472                             </div>
473                         </div>
474                     </div>
475                     <div class="col-md-9">
476                         <div class="alert alert-info alert-dismissable" t-ignore="True">
477                             <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
478                             <p>
479                                 <strong>Template Header:</strong> this content
480                                 will appear on all quotations using this
481                                 template.
482                             </p>
483                             <p class="text-muted">
484                                 Titles with style <i>Heading 1</i> and
485                                 <i>Heading 2</i> will be used to generate the
486                                 table of content automatically.
487                             </p>
488                         </div>
489                         <div id="template_introduction" t-field="template.website_description" class="oe_no_empty"/>
490                         <t t-foreach="template.quote_line" t-as="line">
491                             <div class="alert alert-info alert-dismissable" t-ignore="True">
492                                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
493                                 Product: <strong t-esc="line.product_id.name"/>:
494                                 this content will appear on the quotation only if this
495                                 product is put on the quote.
496                             </div>
497                             <div t-field="line.website_description" class="oe_no_empty"/>
498                         </t>
499                         <t t-foreach="template.options" t-as="option_line">
500                             <div class="alert alert-info alert-dismissable" t-ignore="True">
501                                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
502                                 Optional Product: <strong t-esc="option_line.product_id.name"/>:
503                                 this content will appear on the quotation only if this
504                                 product is used in the quote.
505                             </div>
506                             <div t-field="option_line.website_description" class="oe_no_empty"/>
507                         </t>
508                         <section id="terms" class="container" t-if="template.note">
509                             <h1 class="page-header" t-ignore="True">Terms &amp; Conditions</h1>
510                             <p t-field="template.note"/>
511                         </section>
512                     </div>
513                 </div>
514             </div>
515         </body>
516         </t>
517   </template>
518
519   <template id="website.layout_footer_copyright" inherit_id="website.layout" name="Footer Copyright">
520       <xpath expr="//footer" position="inside">
521           <div class="container mt16 mb8">
522               <div class="pull-right" t-ignore="true" t-if="not editable">
523                   Powered by <a class="label label-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>,
524                   an awesome <a href="http://www.odoo.com/page/crm">Open Source CRM</a>.
525               </div>
526               <div class="pull-left text-muted">
527                   Copyright &amp;copy; <span t-field="res_company.name">Company name</span>
528               </div>
529           </div>
530       </xpath>
531   </template>
532
533
534 </data>
535 </openerp>