3c0f5580c9d9c12cdcc81215836f82ec5dc8ee54
[odoo/odoo.git] / addons / website_sale / views / website_sale.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5     <record id="product_normal_form_view" model="ir.ui.view">
6         <field name="name">product.normal.form.inherit</field>
7         <field name="model">product.product</field>
8         <field name="inherit_id" ref="product.product_normal_form_view"/>
9         <field name="arch" type="xml">
10             <!-- add state field in header -->
11             <xpath expr="//sheet" position="before">
12                 <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('sale_ok', '=', False)]}">
13                     <p attrs="{'invisible': [('website_published', '=', True)]}">
14                         This product is <b>not available</b> for public user in your ecommerce.
15                     </p>
16                     <p attrs="{'invisible': [('website_published', '=', False)]}">
17                         This product is <b>available</b> for public user in your ecommerce.
18                     </p>
19                     <p>Website view: <field class="oe_inline" name="website_url" widget="url"/></p>
20                 </div>
21             </xpath>
22
23             <group name="sale" position="inside">
24                 <group name="website" string="Website">
25                     <field name="website_published"/>
26                     <field name="suggested_product_ids" widget="many2many_tags"/>
27                     <field name="website_style_ids" widget="many2many_tags"/>
28                 </group>
29             </group>
30         </field>
31     </record>
32
33     <record model="ir.ui.view" id="product_pricelist_view">
34         <field name="name">product.pricelist.website.form</field>
35         <field name="model">product.pricelist</field>
36         <field name="inherit_id" ref="product.product_pricelist_view"/>
37         <field name="arch" type="xml">
38             <field name="active" position="after">
39                 <field name="code"/>
40             </field>
41         </field>
42     </record>
43     
44     <!-- Layout add nav and footer -->
45
46     <template id="header_footer" inherit_id="website.layout" name="Custom Footer">
47         <xpath expr="//header//ul[@id='top_menu']/li" position="before">
48             <li><a t-href="/shop/">Shop</a></li>
49             <li>
50                 <a t-href="/shop/mycart/">
51                     <i class="icon-shopping-cart"></i>
52                     My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
53                                   t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
54                 </a>
55             </li>
56         </xpath>
57         <xpath expr="//footer//ul[@name='products']" position="inside">
58             <li><a t-href="/shop/">Shop</a></li>
59             <li>
60                 <a t-href="/shop/mycart/">
61                     <i class="icon-shopping-cart"></i>
62                     My cart <span t-attf-class="my_cart_quantity badge #{(not website_sale_order or not website_sale_order.get_total_quantity()) and 'hidden' or ''}"
63                                   t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
64                 </a>
65             </li>
66         </xpath>
67     </template>
68     <!-- List of categories -->
69
70     <template id="categories_recursive">
71         <li t-att-class="category.id == category_id and 'active' or ''">
72             <a t-att-class="category.id not in categ[1] and 'unpublish' or ''" t-href="/shop/category/#{ category.id }/" t-field="category.name"></a>
73             <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
74                 <t t-foreach="category.child_id" t-as="category">
75                     <t t-if="category.id in categ[1] or editable">
76                         <t t-call="website_sale.categories_recursive"/>
77                     </t>
78                 </t>
79             </ul>
80         </li>
81     </template>
82
83     <!-- Product list --> 
84
85     <template id="products_cart">
86       <div class="oe_product_description">
87           <a t-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
88               <b t-field="product.name"/>
89           </a>
90           <div class="product_price">
91               <b>
92                   <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
93                     <span class="text-danger" style="text-decoration: line-through;">
94                         <t t-esc="product.product_variant_ids[0].lst_price" /> €
95                     </span>&amp;nbsp;
96                   </t>
97                   <t t-esc="product.product_variant_ids[0].price" /> €
98               </b>
99           </div>
100       </div>
101
102       <div class="oe_product_image text-center">
103           <a t-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
104               <img class="img" t-att-src="product.img('image')"/>
105           </a>
106       </div>
107     </template>
108
109     <template id="products" page="True">
110         <t t-call="website.layout">
111             <t t-set="head">
112                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
113                 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
114                 <t t-raw="head or ''"/>
115             </t>
116             <t t-set="title">Our Products</t>
117             <div id="wrap">
118               <div class="oe_structure"/>
119               <div class="container oe_website_sale">
120                 <div class="row">
121                     <div class="col-sm-4">
122                         <h1>Our Products</h1>
123                     </div><div class="col-sm-4 pagination text-center">
124                         <a t-if="editable" t-href="/shop/#{ category_id and ('category/%s/' % category_id) or ''}add_product/" class="btn btn-default">New Product</a>
125                     </div><div class="col-sm-4">
126                         <form t-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right pagination">
127                             <div class="input-group">
128                                 <span class="input-group-addon"><span class="glyphicon glyphicon-search"/></span>
129                                 <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search or ''"/>
130                             </div>
131                         </form>
132                         <t t-call="website.pager">
133                             <t t-set="classname">pull-left</t>
134                         </t>
135                     </div>
136                 </div>
137
138                 <div class='style_default'>
139                   <div class="col-md-12" id="products_grid">
140                     <table width="100%">
141                       <colgroup>
142                         <col style="width: 1px; margin-right: -1px;" />
143                         <col class="col-md-3" />
144                         <col class="col-md-3" />
145                         <col class="col-md-3" />
146                         <col class="col-md-3" />
147                       </colgroup>
148                       <tbody>
149                         <t t-set="table_products" t-value="get_bin_packing_products(product_ids, product_ids_for_holes, 4)"/>
150                         <tr t-foreach="table_products" t-as="tr_product">
151                           <td class="oe-height-2"></td>
152                           <t t-foreach="tr_product" t-as="td_product">
153                             <t t-if="td_product">
154                             <t t-set="product" t-value="td_product['product']"/>
155                             <td t-att-colspan="td_product['x']"
156                                 t-att-rowspan="td_product['y']"
157                                 t-attf-class="oe_product #{ td_product['class'] }"
158                                 t-att-data-publish="product.website_published and 'on' or 'off'">
159
160                                 <div class="css_options" t-ignore="true">
161                                   <div t-attf-class="dropdown js_options" t-att-data-id="product.id">
162                                     <a class="btn btn-default" t-att-id="'dopprod-%s' % product.id" role="button" data-toggle="dropdown"> Style options <span class="caret"></span></a>
163                                     <ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % product.id">
164                                       <li class='dropdown-submenu'>
165                                         <a tabindex="-1" href="#">Size</a>
166                                         <ul class="dropdown-menu" name="size">
167                                           <li><a href="#">
168                                             <table>
169                                               <tr>
170                                                 <td class="selected"></td>
171                                                 <td t-att-class="product.website_size_x > 1 and 'selected'"></td>
172                                                 <td t-att-class="product.website_size_x > 2 and 'selected'"></td>
173                                                 <td t-att-class="product.website_size_x > 3 and 'selected'"></td>
174                                               </tr>
175                                               <tr>
176                                                 <td t-att-class="product.website_size_y > 1 and 'selected'"></td>
177                                                 <td t-att-class="product.website_size_y > 1 and product.website_size_x > 1 and 'selected'"></td>
178                                                 <td t-att-class="product.website_size_y > 1 and product.website_size_x > 2 and 'selected'"></td>
179                                                 <td t-att-class="product.website_size_y > 1 and product.website_size_x > 3 and 'selected'"></td>
180                                               </tr>
181                                               <tr>
182                                                 <td t-att-class="product.website_size_y > 2 and 'selected'"></td>
183                                                 <td t-att-class="product.website_size_y > 2 and product.website_size_x > 1 and 'selected'"></td>
184                                                 <td t-att-class="product.website_size_y > 2 and product.website_size_x > 2 and 'selected'"></td>
185                                                 <td t-att-class="product.website_size_y > 2 and product.website_size_x > 3 and 'selected'"></td>
186                                               </tr>
187                                               <tr>
188                                                 <td t-att-class="product.website_size_y > 3 and 'selected'"></td>
189                                                 <td t-att-class="product.website_size_y > 3 and product.website_size_x > 1 and 'selected'"></td>
190                                                 <td t-att-class="product.website_size_y > 3 and product.website_size_x > 2 and 'selected'"></td>
191                                                 <td t-att-class="product.website_size_y > 3 and product.website_size_x > 3 and 'selected'"></td>
192                                               </tr>
193                                             </table>
194                                           </a></li>
195                                         </ul>
196                                       </li>
197                                       <li class='dropdown-submenu'>
198                                         <a tabindex="-1" href="#">Styles</a>
199                                         <ul class="dropdown-menu" name="style">
200                                           <t t-foreach="styles" t-as="style">
201                                             <li t-att-class="style.id in [s.id for s in product.website_style_ids] and 'active' or ''"><a href="#" t-att-data-id="style.id" t-att-data-class="style.html_class"><t t-esc="style.name"/></a></li>
202                                           </t>
203                                         </ul>
204                                       </li>
205                                     </ul>
206                                   </div>
207                                 </div>
208
209                                 <t t-call="website_sale.products_cart"/>
210                             </td>
211                             </t>
212                             <td t-if="td_product == None"/>
213                           </t>
214                         </tr>
215                       </tbody>
216                     </table>
217                   </div>
218                 </div>
219                 <div class="text-center">
220                     <t t-call="website.pager" />
221                 </div>
222               </div>
223               <div class="oe_structure mb32"/>
224             </div>
225         </t>
226     </template>
227
228     <!-- Product Description-->
229
230     <template id="product_description" inherit_option_id="website_sale.products_cart" name="Product Description">
231         <xpath expr="//div[@class='product_price']" position="before">
232             <p class="text-muted oe_subdescription">
233                 <span t-field="product.description_sale"/>
234             </p>
235         </xpath>
236     </template>
237
238     <!-- Add to cart button-->
239
240     <template id="add_to_basket" inherit_option_id="website_sale.products_cart" name="Add to Cart">
241         <xpath expr="//div[@class='product_price']" position="inside">
242             <a t-href="./add_cart/?product_id=#{ product.id }">
243                 <span class="icon-shopping-cart"/>
244             </a>
245         </xpath>
246     </template>
247
248     <!-- List view of products -->
249
250     <template id="list_view" inherit_option_id="website_sale.products" name="List View">
251         <xpath expr="//div[@id='products_grid']/table" position="replace">
252           <div class="row">
253             <t t-set="products" t-value="get_products(product_ids)"/>
254             <t t-foreach="products" t-as="product">
255               <div class="col-md-12 oe_list_products oe-height-1">
256                 <t t-call="website_sale.products_cart"/>
257               </div>
258             </t>
259           </div>
260         </xpath>
261     </template>
262
263
264     <!-- product --> 
265
266     <template id="product" name="Product">
267         <t t-call="website.layout">
268             <t t-set="head">
269                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
270             </t>
271             <t t-set="title" t-raw="product.name"/>
272             <div id="wrap">
273
274               <section class="container mt8">
275                 <div class="row">
276                   <div class="col-sm-5">
277                       <ol class="breadcrumb">
278                           <li><a t-href="/shop">Products</a></li>
279                           <li t-if="category"><a t-att-href="'/shop/category/%s' % (category_id,)"><span t-field="category.name"/></a></li>
280                           <li class="active"><span t-field="product.name"></span></li>
281                       </ol>
282                   </div><div class="col-sm-3">
283                       <t t-call="website.publish_management">
284                         <t t-set="object" t-value="product"/>
285                         <li class='dropdown-submenu'>
286                             <a tabindex="-1" href="#">Promote</a>
287                             <ul class="dropdown-menu" name="sequence">
288                                 <li><a href="#" class="js_go_to_top">Push on top</a></li>
289                                 <li><a href="#" class="js_go_to_bottom">Push on bottom</a></li>
290                             </ul>
291                         </li>
292                       </t>
293                   </div><div class="col-sm-3 col-sm-offset-1">
294                       <form t-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right">
295                           <div class="input-group">
296                               <span class="input-group-addon"><span class="glyphicon glyphicon-search"/></span>
297                               <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search or ''"/>
298                           </div>
299                       </form>
300                   </div>
301                 </div>
302               </section>
303
304               <section class="container oe_website_sale mb16" id="product_detail">
305                 <div class="row">
306                   <div class="col-sm-7 col-md-7 col-lg-7">
307                       <img class="img" t-att-src="product.img('image')" style="max-height: 500px"/>
308                   </div><div class="col-sm-5 col-md-5 col-lg-4 col-lg-offset-1">
309                       <h1 t-field="product.name">Product Name</h1>
310
311                       <form t-action="./add_cart/">
312                           <input type="hidden" t-if="len(product.product_variant_ids) &lt;= 1" name="product_id" t-att-value="product.id"/>
313                           <t t-if="len(product.product_variant_ids) &gt; 1">
314                               <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="product">
315                                   <input type="radio" name="product_id" t-att-value="product.id" t-att-checked="product == product.product_variant_ids[0] or None"/>
316                                   <t t-esc="product.variants or ''">Standard</t>
317                                   <span class="badge" t-if="product.price_extra">
318                                       <t t-esc="product.price_extra > 0 and '+' or ''"/><t t-esc="product.price_extra"/> €
319                                   </span>
320                               </label>
321                               <br/>
322                           </t>
323                           <div>
324                               <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
325                               <h5 class="text-danger" style="text-decoration: line-through;" title="Price without reduction"><span t-field="product.product_variant_ids[0].lst_price" /> €</h5>
326                               <h4><t t-esc="product.product_variant_ids[0].price" /> €</h4>
327                               </t>
328                               <h4 t-if="product.product_variant_ids[0].lst_price == product.product_variant_ids[0].price">
329                                   <b><span t-field="product.product_variant_ids[0].lst_price" /> €</b>
330                               </h4>
331                           </div>
332                           <button class="btn btn-primary btn-lg mt8">Add to Cart</button>
333                           <hr t-if="product.description_sale"/>
334                           <p t-field="product.description_sale" class="text-muted"/>
335                           <hr/>
336                           <p class="text-muted">
337                               30-day money-back guarantee<br/>
338                               Free Shipping in U.S.<br/>
339                               Buy now, get in 2 days
340                           </p>
341                       </form>
342                   </div>
343                 </div>
344               </section>
345               <div t-field="product.website_description" class="oe_structure" id="product_full_description"/>
346             </div>
347         </t>
348     </template>
349
350     <template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Recommended Products">
351         <xpath expr="//div[@id='product_full_description']" position="after">
352             <div class="container mt32" t-if="product.recommended_products()">
353                 <h3>Customers who have bought this product also bought:</h3>
354                 <div class='row mt16' style="margin-left: 15px !important;">
355                 <t t-foreach="product.recommended_products()" t-as="product">
356                     <div class='col-md-2 thumbnail' style='width: 170px; margin-right: 16px;'>
357                         <div class='mt16 text-center'>
358                             <img t-att-src="product.img('image_small')"/>
359                             <h5>
360                                 <a t-href="/shop/product/#{ product.id }/"
361                                    style="display: block">
362                                     <span t-field='product.name'
363                                           style="display: block"/>
364                                 </a>
365                             </h5>
366                         </div>
367                     </div>
368                 </t>
369                 </div>
370             </div>
371         </xpath>
372     </template>
373
374     <!-- Page Shop my cart --> 
375
376     <template id="mycart" name="My cart" page="True">
377         <t t-call="website.layout">
378             <t t-set="head">
379                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
380                 <t t-raw="head or ''"/>
381             </t>
382             <t t-set="title">Your Cart</t>
383             <div id="wrap">
384               <div class="container oe_website_sale">
385                 <div class="col-md-12 oe_mycart">
386                     <h1>My Shopping Cart</h1>
387                     <table class='table' id="mycart_products">
388                         <colgroup>
389                             <col width="80"/>
390                             <col/>
391                             <col width="80"/>
392                             <col width="160"/>
393                         </colgroup>
394                         <thead>
395                             <tr>
396                                 <th colspan="2">Product</th>
397                                 <th>Price</th>
398                                 <th>Quantity</th>
399                             </tr>
400                         </thead>
401                         <tbody t-if="not website_sale_order or not website_sale_order.order_line">
402                             <tr><td colspan="4"><h3>Your cart is empty</h3></td></tr>
403                         </tbody>
404                         <tbody t-if="website_sale_order and website_sale_order.order_line">
405                             <t t-foreach="website_sale_order.order_line" t-as="line">
406                                 <tr>
407                                     <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
408                                     <td t-if="line.product_id.product_tmpl_id">
409                                         <a t-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><img class="img-rounded" t-att-src="line.product_id.img('image_small')"/></a>
410                                     </td>
411                                     <td t-if="line.product_id.product_tmpl_id">
412                                         <a t-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><span t-field="line.name"/></a><br/>
413                                         <small t-field="line.product_id.description_sale"/>
414                                     </td>
415                                     <td>
416                                         <t t-if="line.product_id.product_tmpl_id and line.product_id.lst_price != line.price_unit">
417                                         <small class="text-error" style="text-decoration: line-through;"><t t-esc="line.product_id.lst_price" /> €</small>
418                                         </t>
419                                        <span t-field="line.price_unit"></span> €
420                                     </td>
421                                     <td>
422                                         <div class="pull-right">
423                                             <input type="text" class="js_quantity input-sm col-md-5" t-att-data-id="line.id" t-att-value="line.product_uom_qty"/>
424                                             <a t-href="./remove_cart/?order_line_id=#{ line.id }" t-att-data-id="line.id" class="btn btn-default mb8 btn-sm btn-inverse">-</a>
425                                             <a t-href="./add_cart/?order_line_id=#{ line.id }" t-att-data-id="line.id" class="btn btn-default mb8 btn-sm btn-success">+</a>
426                                         </div>
427                                     </td>
428                                 </tr>
429                             </t>
430                         </tbody>
431                     </table>
432                     <table class='table table-hover table-condensed' id="mycart_total">
433                         <colgroup>
434                             <col width="80"/>
435                             <col/>
436                             <col width="80"/>
437                             <col width="160"/>
438                         </colgroup>
439                         <thead>
440                             <tr> <th colspan="3">Subtotal </th>      <th><t t-esc="website_sale_order and website_sale_order.amount_untaxed or 0"/> €</th></tr>
441                             <tr> <th colspan="3">Taxes </th>         <th><t t-esc="website_sale_order and website_sale_order.amount_tax or 0"/> €</th></tr>
442                             <tr> <th colspan="3"><h4>Total</h4></th> <th><h4><t t-esc="website_sale_order and website_sale_order.amount_total or 0"/> €</h4></th></tr>
443                         </thead>
444                     </table>
445                     <a t-if="website_sale_order and website_sale_order.order_line" t-href="/shop/checkout/" class="btn btn-success">Proceed To Payment</a>
446                 </div>
447               </div>
448               <div class="oe_structure"/>
449             </div>
450         </t>
451     </template>
452
453     <!-- Page Shop --> 
454
455     <template id="products_categories" inherit_option_id="website_sale.products" name="Product Categories">
456         <xpath expr="//div[@id='products_grid']" position="before">
457             <div class="col-md-3">
458                 <ul class="nav nav-pills nav-stacked mt16">
459                     <li t-att-class=" '' if category_id else 'active' "><a t-href="/shop/">All Products</a></li>
460                     <t t-set="categ" t-value="get_categories()"/>
461                     <t t-foreach="categ[0]" t-as="category">
462                         <t t-call="website_sale.categories_recursive"/>
463                     </t>
464                 </ul>
465             </div>
466         </xpath>
467         <xpath expr="//div[@id='products_grid']" position="attributes">
468             <attribute name="class">col-md-9</attribute>
469         </xpath>
470     </template>
471
472
473     <template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in list view">
474         <xpath expr="//table[@id='mycart_products']" position="after">
475             <table t-if="suggested_products" class='table table-hover table-condensed'>
476                 <colgroup>
477                     <col/>
478                     <col width="80"/>
479                     <col width="160"/>
480                 </colgroup>
481                 <thead>
482                     <tr>
483                         <th>Suggested products</th>
484                     </tr>
485                 </thead>
486                 <tbody>
487                     <t t-foreach="suggested_products" t-as="product">
488                         <tr>
489                             <td>
490                                 <a t-href="/shop/product/#{ product.id }/"><span t-field="product.name"/></a><br/>
491                                 <small t-field="product.description_sale"/>
492                             </td>
493                             <td>
494                                <span t-field="product.list_price"></span>€
495                             </td>
496                             <td>
497                                 <div class="pull-right">
498                                     <a t-href="./add_cart/?product_id=#{ product.id }" class="btn btn-sm btn-success">+</a>
499                                 </div>
500                             </td>
501                         </tr>
502                     </t>
503                 </tbody>
504             </table>
505         </xpath>
506     </template>
507     <template id="suggested_products_cell" inherit_option_id="website_sale.mycart" name="Suggested Products in card view">
508         <xpath expr="//table[@id='mycart_products']" position="after">
509             <div class="mt16 mb32" t-if="suggested_products">
510                 <h4>Suggested products</h4>
511                 <div class='row mt16'>
512                 <t t-foreach="suggested_products" t-as="product">
513                     <div class='col-md-2 thumbnail'>
514                         <div class='mt16 text-center'>
515                             <a t-href="/shop/product/#{ product.id }/">
516                                 <img t-att-src="product.img('image_small')"/>
517                             </a>
518                             <h5>
519                                 <a t-href="/shop/product/#{ product.id }/" style="display: block;">
520                                     <span t-field="product.name"/>
521                                 </a>
522                             </h5>
523                         </div>
524                     </div>
525                 </t>
526                 </div>
527             </div>
528         </xpath>
529     </template>
530     <template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code">
531         <xpath expr="//table[@id='mycart_total']" position="after">
532             <form t-if="website_sale_order and website_sale_order.order_line" class="well" t-action="/shop/mycart/" method="post">
533                 <input name="promo" class='input' type="text" placeholder="Reduction Code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
534                 <button class="btn">Apply Code</button>
535             </form>
536         </xpath>
537     </template>
538
539
540     <!-- Page confirm my cart -->
541
542     <template id="checkout">
543         <t t-call="website.layout">
544           <t t-set="head">
545               <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
546               <t t-raw="head or ''"/>
547           </t>
548           <t t-set="title">Shop - Checkout</t>
549           <div id="wrap">
550             <div class="container oe_website_sale">
551                 <div class="row">
552                     <div class="col-md-4">
553                         <table class="table table-condensed">
554                             <thead>
555                                 <tr>
556                                     <th>Product</th>
557                                     <th>Price</th>
558                                     <th>Qty.</th>
559                                 </tr>
560                             </thead>
561                             <tbody t-if="website_sale_order.order_line">
562                                 <t t-foreach="website_sale_order.order_line" t-as="line">
563                                     <tr>
564                                         <td><t t-esc="line.name"/></td>
565                                         <td><t t-esc="line.product_uom_qty"/></td>
566                                         <td><t t-esc="line.price_unit"/> €</td>
567                                     </tr>
568                                 </t>
569                             </tbody>
570                             <tfoot>
571                                 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="website_sale_order.amount_untaxed"/> €</td></tr>
572                                 <tr><th>Taxes</th><td></td><td><t t-esc="website_sale_order.amount_tax"/> €</td></tr>
573                                 <tr><th>Total</th><td></td><td><t t-esc="website_sale_order.amount_total"/> €</td></tr>
574                             </tfoot>
575                         </table>
576                     </div>
577                     <form class="col-md-8 form-horizontal" t-action="/shop/confirm_order/" method="post">
578                         <div class=" row">
579                             <a t-if="not partner" t-attf-href="/admin#action=redirect&amp;url=#{ request.httprequest.host_url }/shop/checkout/" class="btn btn-primary">Log me, I have an account</a>
580                             <h3 class="col-md-10">Billing Information</h3>
581                             <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''}">
582                                 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
583                                 <div class="col-lg-4">
584                                     <input type="text" name="name" class="form-control" t-att-value="checkout['name']"/>
585                                 </div>
586                             </div>
587                             <div t-attf-class="form-group #{ error.get('phone') and 'has-error' or ''}">
588                                 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
589                                 <div class="col-lg-4">
590                                     <input type="tel" name="phone" class="form-control" t-att-value="checkout['phone']"/>
591                                 </div>
592                             </div>
593                             <div t-attf-class="form-group #{error.get('fax') and 'has-error' or ''}">
594                                 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
595                                 <div class="col-lg-4">
596                                     <input type="tel" name="fax" class="form-control" t-att-value="checkout['fax']"/>
597                                 </div>
598                             </div>
599                             <div t-attf-class="form-group #{error.get('company') and 'has-error' or ''}">
600                                 <label class="col-lg-3 control-label" for="contact_name">Company</label>
601                                 <div class="col-lg-4">
602                                     <input type="text" name="company" class="form-control" t-att-value="checkout['company']"/>
603                                 </div>
604                             </div>
605                             <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''}">
606                                 <label class="col-lg-3 control-label" for="contact_name">Email address</label>
607                                 <div class="col-lg-4">
608                                     <input type="email" name="email" class="form-control" t-att-value="checkout['email']"/>
609                                 </div>
610                             </div>
611                             <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''}">
612                                 <label class="col-lg-3 control-label" for="contact_name">Street</label>
613                                 <div class="col-lg-4">
614                                     <input type="text" name="street" class="form-control" t-att-value="checkout['street']"/>
615                                 </div>
616                             </div>
617                             <div t-attf-class="form-group #{error.get('city') and 'has-error' or ''}">
618                                 <label class="col-lg-3 control-label" for="contact_name">City</label>
619                                 <div class="col-lg-4">
620                                     <input type="text" name="city" class="form-control" t-att-value="checkout['city']"/>
621                                 </div>
622                             </div>
623                             <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''}">
624                                 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
625                                 <div class="col-lg-4">
626                                     <select name="state_id" class="form-control">
627                                         <option value="">State / Province...</option>
628                                         <t t-foreach="states or []" t-as="state">
629                                             <option t-att-value="state.id" t-att-selected="state.id == checkout['state_id']"><t t-esc="state.name"/></option>
630                                         </t>
631                                     </select>
632                                 </div>
633                             </div>
634                             <div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''}">
635                                 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
636                                 <div class="col-lg-4">
637                                     <input type="text" name="zip" class="form-control" t-att-value="checkout['zip']"/>
638                                 </div>
639                             </div>
640                             <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''}">
641                                 <label class="col-lg-3 control-label" for="contact_name">Country</label>
642                                 <div class="col-lg-4">
643                                     <select name="country_id" class="form-control">
644                                         <option value="">Country...</option>
645                                         <t t-foreach="countries or []" t-as="country">
646                                             <option t-att-value="country.id" t-att-selected="country.id == checkout['country_id']"><t t-esc="country.name"/></option>
647                                         </t>
648                                     </select>
649                                 </div>
650                             </div>
651                             <div class="form-group checkbox">
652                                 <div class="col-lg-7 col-md-offset-3">
653                                     <label>
654                                         <input t-if="not shipping" type="checkbox" name="shipping_different"/>
655                                         <input t-if="shipping" type="checkbox" name="shipping_different" checked="1"/>
656                                         Ship to different address
657                                     </label>
658                                 </div>
659                             </div>
660                         </div>
661                         <div class="js_shipping row" t-att-style="not shipping and 'display:none' or ''">
662                             <h3 class="col-md-12 oe_shipping">Shipping Information</h3>
663                              <div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''}">
664                                 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
665                                 <div class="col-lg-4">
666                                     <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')"/>
667                                 </div>
668                             </div>
669                             <div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''}">
670                                 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
671                                 <div class="col-lg-4">
672                                     <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')"/>
673                                 </div>
674                             </div>
675                             <div t-attf-class="form-group #{error.get('shipping_fax') and 'has-error' or ''}">
676                                 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
677                                 <div class="col-lg-4">
678                                     <input type="tel" name="shipping_fax" class="form-control" t-att-value="checkout.get('shipping_fax', '')"/>
679                                 </div>
680                             </div>
681                             <div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''}">
682                                 <label class="col-lg-3 control-label" for="contact_name">Street</label>
683                                 <div class="col-lg-4">
684                                     <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')"/>
685                                 </div>
686                             </div>
687                             <div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''}">
688                                 <label class="col-lg-3 control-label" for="contact_name">City</label>
689                                 <div class="col-lg-4">
690                                     <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')"/>
691                                 </div>
692                             </div>
693                             <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''}">
694                                 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
695                                 <div class="col-lg-4">
696                                     <select name="shipping_state_id" class="form-control">
697                                         <option value="">State / Province...</option>
698                                         <t t-foreach="states or []" t-as="state">
699                                             <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
700                                         </t>
701                                     </select>
702                                 </div>
703                             </div>
704                             <div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''}">
705                                 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
706                                 <div class="col-lg-4">
707                                     <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')"/>
708                                 </div>
709                             </div>
710                             <div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''}">
711                                 <label class="col-lg-3 control-label" for="contact_name">Country</label>
712                                 <div class="col-lg-4">
713                                     <select name="shipping_country_id" class="form-control">
714                                         <option value="">Country...</option>
715                                         <t t-foreach="countries or []" t-as="country">
716                                             <option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
717                                         </t>
718                                     </select>
719                                 </div>
720                             </div>
721                         </div>
722                         <button type="submit" class="btn btn-default">Confirm</button>
723                     </form>
724                 </div>
725             </div>
726           </div>
727         </t>
728     </template>
729
730     <template id="payment">
731         <t t-call="website.layout">
732           <t t-set="head">
733               <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
734               <t t-raw="head or ''"/>
735           </t>
736           <t t-set="title">Shop - Payment</t>
737           <div id="wrap">
738             <div class="container oe_website_sale">
739                 <div class="row">
740                     <div class="col-md-4">
741                         <table class="table table-condensed" t-if="order">
742                             <thead>
743                                 <tr>
744                                     <th>Product</th>
745                                     <th>Price</th>
746                                     <th>Qty.</th>
747                                 </tr>
748                             </thead>
749                             <tbody t-if="website_sale_order.order_line">
750                                 <t t-foreach="website_sale_order.order_line" t-as="line">
751                                     <tr>
752                                         <td><t t-esc="line.name"/></td>
753                                         <td><t t-esc="line.product_uom_qty"/></td>
754                                         <td><t t-esc="line.price_unit"/> €</td>
755                                     </tr>
756                                 </t>
757                             </tbody>
758                             <tfoot>
759                                 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="website_sale_order.amount_untaxed"/> €</td></tr>
760                                 <tr><th>Taxes</th><td></td><td><t t-esc="website_sale_order.amount_tax"/> €</td></tr>
761                                 <tr><th>Total</th><td></td><td><t t-esc="website_sale_order.amount_total"/> €</td></tr>
762                             </tfoot>
763                         </table>
764                     </div>
765                     <div class="col-md-8">
766                         <div class="js_payment row">
767                             <h3 class="col-md-12">Click on your payment method</h3>
768                             <div class="col-md-2">
769                                 <t t-foreach="payments or []" t-as="payment">
770                                     <label>
771                                         <input t-att-value="payment.id" type="radio" name="payment_type"/> <t t-esc="payment.name"/>
772                                     </label>
773                                 </t>
774                             </div>
775                             <t t-foreach="payments or []" t-as="payment">
776                                 <div t-att-data-id="payment.id" t-raw="payment._content" class="hidden col-md-6"/>
777                             </t>
778                             <a t-href="/shop/payment_validate/" class="hidden btn btn-default">I validate my payment</a>
779                         </div>
780                     </div>
781                 </div>
782             </div>
783           </div>
784         </t>
785     </template>
786  </data>
787 </openerp>