Browse Source

Merge pull request #18 from coopiteasy/9.0_fix_confirmation_email

9.0 fix confirmation email
pull/19/head
Houssine BAKKALI 5 years ago
committed by GitHub
parent
commit
4ddc8aa933
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      easy_my_coop/controllers/main.py
  2. 10
      easy_my_coop/view/product_view.xml
  3. 4
      easy_my_coop/view/subscription_template.xml

2
easy_my_coop/controllers/main.py

@ -275,7 +275,7 @@ class WebsiteSubscription(http.Controller):
max_amount = max_amount - partner.total_value max_amount = max_amount - partner.total_value
if company.unmix_share_type: if company.unmix_share_type:
share = self.get_selected_share(kwargs) share = self.get_selected_share(kwargs)
if partner.cooperator_type != share.short_name:
if partner.cooperator_type != share.default_code:
values = self.fill_values(values, is_company, logged) values = self.fill_values(values, is_company, logged)
values["error_msg"] = (_("You can't subscribe two " values["error_msg"] = (_("You can't subscribe two "
"different types of share")) "different types of share"))

10
easy_my_coop/view/product_view.xml

@ -36,6 +36,16 @@
</field> </field>
</record> </record>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<field name="default_code" position="attributes">
<attribute name="attrs">{'required': [('is_share', '=', True)]}</attribute>
</field>
</field>
</record>
<record id="share_product_action" model="ir.actions.act_window"> <record id="share_product_action" model="ir.actions.act_window">
<field name="name">Share type</field> <field name="name">Share type</field>

4
easy_my_coop/view/subscription_template.xml

@ -86,11 +86,11 @@
</div> </div>
</div> </div>
<div name="confirm_email_container" t-attf-class="form-group #{error and 'email_from' in error and 'has-error' or ''}">
<div t-if="not logged" name="confirm_email_container" t-attf-class="form-group #{error and 'email_from' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" for="confirm_email">Confirm Email</label> <label class="col-md-3 col-sm-4 control-label" for="confirm_email">Confirm Email</label>
<div class="col-md-7 col-sm-8 bottom-line" style="padding-bottom:20px"> <div class="col-md-7 col-sm-8 bottom-line" style="padding-bottom:20px">
<input type="confirm_email" class="form-control mandatory-field" name="confirm_email" <input type="confirm_email" class="form-control mandatory-field" name="confirm_email"
required="required" t-att-readonly="logged"
t-att-required="not logged" t-att-readonly="logged"
t-attf-value="#{confirm_email or ''}" placeholder="didier.bourdon@bees-coop.be"/> t-attf-value="#{confirm_email or ''}" placeholder="didier.bourdon@bees-coop.be"/>
</div> </div>
</div> </div>

Loading…
Cancel
Save