|
|
@ -1,6 +1,8 @@ |
|
|
|
<?xml version="1.0"?> |
|
|
|
<openerp> |
|
|
|
<data> |
|
|
|
|
|
|
|
<!-- Add Firstname and Lastname to billing address --> |
|
|
|
<template id="checkout" inherit_id="website_sale.checkout"> |
|
|
|
<xpath expr="//input[@name='name']/parent::div" position="replace"> |
|
|
|
<div t-attf-class="form-group #{error.get('firstname') and 'has-error' or ''} col-lg-6"> |
|
|
@ -13,16 +15,25 @@ |
|
|
|
</div> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<!-- Add Firstname and Lastname to shipping address --> |
|
|
|
<xpath expr="//input[@name='shipping_name']/parent::div" position="replace"> |
|
|
|
<div t-attf-class="form-group #{error.get('shipping_firstname') and 'has-error' or ''} col-lg-6"> |
|
|
|
<label class="control-label" for="shipping_firstname">First Name</label> |
|
|
|
<input type="text" name="shipping_firstname" class="form-control" t-att-value="checkout.get('shipping_firstname')"/> |
|
|
|
<input type="text" name="shipping_firstname" class="form-control" t-att-value="checkout.get('shipping_firstname')" t-att-readonly="'readonly' if shipping_id >= 0 else ''"/> |
|
|
|
</div> |
|
|
|
<div t-attf-class="form-group #{error.get('shipping_lastname') and 'has-error' or ''} col-lg-6"> |
|
|
|
<label class="control-label" for="shipping_lastname">Last Name</label> |
|
|
|
<input type="text" name="shipping_lastname" class="form-control" t-att-value="checkout.get('shipping_lastname')"/> |
|
|
|
<input type="text" name="shipping_lastname" class="form-control" t-att-readonly="'readonly' if shipping_id >= 0 else ''" t-att-value="checkout.get('shipping_lastname')"/> |
|
|
|
</div> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<!-- Add Firstname and Lastname data tags to options so frontend onchange picks up values --> |
|
|
|
<xpath expr="//select[@name='shipping_id']//option[@t-att-value='shipping.id']" position="attributes"> |
|
|
|
<attribute name="t-att-data-shipping_firstname">shipping.firstname</attribute> |
|
|
|
<attribute name="t-att-data-shipping_lastname">shipping.lastname</attribute> |
|
|
|
</xpath> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
</data> |
|
|
|
</openerp> |