[IMP] website_sale: use street 2 to set company_name
bzr revid: chm@openerp.com-20140428134632-v3w7imtz7j3u3tp0
This commit is contained in:
parent
36fc910e48
commit
1199b60d70
|
@ -308,7 +308,7 @@ class website_sale(http.Controller):
|
|||
return values
|
||||
|
||||
mandatory_billing_fields = ["name", "phone", "email", "street", "city", "country_id", "zip"]
|
||||
optional_billing_fields = ["company_name", "state_id"]
|
||||
optional_billing_fields = ["street2", "state_id"]
|
||||
mandatory_shipping_fields = ["name", "phone", "street", "city", "country_id", "zip"]
|
||||
optional_shipping_fields = ["state_id"]
|
||||
|
||||
|
@ -330,9 +330,9 @@ class website_sale(http.Controller):
|
|||
for field_name in all_fields if data.get(prefix + field_name))
|
||||
else:
|
||||
query = dict((prefix + field_name, getattr(data, field_name))
|
||||
for field_name in all_fields if field_name != "company_name" and getattr(data, field_name))
|
||||
for field_name in all_fields if field_name != "street2" and getattr(data, field_name))
|
||||
if data.parent_id:
|
||||
query[prefix + 'company_name'] = data.parent_id.name
|
||||
query[prefix + 'street2'] = data.parent_id.name
|
||||
|
||||
if query.get(prefix + 'state_id'):
|
||||
query[prefix + 'state_id'] = int(query[prefix + 'state_id'])
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import product
|
||||
import res_config
|
||||
import sale_order
|
||||
import res_partner
|
||||
|
|
|
@ -696,9 +696,9 @@
|
|||
<label class="control-label" for="contact_name">Your Name</label>
|
||||
<input type="text" name="name" class="form-control" t-att-value="checkout.get('name')"/>
|
||||
</div>
|
||||
<div t-attf-class="form-group #{error.get('company_name') and 'has-error' or ''} col-lg-6">
|
||||
<label class="control-label" for="company_name" style="font-weight: normal">Your Company</label>
|
||||
<input type="text" name="company_name" class="form-control" t-att-value="checkout.get('company_name')"/>
|
||||
<div t-attf-class="form-group #{error.get('street2') and 'has-error' or ''} col-lg-6">
|
||||
<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 t-attf-class="form-group #{error.get('email') and 'has-error' or ''} col-lg-6">
|
||||
<label class="control-label" for="contact_name">Email</label>
|
||||
|
@ -1008,7 +1008,7 @@
|
|||
<table class='pull-right mb16' id="cart_total" t-if="website_sale_order">
|
||||
<thead>
|
||||
<tr width="100" style="border-top: 1px solid #000" id="order_total">
|
||||
<th><h3>Total:</h3></th>
|
||||
<th><h3>Total: </h3></th>
|
||||
<th class="text-right">
|
||||
<h3><span t-field="website_sale_order.amount_total" t-field-options='{
|
||||
"widget": "monetary",
|
||||
|
|
|
@ -38,17 +38,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_form_view" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="parent_id" position="after">
|
||||
<field name="company_name" placeholder="Company Name" attrs="{'invisible': [('company_name','=', '')]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_pricelist_view">
|
||||
<field name="name">product.pricelist.website.form</field>
|
||||
<field name="model">product.pricelist</field>
|
||||
|
|
Loading…
Reference in New Issue