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