[IMP] website_sale: add vat field on checkout
authorChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 10:05:41 +0000 (12:05 +0200)
committerChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 10:05:41 +0000 (12:05 +0200)
addons/website_sale/controllers/main.py
addons/website_sale/views/templates.xml

index ff4761a..2090011 100644 (file)
@@ -310,7 +310,7 @@ class website_sale(http.Controller):
         return values
 
     mandatory_billing_fields = ["name", "phone", "email", "street", "city", "country_id", "zip"]
-    optional_billing_fields = ["street2", "state_id"]
+    optional_billing_fields = ["street2", "state_id", "vat"]
     mandatory_shipping_fields = ["name", "phone", "street", "city", "country_id", "zip"]
     optional_shipping_fields = ["state_id"]
 
index 495e540..95eb089 100644 (file)
                       <label class="control-label" for="street2" style="font-weight: normal">Company Name</label>
                       <input type="text" name="street2" class="form-control" t-att-value="checkout.get('street2')"/>
                   </div>
+                  <div class="col-lg-6"> </div>
+                  <div t-attf-class="form-group #{error.get('vat') and 'has-error' or ''} col-lg-6">
+                      <label class="control-label" for="vat" style="font-weight: normal">VAT Number</label>
+                      <input type="text" name="vat" class="form-control" t-att-value="checkout.get('vat')"/>
+                  </div>
                   <div t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
                       <label class="control-label" for="contact_name">Email</label>
                       <input type="email" name="email" class="form-control" t-att-value="checkout.get('email')"/>