Browse Source

[IMP] set iban non required for this localisation

Remove iban number from the required fields and remove the field from
the web form
pull/4/head
houssine 5 years ago
parent
commit
18dce65cdc
  1. 5
      easy_my_coop_ch/models/coop.py
  2. 2
      easy_my_coop_ch/views/subscription_template.xml

5
easy_my_coop_ch/models/coop.py

@ -18,9 +18,14 @@ class subscription_request(models.Model):
req_fields = super(subscription_request, self).get_required_field()
if 'no_registre' in req_fields:
req_fields.remove('no_registre')
if 'iban' in req_fields:
req_fields.remove('iban')
return req_fields
def check_belgian_identification_id(self, nat_register_num):
# deactivate number validation for swiss localization
return True
def check_iban(self, iban):
return True

2
easy_my_coop_ch/views/subscription_template.xml

@ -3,10 +3,12 @@
<data>
<template id="subscription_i18n_ch" inherit_id="easy_my_coop.becomecooperator" name="Removing fields">
<xpath expr="//label[@for='no_registre']/.." position="replace"/>
<xpath expr="//label[@for='iban']/.." position="replace"/>
</template>
<template id="company_subscription_i18n_ch" inherit_id="easy_my_coop.becomecompanycooperator" name="Company Removing fields">
<xpath expr="//label[@for='no_registre']/.." position="replace"/>
<xpath expr="//label[@for='iban']/.." position="replace"/>
</template>
</data>
</odoo>
Loading…
Cancel
Save