<odoo>
|
|
|
|
<template id="portal_my_details" name="portal my details" inherit_id="portal.portal_my_details">
|
|
<xpath expr="//div[@class='row o_portal_details']" position="replace">
|
|
<div class="row o_portal_details">
|
|
<div class="col-lg-8">
|
|
<div class="row">
|
|
<t t-set="partner_can_edit_vat" t-value="partner.can_edit_vat()"/>
|
|
<div class="col-lg-12">
|
|
<div t-if="error_message" class="alert alert-danger" role="alert">
|
|
<t t-foreach="error_message" t-as="err"><t t-esc="err"/><br /></t>
|
|
</div>
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('name') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="name">Name</label>
|
|
<input type="text" name="name" t-attf-class="form-control #{error.get('name') and 'is-invalid' or ''}" t-att-value="name or partner.name" />
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('email') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="email">Email</label>
|
|
<input type="email" name="email" t-attf-class="form-control #{error.get('email') and 'is-invalid' or ''}" t-att-value="email or partner.email" />
|
|
</div>
|
|
|
|
<div class="clearfix" />
|
|
|
|
<div t-attf-class="form-group #{error.get('phone') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="phone">Phone</label>
|
|
<input type="tel" name="phone" t-attf-class="form-control #{error.get('phone') and 'is-invalid' or ''}" t-att-value="phone or partner.phone" />
|
|
</div>
|
|
|
|
<div class="clearfix" />
|
|
<div t-attf-class="form-group #{error.get('street') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="street">Street</label>
|
|
<input type="text" name="street" t-attf-class="form-control #{error.get('street') and 'is-invalid' or ''}" t-att-value="street or partner.street"/>
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('city') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="city">City</label>
|
|
<input type="text" name="city" t-attf-class="form-control #{error.get('city') and 'is-invalid' or ''}" t-att-value="city or partner.city" />
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('zip') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label label-optional" for="zipcode">Zip / Postal Code</label>
|
|
<input type="text" name="zipcode" t-attf-class="form-control #{error.get('zip') and 'is-invalid' or ''}" t-att-value="zipcode or partner.zip" />
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('country_id') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label" for="country_id">Country</label>
|
|
<select name="country_id" t-attf-class="form-control #{error.get('country_id') and 'is-invalid' or ''}">
|
|
<option value="">Country...</option>
|
|
<t t-foreach="countries or []" t-as="country">
|
|
<option t-att-value="country.id" t-att-selected="country.id == int(country_id) if country_id else country.id == partner.country_id.id">
|
|
<t t-esc="country.name" />
|
|
</option>
|
|
</t>
|
|
</select>
|
|
</div>
|
|
<div t-attf-class="form-group #{error.get('state_id') and 'o_has_error' or ''} col-xl-6">
|
|
<label class="col-form-label label-optional" for="state_id">State / Province</label>
|
|
<select name="state_id" t-attf-class="form-control #{error.get('state_id') and 'is-invalid' or ''}">
|
|
<option value="">select...</option>
|
|
<t t-foreach="states or []" t-as="state">
|
|
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == partner.state_id.id">
|
|
<t t-esc="state.name" />
|
|
</option>
|
|
</t>
|
|
</select>
|
|
</div>
|
|
<input type="hidden" name="redirect" t-att-value="redirect"/>
|
|
</div>
|
|
<div class="clearfix">
|
|
<button type="submit" class="btn btn-primary float-right mb32 ">
|
|
Confirm
|
|
<span class="fa fa-long-arrow-right" />
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<!-- on supprime mfa -->
|
|
<template id="totp_portal_hook" name="TOTP Portal hook" inherit_id="portal.portal_my_security">
|
|
<xpath expr="//section[2]" position="replace">
|
|
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|