Skip to content

Commit

Permalink
Merge pull request #7 from apuestaya/12.0
Browse files Browse the repository at this point in the history
form optimization
  • Loading branch information
dkrimmer84 committed Apr 30, 2020
2 parents 645a1b3 + 3ec23f8 commit 92e1ca8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Empty file modified .DS_Store
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions static/src/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ odoo.define('module.DianInvoice', function(require) {
if(String(company_name)=="")
{
$("select[name='doctype']").val(13);
$("input[name='verificationDigit']").val('');
$("input[name='is_company']").prop( "checked", false );
}
if(String(company_name).length > 0 )
{
$("select[name='doctype']").val(31);
$("input[name='is_company']").prop( "checked", true );
}
}
function update_customer_full_name()
Expand Down
2 changes: 1 addition & 1 deletion views/l10n_co_res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
'city', 'zip', 'street', 'street2', 'state_id', 'country_id',
'vat', 'company_name', 'district_id','mobile','partner_id',
'x_name1','x_name2','x_lastname1','x_lastname2',
'xidentification','xcity', 'doctype', 'verificationDigit', 'pos_name', 'companyBrandName'
'xidentification','xcity', 'doctype', 'verificationDigit', 'pos_name', 'companyBrandName', 'is_company'
]"/>
</function>

Expand Down
5 changes: 3 additions & 2 deletions views/website.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@
</xpath>
<xpath expr="//form[@class='checkout_autoformat']//div//div" position="inside">
<div>
<input type="checkbox" t-att-value="'is_company' in checkout and checkout['is_company']" name="is_company" class="form-control website-is_company hidden-element"></input>
<input type="text" name="name" class="form-control website-name hidden-element" readonly="1" t-att-value="'name' in checkout and checkout['name']" ></input>
<input type="text" name="pos_name" class="form-control website-name hidden-element" readonly="1" t-att-value="'name' in checkout and checkout['name']" ></input>
<input type="text" name="companyBrandName" class="form-control website-name hidden-element" readonly="1" t-att-value="'company_name' in checkout and checkout['company_name']" ></input>
<table class="form-full-width block-names">
<tr>
<td>
<label>Primer Nombre</label>
<input t-att-value="'x_name1' in checkout and checkout['x_name1']" type="text" name="x_name1" placeholder="Richi" class="form-control website-x_name1"/>
<input t-att-value="'x_name1' in checkout and checkout['x_name1']" type="text" name="x_name1" placeholder="Jon" class="form-control website-x_name1"/>
</td>
<td>
<label>Segundo Nombre</label>
<input t-att-value="'x_name2' in checkout and checkout['x_name2']" type="text" name="x_name2" placeholder="Hamilton" class="form-control website-x_name2"/>
<input t-att-value="'x_name2' in checkout and checkout['x_name2']" type="text" name="x_name2" placeholder="Smith" class="form-control website-x_name2"/>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 92e1ca8

Please sign in to comment.