Compare commits
merge into: njeudy:12.0
njeudy:11.0
njeudy:12.0
njeudy:12.0-add-financial-risk
njeudy:12.0-backend_filter
njeudy:12.0-chg-monetary_fields
njeudy:12.0-easy_my_coop-module_category_cooperator_management
njeudy:12.0-emc-rest-connector
njeudy:12.0-emc_loan-o3-add-paid-amount
njeudy:12.0-emc_loan-o6-subscription_end_date
njeudy:12.0-fix-coop-validation
njeudy:12.0-flag-easymycoop-mail-template
njeudy:12.0-loan-improvements
njeudy:12.0-max-amount-per-share
njeudy:12.0-o4-net-interest-rate
njeudy:12.0-openupgrade
njeudy:12.0-small-changes
njeudy:12.0-touch-cooperator-type
njeudy:14.0-MIG-INITIAL
njeudy:9.0
njeudy:9.0-fix_tax_shelter_declaration_exclusion
njeudy:9.0-medor-hide_bank_and_birthdate
njeudy:9.0-tag
njeudy:9.0_remove_national_register_number
njeudy:myceliandre_usability
pull from: njeudy:9.0_remove_national_register_number
njeudy:11.0
njeudy:12.0
njeudy:12.0-add-financial-risk
njeudy:12.0-backend_filter
njeudy:12.0-chg-monetary_fields
njeudy:12.0-easy_my_coop-module_category_cooperator_management
njeudy:12.0-emc-rest-connector
njeudy:12.0-emc_loan-o3-add-paid-amount
njeudy:12.0-emc_loan-o6-subscription_end_date
njeudy:12.0-fix-coop-validation
njeudy:12.0-flag-easymycoop-mail-template
njeudy:12.0-loan-improvements
njeudy:12.0-max-amount-per-share
njeudy:12.0-o4-net-interest-rate
njeudy:12.0-openupgrade
njeudy:12.0-small-changes
njeudy:12.0-touch-cooperator-type
njeudy:14.0-MIG-INITIAL
njeudy:9.0
njeudy:9.0-fix_tax_shelter_declaration_exclusion
njeudy:9.0-medor-hide_bank_and_birthdate
njeudy:9.0-tag
njeudy:9.0_remove_national_register_number
njeudy:myceliandre_usability
39 Commits
12.0
...
9.0_remove
Author | SHA1 | Message | Date |
---|---|---|---|
houssine | 26b0b320e9 |
[IMP] add extract for company fields.
|
5 years ago |
houssine | ebadfd5ad0 |
[FIX] fix gender list
|
5 years ago |
houssine | 498ce40cee |
[IMP] add button signup company or individual
|
5 years ago |
houssine | 39d69aab62 |
[IMP] filling selection fields and signup for company
|
5 years ago |
houssine | ad2b8f377e |
[IMP] put fields on sign on form
|
5 years ago |
houssine | f3d696deda |
[IMP] add firstname and change label for lastname
|
5 years ago |
houssine | b5fdd66be9 |
[IMP] add fields on the create sign on form
|
5 years ago |
Houssine BAKKALI |
cb17a9c51b
|
Merge pull request #6 from coopiteasy/9.0_fix_operation_conversion
9.0 fix operation conversion |
5 years ago |
houssine | 83ec48edfe |
[FIX] company_email doesn't exist on res partner
|
6 years ago |
houssine | 80e58389f1 |
[IMP] remove state dield from there
|
6 years ago |
Houssine BAKKALI |
ac8e7c1e92
|
Merge pull request #5 from coopiteasy/9.0-fix-new_coop_form
[FIX] emc: Error casting str to int |
6 years ago |
houssine | 53aca0ee6e |
[IMP] add check in validate function
|
6 years ago |
Rémy Taymans | 0ef913acae |
[FIX] emc: Error casting str to int
I get this error when taking shares from the website form by a logged user. |
6 years ago |
Rémy Taymans | a5f633b384 |
[FIX] emc: Data policy and internal rules configuration
Configuration for data policy and internal rules was not loaded every time on the form to become new cooperator. |
6 years ago |
Rémy Taymans |
e494befa02
|
Merge pull request #4
[IMP] emc: Data policy and internal rules approval |
6 years ago |
Rémy Taymans | a749c558f9 |
[IMP] emc: Data policy and internal rules approval
This lets the user configure if an approval for data policy and internal rules are needed and/or required. |
6 years ago |
houssine | f2597b3220 |
[PEP8] fix pep8 warning
|
6 years ago |
houssine | 0a3fe10446 |
[FIX] invoice payment information have been moved to another field
|
6 years ago |
houssine | 837ed8deaf |
[IMP] add checkbox already coop on company form
|
6 years ago |
houssine | 032b731e5a |
[FIX] fix checkbox not filled when logged and already coop
|
6 years ago |
Rémy Taymans | 623fef4f08 |
[FIX] emc: Order of approvals checkbox in new cooperator form
This change the order of approvals for data policy and internal rules in the new cooperator form in the website part. This is done to be consistant with the modification added in the beesdoo_easy_my_coop module. |
6 years ago |
Rémy Taymans |
03776220e3
|
Merge pull request #2
[ADD] emc: Require data policy approval |
6 years ago |
Rémy Taymans | 54dcbd82ff |
[ADD] emc: Internal Rules Approved
The new cooperator needs to approve internal rules. |
6 years ago |
Rémy Taymans | 123aabf756 |
[CHG] emc: Remove dependence to website_legal_page
This commit removes the dependence to website_legal_page by using it's own template for showing text aside the checkbox in the form. Because the template for this text is not editable by the user (in fact, it is but each time the module is updated, this template is overwritten). Of course website_legal_page can always be installed, and the new template for the text can contain link to the pages generated by website_legal_page. |
6 years ago |
Rémy Taymans | cdc6d083b6 |
[REF] emc: Duplicate key 'customer'
This remove a duplicate key in a python dictionary. |
6 years ago |
Rémy Taymans | 5911b3e5bc |
[IMP] emc: Complete data_policy_approved processing
Now data_policy is shown on a subscription request and also on a partner. |
6 years ago |
robinkeunen | d7b431a202 |
[IMP] align already cooperator checkbox
|
7 years ago |
robinkeunen | afc28114aa |
[IMP] align send button
|
7 years ago |
robinkeunen | cb4a6ab8be |
[ADD] add website_legal_page and link to legal pages
|
7 years ago |
robinkeunen | 96f0b7f0d6 |
[ADD] require data policy approval
|
7 years ago |
houssine | 91dc06fc4e |
[IMP] take hard coded value from company field
|
6 years ago |
houssine | d909c3d32c |
[FIX] fix wrong field name
|
6 years ago |
houssine | 20dad701d6 |
[IMP] make release capital tree view use the customer invoice view tree
|
6 years ago |
houssine | ee6463c0dc |
[FIX] fix export. removing an old field
|
6 years ago |
houssine | f2478c9312 |
[IMP] make validation on iban only if iban is not empty
|
6 years ago |
houssine | ab62e69d6d |
[IMP] make iban field non required
|
6 years ago |
houssine | 18dce65cdc |
[IMP] set iban non required for this localisation
Remove iban number from the required fields and remove the field from the web form |
6 years ago |
houssine | e7cbc31932 |
[FIX] check no_registre only if it's required for the localisation
|
6 years ago |
houssine | 90969b1fef |
[FIX] fix undeclared variable domain is a special case
|
6 years ago |
19 changed files with 719 additions and 48 deletions
-
5easy_my_coop/__openerp__.py
-
131easy_my_coop/controllers/AuthSignupHome.py
-
1easy_my_coop/controllers/__init__.py
-
29easy_my_coop/controllers/main.py
-
2easy_my_coop/models/account_invoice.py
-
34easy_my_coop/models/company.py
-
41easy_my_coop/models/coop.py
-
12easy_my_coop/models/operation_request.py
-
2easy_my_coop/models/partner.py
-
1easy_my_coop/view/account_invoice_view.xml
-
348easy_my_coop/view/auth_signup_template.xml
-
1easy_my_coop/view/operation_request_view.xml
-
8easy_my_coop/view/res_company_view.xml
-
4easy_my_coop/view/res_partner_view.xml
-
2easy_my_coop/view/subscription_request_view.xml
-
115easy_my_coop/view/subscription_template.xml
-
7easy_my_coop_ch/models/coop.py
-
16easy_my_coop_ch/views/subscription_template.xml
-
8easy_my_coop_export_xlsx/wizard/export_global_wizard.py
@ -0,0 +1,131 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2019 Coop IT Easy (http://www.coopiteasy.be) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
import logging |
|||
from openerp import tools |
|||
from openerp.tools.translate import _ |
|||
|
|||
from openerp import http |
|||
from openerp.http import request |
|||
from openerp.addons.auth_signup.res_users import SignupError |
|||
from openerp.addons.auth_signup.controllers.main import AuthSignupHome |
|||
from openerp.addons.base_iban import base_iban |
|||
from openerp.exceptions import ValidationError |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
FORM_FIELDS = ['login', 'firstname', 'password', 'phone', 'street', |
|||
'city', 'zip_code', 'country_id', 'gender', 'birthdate'] |
|||
|
|||
|
|||
class AuthSignupHome(AuthSignupHome): |
|||
def _signup_with_values(self, token, values): |
|||
user_obj = request.env['res.users'] |
|||
db, login, password = user_obj.sudo().signup(values, token) |
|||
# as authenticate will use its own cursor we need to commit |
|||
# the current transaction |
|||
request.cr.commit() |
|||
uid = request.session.authenticate(db, login, password) |
|||
if not uid: |
|||
raise SignupError(_('Authentication Failed.')) |
|||
return uid |
|||
|
|||
def do_signup(self, qcontext): |
|||
""" Shared helper that creates a res.partner out of a token """ |
|||
bank_obj = request.env['res.partner.bank'] |
|||
lang_obj = request.env['res.lang'] |
|||
|
|||
values = dict((key, qcontext.get(key)) for key in FORM_FIELDS) |
|||
assert any([k for k in values.values()]),"The form was not properly filled in." |
|||
assert values.get('password') == qcontext.get('confirm_password'), "Passwords do not match; please retype them." |
|||
supported_langs = [lang['code'] for lang |
|||
in lang_obj.sudo().search_read([], ['code'])] |
|||
values['lang'] = qcontext.get("lang") |
|||
firstname = qcontext.get("firstname").title() |
|||
lastname = qcontext.get('name').upper() |
|||
values['lastname'] = lastname |
|||
values['name'] = firstname + ' ' + lastname |
|||
values['zip'] = values['zip_code'] |
|||
uid = self._signup_with_values(qcontext.get('token'), values) |
|||
iban = qcontext.get('iban') |
|||
user = request.env['res.users'].sudo().search([('id', '=', uid)]) |
|||
bank_obj.sudo().create({'partner_id': user.partner_id.id, |
|||
'acc_number': iban}) |
|||
request.cr.commit() |
|||
|
|||
@http.route('/web/company_signup', type='http', auth='public', |
|||
website=True) |
|||
def web_auth_company_signup(self, *args, **kw): |
|||
vals = {} |
|||
vals['company'] = True |
|||
return self.web_auth_signup(**vals) |
|||
|
|||
@http.route('/web/individual_signup', type='http', auth='public', |
|||
website=True) |
|||
def web_auth_individua_signup(self, *args, **kw): |
|||
vals = {} |
|||
vals['company'] = False |
|||
return self.web_auth_signup(**vals) |
|||
|
|||
@http.route('/web/signup', type='http', auth='public', website=True) |
|||
def web_auth_signup(self, *args, **kw): |
|||
qcontext = self.get_auth_signup_qcontext() |
|||
users_obj = request.env["res.users"] |
|||
country_obj = request.env['res.country'] |
|||
lang_obj = request.env['res.lang'] |
|||
sub_req_obj = request.env['subscription.request'] |
|||
|
|||
render_template = 'auth_signup.signup' |
|||
if kw.get('company', False): |
|||
render_template = 'easy_my_coop.company_signup' |
|||
qcontext['is_company'] = True |
|||
qcontext['name'] = self.company_name |
|||
qcontext['last_name'] = self.company_name |
|||
qcontext['company_register_number'] = self.company_register_number |
|||
qcontext['email'] = self.company_email |
|||
|
|||
qcontext['out_inv_comm_type'] = 'bba' |
|||
qcontext['cooperator'] = True |
|||
qcontext['out_inv_comm_algorithm'] = 'random' |
|||
|
|||
if qcontext.get("login") != qcontext.get("confirm_email"): |
|||
qcontext["error"] = _("The email address doesn't seem to match" |
|||
" the email confirmation.") |
|||
if qcontext.get("login", False) and not tools.single_email_re.match(qcontext.get("login", "")): |
|||
qcontext["error"] = _("That does not seem to be an email address.") |
|||
if qcontext.get("iban", False): |
|||
try: |
|||
base_iban.validate_iban(qcontext.get("iban")) |
|||
except ValidationError: |
|||
qcontext["error"] = _("Please give a correct IBAN number.") |
|||
if not qcontext.get('token') and not qcontext.get('signup_enabled'): |
|||
raise werkzeug.exceptions.NotFound() |
|||
|
|||
if 'error' not in qcontext and request.httprequest.method == 'POST': |
|||
try: |
|||
self.do_signup(qcontext) |
|||
return super(AuthSignupHome, self).web_login(*args, **kw) |
|||
except (SignupError, AssertionError), e: |
|||
domain = [("login", "=", qcontext.get("login"))] |
|||
if users_obj.sudo().search(domain): |
|||
qcontext["error"] = _("Another user is already registered " |
|||
"using this email address.") |
|||
else: |
|||
_logger.error(e.message) |
|||
qcontext['error'] = _("Could not create a new account.") |
|||
qcontext['langs'] = lang_obj.sudo().search([]) |
|||
qcontext['countries'] = country_obj.sudo().search([]) |
|||
qcontext['country_id'] = '21' |
|||
fields_desc = sub_req_obj.sudo().fields_get(['company_type', 'gender']) |
|||
qcontext['company_types'] = fields_desc['company_type']['selection'] |
|||
qcontext['genders'] = fields_desc['gender']['selection'] |
|||
|
|||
return request.render(render_template, qcontext) |
|||
|
|||
def get_partner_company_vals(self): |
|||
partner_vals = { |
|||
'data_policy_approved': self.data_policy_approved, |
|||
'internal_rules_approved': self.internal_rules_approved |
|||
} |
|||
return partner_vals |
@ -1 +1,2 @@ |
|||
from . import main |
|||
from . import AuthSignupHome |
@ -0,0 +1,348 @@ |
|||
<odoo> |
|||
<data> |
|||
<!--<template id="easy_my_coop_login_layout" inherit_id="web.login_layout" |
|||
name="Login Layout"> <xpath expr="//t[@t-set='head']" position="inside"> |
|||
<script type="text/javascript" src="/easy_my_coop/static/src/js/jquery.inputmask.bundle.js"></script> |
|||
</xpath> </template> --> |
|||
<template id="easy_my_coop_assets_backend" |
|||
inherit_id="web.assets_backend"> |
|||
<xpath expr="." position="inside"> |
|||
<script type="text/javascript" |
|||
src="/easy_my_coop/static/src/js/jquery.inputmask.bundle.js"></script> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<!--<template id="easy_my_coop_assets_common" inherit_id="web.assets_common"> |
|||
<xpath expr="." position="inside"> <script type="text/javascript" src="/easy_my_coop/static/src/js/jquery.inputmask.bundle.js"></script> |
|||
</xpath> </template> --> |
|||
|
|||
<template id="easy_my_coop_signup" |
|||
inherit_id="auth_signup.signup" name="Easy My Coop Sign up login"> |
|||
|
|||
<xpath expr="//t[@t-call='auth_signup.fields']" position="before"> |
|||
<div t-attf-class="form-group"> |
|||
<a class='btn btn-primary' href="/web/company_signup">You are a company? Click here.</a> |
|||
<br/> |
|||
</div> |
|||
</xpath> |
|||
<xpath expr="//t[@t-esc='error']/.." position="replace" /> |
|||
<xpath expr="//input[@name='csrf_token']" position="after"> |
|||
<p class="alert alert-danger" t-if="error"> |
|||
<t t-esc="error" /> |
|||
</p> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="easy_my_coop_auth_fields" |
|||
inherit_id="auth_signup.fields" |
|||
name="Auth Signup/ResetPassword form fields"> |
|||
<xpath expr="//input[@name='name']/.." position="before"> |
|||
<div class="form-group field-login"> |
|||
<label for="confirm_email" class="control-label">Confirm your email</label> |
|||
<input type="text" name="confirm_email" |
|||
t-att-value="confirm_email" id="confirm_email" |
|||
class="form-control" required="required" |
|||
t-att-invisible="'invisible' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="firstname" class="control-label">Your firstname</label> |
|||
<input type="text" name="firstname" t-att-value="firstname" |
|||
id="firstname" class="form-control" placeholder="John" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
</xpath> |
|||
|
|||
<xpath expr="//label[@for='name']" position="replace"> |
|||
<label for="name" class="control-label">Your lastname</label> |
|||
</xpath> |
|||
|
|||
<xpath expr="//input[@name='name']" position="attributes"> |
|||
<attribute name="placeholder">Doe</attribute> |
|||
</xpath> |
|||
|
|||
<xpath expr="//input[@name='name']/.." position="after"> |
|||
<div class="form-group field-name"> |
|||
<label for="gender" class="control-label">Your Gender</label> |
|||
<select name="gender" id="gender" class="form-control" |
|||
required="True" style="width:54%" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<option value=""></option> |
|||
<t t-foreach="genders or []" t-as="type"> |
|||
<option t-att-value="type[0]" |
|||
t-att-selected="type[0] == gender"> |
|||
<t t-esc="type[1]" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label class="control-label" for="birthdate">Birthdate</label> |
|||
<input type="text" data-inputmask="'alias': 'date'" |
|||
class="form-control mandatory-field" name="birthdate" |
|||
required="True" t-attf-value="#{birthdate or ''}" |
|||
placeholder="05/03/1978" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="lang" class="control-label">Your Language</label> |
|||
<select name="lang" id="lang" |
|||
class="form-control" style="width:54%;" required="required" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<option value="">Lang...</option> |
|||
<t t-foreach="langs or []" t-as="langue"> |
|||
<option t-att-value="langue.code" |
|||
t-att-selected="langue.code == lang"> |
|||
<t t-esc="langue.name" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="iban" class="control-label">IBAN number</label> |
|||
<input type="text" name="iban" t-att-value="iban" id="iban" |
|||
class="form-control" placeholder="BE645215965478" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="phone" class="control-label">Your Phone</label> |
|||
<input type="text" name="phone" t-att-value="phone" |
|||
id="phone" class="form-control" placeholder="+325552365" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="street" class="control-label">Your Street and Number</label> |
|||
<input type="text" name="street" t-att-value="street" |
|||
id="street" class="form-control" |
|||
placeholder="Rue de la transition, 63" required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="zip_code" class="control-label">Your Zip Code</label> |
|||
<input type="text" name="zip_code" t-att-value="zip_code" |
|||
id="zip_code" class="form-control" placeholder="1040" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="city" class="control-label">Your City</label> |
|||
<input type="text" name="city" t-att-value="city" id="city" |
|||
class="form-control" placeholder="Bruxelles" required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="country_id" class="control-label">Your Country</label> |
|||
<select name="country_id" id="country_id" |
|||
class="form-control" style="width:54%;" required="required" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<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)"> |
|||
<t t-esc="country.name" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="company_signup" name="Company sign up login"> |
|||
<t t-call="web.login_layout"> |
|||
<div t-attf-class="form-group"> |
|||
<a class='btn btn-primary' href="/web/individual_signup">You are a individual? Click here.</a> |
|||
<br/> |
|||
</div> |
|||
<form class="oe_signup_form" role="form" method="post" |
|||
t-if="not message"> |
|||
<input type="hidden" name="csrf_token" |
|||
t-att-value="request.csrf_token()" /> |
|||
<div t-attf-class="form-group" style="display: none;"> |
|||
<label> |
|||
<input type="checkbox" t-att-value="is_company" |
|||
checked="checked" name="is_company" /> |
|||
Is a company? |
|||
</label> |
|||
</div> |
|||
<p class="alert alert-danger" t-if="error"> |
|||
<t t-esc="error" /> |
|||
</p> |
|||
<div class="form-group field-name"> |
|||
<label for="name" class="control-label">Company Name</label> |
|||
<input type="text" name="company_name" t-att-value="company_name" id="name" |
|||
class="form-control" placeholder="The Universal Cooperative" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" |
|||
t-att-autofocus="'autofocus' if login and not only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="name" class="control-label">Company register number</label> |
|||
<input type="text" name="company_register_number" t-att-value="company_register_number" id="company_register_number" |
|||
class="form-control" placeholder="0647980091" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" |
|||
t-att-autofocus="'autofocus' if login and not only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="name" class="control-label">Company email</label> |
|||
<input type="text" name="company_email" t-att-value="company_email" id="company_email" |
|||
class="form-control" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" |
|||
t-att-autofocus="'autofocus' if login and not only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="iban" class="control-label">IBAN number</label> |
|||
<input type="text" name="iban" t-att-value="iban" id="iban" |
|||
class="form-control" placeholder="BE645215965478" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="phone" class="control-label">Phone</label> |
|||
<input type="text" name="phone" t-att-value="phone" |
|||
id="phone" class="form-control" placeholder="+325552365" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label> |
|||
Main Address |
|||
</label> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="street" class="control-label">Street and Number</label> |
|||
<input type="text" name="street" t-att-value="street" |
|||
id="street" class="form-control" |
|||
placeholder="Rue de la transition, 63" required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="zip_code" class="control-label">Zip Code</label> |
|||
<input type="text" name="zip_code" t-att-value="zip_code" |
|||
id="zip_code" class="form-control" placeholder="1040" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="city" class="control-label">City</label> |
|||
<input type="text" name="city" t-att-value="city" id="city" |
|||
class="form-control" placeholder="Bruxelles" required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-name"> |
|||
<label for="country_id" class="control-label">Country</label> |
|||
<select name="country_id" id="country_id" |
|||
class="form-control" style="width:54%;" required="required" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<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)"> |
|||
<t t-esc="country.name" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
<!-- <br/>--> |
|||
<div class="form-group field-name"> |
|||
<label> |
|||
Contact Person |
|||
</label> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="name" class="control-label">Your Name</label> |
|||
<input type="text" name="name" t-att-value="name" |
|||
id="name" class="form-control" placeholder="Doe" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="firstname" class="control-label">Your firstname</label> |
|||
<input type="text" name="firstname" t-att-value="firstname" |
|||
id="firstname" class="form-control" placeholder="John" |
|||
required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-login"> |
|||
<label for="login" class="control-label">Your Email</label> |
|||
<input type="text" name="login" t-att-value="login" |
|||
id="login" class="form-control" autofocus="autofocus" |
|||
autocapitalize="off" required="required" |
|||
t-att-readonly="'readonly' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-login"> |
|||
<label for="confirm_email" class="control-label">Confirm your email</label> |
|||
<input type="text" name="confirm_email" |
|||
t-att-value="confirm_email" id="confirm_email" |
|||
class="form-control" required="required" |
|||
t-att-invisible="'invisible' if only_passwords else None" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="gender" class="control-label">Gender</label> |
|||
<select name="gender" id="gender" class="form-control" |
|||
required="True" style="width:54%" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<option value=""></option> |
|||
<t t-foreach="genders or []" t-as="type"> |
|||
<option t-att-value="type[0]" |
|||
t-att-selected="type[0] == gender"> |
|||
<t t-esc="type[1]" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label class="control-label" for="birthdate">Birthdate</label> |
|||
<input type="text" data-inputmask="'alias': 'date'" |
|||
class="form-control mandatory-field" name="birthdate" |
|||
required="True" t-attf-value="#{birthdate or ''}" |
|||
placeholder="05/03/1978" /> |
|||
</div> |
|||
<div class="form-group field-name"> |
|||
<label for="lang" class="control-label">Your Language</label> |
|||
<select name="lang" id="lang" |
|||
class="form-control" style="width:54%;" required="required" |
|||
t-att-disabled="'disabled' if only_passwords else None"> |
|||
<option value="">Lang...</option> |
|||
<t t-foreach="langs or []" t-as="langue"> |
|||
<option t-att-value="langue.code" |
|||
t-att-selected="langue.code == lang"> |
|||
<t t-esc="langue.name" /> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
</div> |
|||
<div class="form-group field-password"> |
|||
<label for="password" class="control-label">Password</label> |
|||
<input type="password" name="password" id="password" |
|||
class="form-control" required="required" |
|||
t-att-autofocus="'autofocus' if only_passwords else None" /> |
|||
</div> |
|||
|
|||
<div class="form-group field-confirm_password"> |
|||
<label for="confirm_password" class="control-label">Confirm Password</label> |
|||
<input type="password" name="confirm_password" |
|||
id="confirm_password" class="form-control" required="required" /> |
|||
</div> |
|||
|
|||
<input type="hidden" name="redirect" t-att-value="redirect" /> |
|||
<input type="hidden" name="token" t-att-value="token" /> |
|||
<div class="clearfix oe_login_buttons"> |
|||
<a t-attf-href="/web/login?{{ keep_query() }}" |
|||
class="btn btn-link pull-right">Back to Login</a> |
|||
<button type="submit" class="btn btn-primary pull-left">Sign up</button> |
|||
</div> |
|||
</form> |
|||
</t> |
|||
</template> |
|||
</data> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue