Browse Source

[IMP] add a button to invite to login if the share subscriber has

already an account
pull/1/head
houssine 6 years ago
parent
commit
2fae062591
  1. 2
      easy_my_coop/models/coop.py
  2. 7
      easy_my_coop/view/subscription_template.xml

2
easy_my_coop/models/coop.py

@ -244,7 +244,7 @@ class subscription_request(models.Model):
'city': self.city, 'phone': self.phone, 'email':self.email,
'national_register_number':self.no_registre, 'out_inv_comm_type':'bba',
'out_inv_comm_algorithm':'random', 'country_id': self.country_id.id,
'lang':self.lang, 'birthdate':self.birthdate, 'customer': self.customer}
'lang':self.lang, 'birthdate':self.birthdate, 'customer': self.share_product_id.customer}
return partner_vals
def create_coop_partner(self):

7
easy_my_coop/view/subscription_template.xml

@ -57,7 +57,12 @@
<form action="/subscription/subscribe_share" method="post" class="form-horizontal mt32" enctype="multipart/form-data">
<p style="color:red;"><t t-esc="error_msg"/></p>
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<div t-attf-class="form-group">
<a class='btn btn-primary' t-if="not logged" t-attf-href="/web/login?redirect=#{ request.httprequest.url }">You have already an account?</a>
<br/>
</div>
<div t-attf-class="form-group" style="display: none;">
<label>
<input type="checkbox" t-att-checked="logged" name="logged"/>

Loading…
Cancel
Save