Skip to content

Commit

Permalink
[UPD] team_id field mandatory in res.partner and registration forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphan Sainléger authored and njeudy committed Mar 30, 2022
1 parent 6b71f65 commit d633d21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lcc_members/views/res_partner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<field name="member_type_id" string="Subscription type" attrs="{'invisible': [('contact_type','=','attached')]}" />
<field name="currency_exchange_office" attrs="{'invisible': [('is_company', '=', False)]}" />
<field name="is_volunteer" attrs="{'invisible': ['|',('is_company','=', True),('is_position_profile','=',True)]}" />
<field name="team_id" string="Local group" options="{'limit': 16, 'create': false, 'create_edit': false}" attrs="{'invisible': [('contact_type','=','attached')]}" />
<field name="team_id" string="Local group" required="True" options="{'limit': 16, 'create': false, 'create_edit': false}" attrs="{'invisible': [('contact_type','=','attached')]}" />
<field name="user_id" string="Referent" attrs="{'invisible': [('contact_type','=','attached')]}" />
<field name="ref" string="Subcription number" attrs="{'invisible': [('contact_type','=','attached')]}" />
<field name="want_newsletter_subscription" readonly="1" />
Expand Down
3 changes: 2 additions & 1 deletion lcc_members_portal/views/portal_oganization_registration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@
<div class="row">
<div t-attf-class="form-group #{error.get('team_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="team_id">Local group</label>
<select name="team_id" t-attf-class="form-control">
<label class="text-danger"> *</label>
<select name="team_id" t-attf-class="form-control" required="True">
<option value="">Local group...</option>
<t t-foreach="teams or []" t-as="team">
<option t-att-value="team.id">
Expand Down
3 changes: 2 additions & 1 deletion lcc_members_portal/views/portal_private_registration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
<div class="row">
<div t-attf-class="form-group #{error.get('team_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="team_id">Local group</label>
<select name="team_id" t-attf-class="form-control">
<label class="text-danger"> *</label>
<select name="team_id" t-attf-class="form-control" required="True">
<option value="">Local group...</option>
<t t-foreach="teams or []" t-as="team">
<option t-att-value="team.id" t-att-selected="team.id == int(team_id) if team_id else team.id == partner.team_id.id">
Expand Down

0 comments on commit d633d21

Please sign in to comment.