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