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