Added product snippet for test and added the data-snippet-id in product of resizing...
[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                 </group>
28             </group>
29         </field>
30     </record>
31
32     <record model="ir.ui.view" id="product_pricelist_view">
33         <field name="name">product.pricelist.website.form</field>
34         <field name="model">product.pricelist</field>
35         <field name="inherit_id" ref="product.product_pricelist_view"/>
36         <field name="arch" type="xml">
37             <field name="active" position="after">
38                 <field name="code"/>
39             </field>
40         </field>
41     </record>
42     
43     <!-- Layout add nav and footer -->
44
45     <template id="header_footer" inherit_id="website.layout" name="Custom Footer">
46         <xpath expr="//body/header//ul[@id='top_menu']/li" position="before">
47             <li><a href="/shop/">Shop</a></li>
48             <li>
49                 <a href="/shop/mycart/">
50                     <i class="icon-shopping-cart"></i>
51                     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 ''}"
52                                   t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
53                 </a>
54             </li>
55         </xpath>
56         <xpath expr="//body/footer//ul[@name='products']" position="inside">
57             <li><a href="/shop/">Shop</a></li>
58             <li>
59                 <a href="/shop/mycart/">
60                     <i class="icon-shopping-cart"></i>
61                     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 ''}"
62                                   t-esc="website_sale_order and website_sale_order.get_total_quantity() or ''"/>
63                 </a>
64             </li>
65         </xpath>
66     </template>
67
68     <!-- Page Shop --> 
69
70     <template id="layout" name="Products Layout">
71         <t t-call="website.layout">
72             <t t-set="head">
73                 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
74                 <t t-raw="head or ''"/>
75             </t>
76             <t t-set="title">Shop - <t t-raw="title">Categories</t></t>
77             <div id="wrap">
78               <div class="oe_structure"/>
79               <div class="container oe_website_sale">
80                   <div class="row">
81                       <div class="col-md-12" id="shop_content">
82                           <t t-raw="shop_content" />
83                       </div>
84                   </div>
85               </div>
86             </div>
87         </t>
88     </template>
89     <template id="products_categories" inherit_option_id="website_sale.layout" name="Product Categories">
90         <xpath expr="//div[@id='shop_content']" position="before">
91             <div class="col-md-3">
92                 <ul class="nav nav-pills nav-stacked">
93                     <li t-att-class=" '' if category_id else 'active' " class='active'><a href="/shop/">All Products</a></li>
94                     <t t-foreach="categories" t-as="category">
95                         <t t-call="website_sale.categories_recursive"/>
96                     </t>
97                 </ul>
98             </div>
99         </xpath>
100         <xpath expr="//div[@id='shop_content']" position="attributes">
101             <attribute name="class">col-md-9</attribute>
102         </xpath>
103     </template>
104
105     <!-- List of categories -->
106
107     <template id="categories_recursive">
108         <li t-att-class="category.id == category_id and 'active' or ''">
109             <a t-attf-href="/shop/category/#{ category.id }/" t-field="category.name"></a>
110             <ul t-if="category.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
111                 <t t-foreach="category.child_id" t-as="category">
112                     <t t-call="website_sale.categories_recursive"/>
113                 </t>
114             </ul>
115         </li>
116     </template>
117
118     <!-- Product list --> 
119
120     <template id="products" page="True">
121         <t t-call="website_sale.layout">
122             <t t-set="head">
123                 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
124                 <t t-raw="head or ''"/>
125             </t>
126             <t t-set="title">Product</t>
127             <t t-set="shop_content">
128                 <div class="row">
129                     <div class="col-sm-4">
130                         <t t-call="website.pager">
131                             <t t-set="classname">pull-left</t>
132                         </t>
133                     </div><div class="col-sm-4 pagination text-center">
134                         <a t-if="editable" t-attf-href="/shop/#{ category_id and ('category/%s/' % category_id) or ''}add_product/" class="btn btn-default pull-left">New Product</a>
135                     </div><div class="col-sm-4">
136                         <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right pagination">
137                             <input type="text" name="search" class="search-query col-md-2 form-control" placeholder="Search" t-att-value="search or '' or ''"/>
138                         </form>
139                     </div>
140                 </div>
141
142                 <div class='row'>
143                     <t t-foreach="products" t-as="product">
144                         <div t-attf-class="col-md-#{ product.website_sizex } oe_product text-center oe-height-#{ product.website_sizey }" t-att-data-publish="product.website_published" data-snippet-id="colmd">
145
146                             <div class="oe_product_name">
147                                 <a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}" style="text-decoration: none; display: block;">
148                                     <h5 t-field="product.name"> </h5>
149                                 </a>
150                                 <!-- This should be an option -->
151                                 <small t-field="product.description_sale"></small>
152                             </div>
153                             <img class="img oe_product_image" t-att-src="product.img('image')"/>
154
155                             <div class="oe_product_price">
156                                 <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
157                                     <small class="text-error" style="text-decoration: line-through;">
158                                       <t t-esc="product.product_variant_ids[0].lst_price" /> €
159                                     </small>
160                                 </t>
161                                 <b><t t-esc="product.product_variant_ids[0].price" /> €</b>
162
163                                 <!-- Put this in a separate view --> 
164                                 <a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to basket</a>
165                             </div>
166
167                         </div>
168                     </t>
169                 </div>
170
171
172                 <div class="text-center">
173                     <t t-call="website.pager" />
174                 </div>
175             </t>
176         </t>
177     </template>
178
179     <!-- product --> 
180
181     <template id="product" name="Product">
182         <t t-call="website_sale.layout">
183             <t t-set="title">Product</t>
184             <t t-set="shop_content">
185                 <form t-attf-action="/shop/#{ category_id and ('category/%s/' % category_id) or ''}" method="get" class="pull-right">
186                     <input type="text" name="search" class="search-query col-md-2 form-control" placeholder="Search..." t-att-value="search or '' or ''"/>
187                 </form>
188                 <div class="clearfix"/>
189                 <div id="product_detail">
190                     <t t-call="website.publish"><t t-set="object" t-value="product"/></t>
191                     <h1 t-field="product.name">Product Name</h1>
192                     <a t-if="len(product.product_variant_ids) &lt;= 1" t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success pull-right">Add to basket</a>
193                     <form t-if="len(product.product_variant_ids) > 1" action="./add_cart/" class="pull-right">
194                         <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="product">
195                             <input type="radio" name="product_id" t-att-value="product.id" t-att-checked="product == product.product_variant_ids[0] or None"/>
196                             <t t-esc="product.variants or ''">Standard</t>
197                             <span class="badge" t-if="product.price_extra"><t t-esc="product.price_extra > 0 and '+' or ''"/><t t-esc="product.price_extra"/> €</span>
198                         </label><br/>
199                         <button class="btn btn-sm btn-success">Add to basket</button>
200                     </form>
201                     <div class="pull-right">
202                         <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
203                         <h5 class="text-error" style="text-decoration: line-through;" title="Price without reduction"><t t-field="product.product_variant_ids[0].lst_price" /> €</h5>
204                         <h4><t t-esc="product.product_variant_ids[0].price" /> €</h4>
205                         </t>
206                         <h4 t-if="product.product_variant_ids[0].lst_price == product.product_variant_ids[0].price"><t t-field="product.product_variant_ids[0].lst_price" /> €</h4>
207                     </div>
208                     <img class="media-object img-responsive" t-att-src="product.img('image_medium')"/>
209                     <div t-field="product.website_description"></div>
210                 </div>
211             </t>
212         </t>
213     </template>
214     <template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Recommended Products">
215         <xpath expr="//div[@id='product_detail']" position="inside">
216             <div class="mt32" t-if="product.recommended_products()">
217                 <h3>Customers who have bought this product also bought:</h3>
218                 <div class='row mt16' style="margin-left: 15px !important;">
219                 <t t-foreach="product.recommended_products()" t-as="product">
220                     <div class='col-md-2 thumbnail' style='width: 170px; margin-right: 16px;'>
221                         <a t-attf-href="/shop/product/#{ product.id }/">
222                             <div class='mt16 text-center'>
223                                 <img t-att-src="product.img('image_small')"/>
224                                 <h5 t-field='product.name'></h5>
225                             </div>
226                         </a>
227                     </div>
228                 </t>
229                 </div>
230             </div>
231         </xpath>
232     </template>
233
234     <!-- Page Shop my cart --> 
235
236     <template id="mycart" name="My cart" page="True">
237         <t t-call="website_sale.layout">
238             <t t-set="title">My cart</t>
239             <t t-set="shop_content">
240                 <div class="col-md-12 oe_mycart">
241                     <h1>My Shopping Cart</h1>
242                     <table class='table' id="mycart_products">
243                         <colgroup>
244                             <col width="80"/>
245                             <col/>
246                             <col width="80"/>
247                             <col width="160"/>
248                         </colgroup>
249                         <thead>
250                             <tr>
251                                 <th colspan="2">Product</th>
252                                 <th>Price</th>
253                                 <th>Quantity</th>
254                             </tr>
255                         </thead>
256                         <tbody t-if="not website_sale_order or not website_sale_order.order_line">
257                             <tr><td colspan="4"><h3>Your cart is empty</h3></td></tr>
258                         </tbody>
259                         <tbody t-if="website_sale_order and website_sale_order.order_line">
260                             <t t-foreach="website_sale_order.order_line" t-as="line">
261                                 <tr>
262                                     <td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
263                                     <td t-if="line.product_id.product_tmpl_id">
264                                         <a t-attf-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><img class="img-rounded" t-att-src="line.product_id.img('image_small')"/></a>
265                                     </td>
266                                     <td t-if="line.product_id.product_tmpl_id">
267                                         <a t-attf-href="/shop/product/#{ line.product_id.product_tmpl_id.id }/"><span t-field="line.name"/></a><br/>
268                                         <small t-field="line.product_id.description_sale"/>
269                                     </td>
270                                     <td>
271                                         <t t-if="line.product_id.product_tmpl_id and line.product_id.lst_price != line.price_unit">
272                                         <small class="text-error" style="text-decoration: line-through;"><t t-esc="line.product_id.lst_price" /> €</small>
273                                         </t>
274                                        <span t-field="line.price_unit"></span> €
275                                     </td>
276                                     <td>
277                                         <div class="pull-right">
278                                             <input type="text" class="js_quantity input-sm col-md-5" t-att-data-id="line.id" t-att-value="line.product_uom_qty"/>
279                                             <a t-attf-href="./remove_cart/?order_line_id=#{ line.id }" class="btn btn-default mb8 btn-sm btn-inverse">-</a>
280                                             <a t-attf-href="./add_cart/?order_line_id=#{ line.id }" class="btn btn-default mb8 btn-sm btn-success">+</a>
281                                         </div>
282                                     </td>
283                                 </tr>
284                             </t>
285                         </tbody>
286                     </table>
287                     <table class='table table-hover table-condensed' id="mycart_total">
288                         <colgroup>
289                             <col width="80"/>
290                             <col/>
291                             <col width="80"/>
292                             <col width="160"/>
293                         </colgroup>
294                         <thead>
295                             <tr> <th colspan="3">Subtotal </th>      <th><t t-esc="website_sale_order and website_sale_order.amount_untaxed or 0"/> €</th></tr>
296                             <tr> <th colspan="3">Taxes </th>         <th><t t-esc="website_sale_order and website_sale_order.amount_tax or 0"/> €</th></tr>
297                             <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>
298                         </thead>
299                     </table>
300                     <a t-if="website_sale_order and website_sale_order.order_line" href="/shop/checkout/" class="btn btn-success">Proceed To Payment</a>
301                 </div>
302             </t>
303         </t>
304     </template>
305     <template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in list view">
306         <xpath expr="//table[@id='mycart_products']" position="after">
307             <table t-if="suggested_products" class='table table-hover table-condensed'>
308                 <colgroup>
309                     <col/>
310                     <col width="80"/>
311                     <col width="160"/>
312                 </colgroup>
313                 <thead>
314                     <tr>
315                         <th>Suggested products</th>
316                     </tr>
317                 </thead>
318                 <tbody>
319                     <t t-foreach="suggested_products" t-as="product">
320                         <tr>
321                             <td>
322                                 <a t-attf-href="/shop/product/#{ product.id }/"><span t-field="product.name"/></a><br/>
323                                 <small t-field="product.description_sale"/>
324                             </td>
325                             <td>
326                                <span t-field="product.list_price"></span>€
327                             </td>
328                             <td>
329                                 <div class="pull-right">
330                                     <a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-sm btn-success">+</a>
331                                 </div>
332                             </td>
333                         </tr>
334                     </t>
335                 </tbody>
336             </table>
337         </xpath>
338     </template>
339     <template id="suggested_products_cell" inherit_option_id="website_sale.mycart" name="Suggested Products in card view">
340         <xpath expr="//table[@id='mycart_products']" position="after">
341             <div class="mt16 mb32" t-if="suggested_products">
342                 <h4>Suggested products</h4>
343                 <div class='row mt16'>
344                 <t t-foreach="suggested_products" t-as="product">
345                     <div class='col-md-2 thumbnail'>
346                         <a t-attf-href="/shop/product/#{ product.id }/">
347                             <div class='mt16 text-center'>
348                                 <img t-att-src="product.img('image_small')"/>
349                                 <h5 t-field='product.name'></h5>
350                             </div>
351                         </a>
352                     </div>
353                 </t>
354                 </div>
355             </div>
356         </xpath>
357     </template>
358     <template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code">
359         <xpath expr="//table[@id='mycart_total']" position="after">
360             <form t-if="website_sale_order and website_sale_order.order_line" class="well" action="/shop/mycart/" method="post">
361                 <input name="promo" class='input' type="text" placeholder="Reduction Code..." t-att-value="website_sale_order.pricelist_id.code or ''"/>
362                 <button class="btn">Apply Code</button>
363             </form>
364         </xpath>
365     </template>
366
367
368     <!-- Page confirm my cart -->
369
370     <template id="checkout">
371         <t t-call="website.layout">
372           <t t-set="head">
373               <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
374               <t t-raw="head or ''"/>
375           </t>
376           <t t-set="title">Shop - Checkout</t>
377           <div id="wrap">
378             <div class="container oe_website_sale">
379                 <div class="row">
380                     <div class="col-md-4">
381                         <table class="table table-condensed">
382                             <thead>
383                                 <tr>
384                                     <th>Product</th>
385                                     <th>Price</th>
386                                     <th>Qty.</th>
387                                 </tr>
388                             </thead>
389                             <tbody t-if="website_sale_order.order_line">
390                                 <t t-foreach="website_sale_order.order_line" t-as="line">
391                                     <tr>
392                                         <td><t t-esc="line.name"/></td>
393                                         <td><t t-esc="line.product_uom_qty"/></td>
394                                         <td><t t-esc="line.price_unit"/> €</td>
395                                     </tr>
396                                 </t>
397                             </tbody>
398                             <tfoot>
399                                 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="website_sale_order.amount_untaxed"/> €</td></tr>
400                                 <tr><th>Taxes</th><td></td><td><t t-esc="website_sale_order.amount_tax"/> €</td></tr>
401                                 <tr><th>Total</th><td></td><td><t t-esc="website_sale_order.amount_total"/> €</td></tr>
402                             </tfoot>
403                         </table>
404                     </div>
405                     <form class="col-md-8 form-horizontal" action="/shop/confirm_order/" method="post">
406                         <div class=" row">
407                             <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>
408                             <h3 class="col-md-10">Billing Information</h3>
409                             <div t-attf-class="form-group #{error.get('name') and 'has-error' or ''}">
410                                 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
411                                 <div class="col-lg-4">
412                                     <input type="text" name="name" class="form-control" t-att-value="checkout.get('name', '')"/>
413                                 </div>
414                             </div>
415                             <div t-attf-class="form-group #{ error.get('phone') and 'has-error' or ''}">
416                                 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
417                                 <div class="col-lg-4">
418                                     <input type="tel" name="phone" class="form-control" t-att-value="checkout.get('phone', '')"/>
419                                 </div>
420                             </div>
421                             <div t-attf-class="form-group #{error.get('fax') and 'has-error' or ''}">
422                                 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
423                                 <div class="col-lg-4">
424                                     <input type="tel" name="fax" class="form-control" t-att-value="checkout.get('fax', '')"/>
425                                 </div>
426                             </div>
427                             <div t-attf-class="form-group #{error.get('company') and 'has-error' or ''}">
428                                 <label class="col-lg-3 control-label" for="contact_name">Company</label>
429                                 <div class="col-lg-4">
430                                     <input type="text" name="company" class="form-control" t-att-value="checkout.get('company', '')"/>
431                                 </div>
432                             </div>
433                             <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''}">
434                                 <label class="col-lg-3 control-label" for="contact_name">Email address</label>
435                                 <div class="col-lg-4">
436                                     <input type="email" name="email" class="form-control" t-att-value="checkout.get('email', '')"/>
437                                 </div>
438                             </div>
439                             <div t-attf-class="form-group #{error.get('street') and 'has-error' or ''}">
440                                 <label class="col-lg-3 control-label" for="contact_name">Street</label>
441                                 <div class="col-lg-4">
442                                     <input type="text" name="street" class="form-control" t-att-value="checkout.get('street', '')"/>
443                                 </div>
444                             </div>
445                             <div t-attf-class="form-group #{error.get('city') and 'has-error' or ''}">
446                                 <label class="col-lg-3 control-label" for="contact_name">City</label>
447                                 <div class="col-lg-4">
448                                     <input type="text" name="city" class="form-control" t-att-value="checkout.get('city', '')"/>
449                                 </div>
450                             </div>
451                             <div t-attf-class="form-group #{error.get('state_id') and 'has-error' or ''}">
452                                 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
453                                 <div class="col-lg-4">
454                                     <select name="state_id" class="form-control">
455                                         <option value="">State / Province...</option>
456                                         <t t-foreach="states or []" t-as="state">
457                                             <option t-att-value="state.id" t-att-selected="state.id == checkout.get('state_id')"><t t-esc="state.name"/></option>
458                                         </t>
459                                     </select>
460                                 </div>
461                             </div>
462                             <div t-attf-class="form-group #{error.get('zip') and 'has-error' or ''}">
463                                 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
464                                 <div class="col-lg-4">
465                                     <input type="text" name="zip" class="form-control" t-att-value="checkout.get('zip', '')"/>
466                                 </div>
467                             </div>
468                             <div t-attf-class="form-group #{error.get('country_id') and 'has-error' or ''}">
469                                 <label class="col-lg-3 control-label" for="contact_name">Country</label>
470                                 <div class="col-lg-4">
471                                     <select name="country_id" class="form-control">
472                                         <option value="">Country...</option>
473                                         <t t-foreach="countries or []" t-as="country">
474                                             <option t-att-value="country.id" t-att-selected="country.id == checkout.get('country_id')"><t t-esc="country.name"/></option>
475                                         </t>
476                                     </select>
477                                 </div>
478                             </div>
479                             <div class="form-group checkbox">
480                                 <div class="col-lg-7 col-md-offset-3">
481                                     <label>
482                                         <input t-if="not shipping" type="checkbox" name="shipping_different"/>
483                                         <input t-if="shipping" type="checkbox" name="shipping_different" checked="1"/>
484                                         Ship to different address
485                                     </label>
486                                 </div>
487                             </div>
488                         </div>
489                         <div class="js_shipping row" t-att-style="not shipping and 'display:none' or ''">
490                             <h3 class="col-md-12 oe_shipping">Shipping Information</h3>
491                              <div t-attf-class="form-group #{error.get('shipping_name') and 'has-error' or ''}">
492                                 <label class="col-lg-3 control-label" for="contact_name">Name and firstname</label>
493                                 <div class="col-lg-4">
494                                     <input type="text" name="shipping_name" class="form-control" t-att-value="checkout.get('shipping_name', '')"/>
495                                 </div>
496                             </div>
497                             <div t-attf-class="form-group #{error.get('shipping_phone') and 'has-error' or ''}">
498                                 <label class="col-lg-3 control-label" for="contact_name">Telephone</label>
499                                 <div class="col-lg-4">
500                                     <input type="tel" name="shipping_phone" class="form-control" t-att-value="checkout.get('shipping_phone', '')"/>
501                                 </div>
502                             </div>
503                             <div t-attf-class="form-group #{error.get('shipping_fax') and 'has-error' or ''}">
504                                 <label class="col-lg-3 control-label" for="contact_name">Fax</label>
505                                 <div class="col-lg-4">
506                                     <input type="tel" name="shipping_fax" class="form-control" t-att-value="checkout.get('shipping_fax', '')"/>
507                                 </div>
508                             </div>
509                             <div t-attf-class="form-group #{error.get('shipping_street') and 'has-error' or ''}">
510                                 <label class="col-lg-3 control-label" for="contact_name">Street</label>
511                                 <div class="col-lg-4">
512                                     <input type="text" name="shipping_street" class="form-control" t-att-value="checkout.get('shipping_street', '')"/>
513                                 </div>
514                             </div>
515                             <div t-attf-class="form-group #{error.get('shipping_city') and 'has-error' or ''}">
516                                 <label class="col-lg-3 control-label" for="contact_name">City</label>
517                                 <div class="col-lg-4">
518                                     <input type="text" name="shipping_city" class="form-control" t-att-value="checkout.get('shipping_city', '')"/>
519                                 </div>
520                             </div>
521                             <div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''}">
522                                 <label class="col-lg-3 control-label" for="contact_name">State / Province</label>
523                                 <div class="col-lg-4">
524                                     <select name="shipping_state_id" class="form-control">
525                                         <option value="">State / Province...</option>
526                                         <t t-foreach="states or []" t-as="state">
527                                             <option t-att-value="state.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
528                                         </t>
529                                     </select>
530                                 </div>
531                             </div>
532                             <div t-attf-class="form-group #{error.get('shipping_zip') and 'has-error' or ''}">
533                                 <label class="col-lg-3 control-label" for="contact_name">Zip / Postal Code</label>
534                                 <div class="col-lg-4">
535                                     <input type="text" name="shipping_zip" class="form-control" t-att-value="checkout.get('shipping_zip', '')"/>
536                                 </div>
537                             </div>
538                             <div t-attf-class="form-group #{error.get('shipping_country_id') and 'has-error' or ''}">
539                                 <label class="col-lg-3 control-label" for="contact_name">Country</label>
540                                 <div class="col-lg-4">
541                                     <select name="shipping_country_id" class="form-control">
542                                         <option value="">Country...</option>
543                                         <t t-foreach="countries or []" t-as="country">
544                                             <option t-att-value="country.id" t-att-selected="country.id == checkout.get('shipping_country_id')"><t t-esc="country.name"/></option>
545                                         </t>
546                                     </select>
547                                 </div>
548                             </div>
549                         </div>
550                         <button type="submit" class="btn btn-default">Last stape</button>
551                     </form>
552                 </div>
553             </div>
554           </div>
555         </t>
556     </template>
557
558     <template id="payment">
559         <t t-call="website.layout">
560           <t t-set="head">
561               <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
562               <t t-raw="head or ''"/>
563           </t>
564           <t t-set="title">Shop - Payment</t>
565           <div id="wrap">
566             <div class="container oe_website_sale">
567                 <div class="row">
568                     <div class="col-md-4">
569                         <table class="table table-condensed" t-if="order">
570                             <thead>
571                                 <tr>
572                                     <th>Product</th>
573                                     <th>Price</th>
574                                     <th>Qty.</th>
575                                 </tr>
576                             </thead>
577                             <tbody t-if="website_sale_order.order_line">
578                                 <t t-foreach="website_sale_order.order_line" t-as="line">
579                                     <tr>
580                                         <td><t t-esc="line.name"/></td>
581                                         <td><t t-esc="line.product_uom_qty"/></td>
582                                         <td><t t-esc="line.price_unit"/> €</td>
583                                     </tr>
584                                 </t>
585                             </tbody>
586                             <tfoot>
587                                 <tr><th>Untaxed Amount</th><td></td><td><t t-esc="website_sale_order.amount_untaxed"/> €</td></tr>
588                                 <tr><th>Taxes</th><td></td><td><t t-esc="website_sale_order.amount_tax"/> €</td></tr>
589                                 <tr><th>Total</th><td></td><td><t t-esc="website_sale_order.amount_total"/> €</td></tr>
590                             </tfoot>
591                         </table>
592                     </div>
593                     <div class="col-md-8">
594                         <div class="js_payment row">
595                             <h3 class="col-md-12">Click on your payment method</h3>
596                             <div class="col-md-2">
597                                 <t t-foreach="payments or []" t-as="payment">
598                                     <label>
599                                         <input t-att-value="payment.id" type="radio" name="payment_type"/> <t t-esc="payment.name"/>
600                                     </label>
601                                 </t>
602                             </div>
603                             <t t-foreach="payments or []" t-as="payment">
604                                 <div t-att-data-id="payment.id" t-raw="payment._content" class="hidden col-md-6"/>
605                             </t>
606                             <a href="/shop/payment_validate/" class="hidden btn btn-default">I validate my payment</a>
607                         </div>
608                     </div>
609                 </div>
610             </div>
611           </div>
612         </t>
613     </template>
614  </data>
615 </openerp>