diff options
| author | Goffin Simon <sig@odoo.com> | 2019-05-13 12:59:24 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2019-05-13 13:10:43 +0000 |
| commit | 9fe9715e9936952411fcfb1dd5d29fa1fa345f21 (patch) | |
| tree | 1fa87e45313642e80bdaba7e38b870d6c5ef3ab0 /addons/website_profile | |
| parent | 2a7652307e74927c5f9681d16c16d9293e5dbbf1 (diff) | |
[FIX] website_profile: Impossible to edit website profile
Steps to reproduce the bug:
- Create a new profile P with "free signup"
- Log with P
- Go to website profile of P
- Send an email to valide the email of P
- Click on the generated link in the verfification email
- P is able to edit his profile
- Open a new session with P
Bug:
P was not able to edit his profile because the variable "validation_email_done" is
reset to False. Now the karma on the user is checked (inspired from website_profile
in template "email_validation_banner")
opw:1984576
closes odoo/odoo#33335
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/website_profile')
| -rw-r--r-- | addons/website_profile/views/website_profile.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml index 1f0d22e4123..f30170548d7 100644 --- a/addons/website_profile/views/website_profile.xml +++ b/addons/website_profile/views/website_profile.xml @@ -207,7 +207,7 @@ <div class="col-12 col-md-4 col-lg-3"> <div t-attf-class="d-flex align-items-start h-100 #{'justify-content-between' if (request.env.user == user) else 'justify-content-around' }"> <div class="o_wprofile_pict d-inline-block mb-3 mb-md-0" t-attf-style="background-image:url(/web/image/res.users/#{user.id}/image)"/> - <a class="btn btn-primary d-inline-block d-md-none" t-if="request.env.user == user and validation_email_done" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}"> + <a class="btn btn-primary d-inline-block d-md-none" t-if="request.env.user == user and user.karma != 0" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}"> <i class="fa fa-pencil mr-1"/>EDIT </a> </div> @@ -219,7 +219,7 @@ <h1 class="o_card_people_name"> <span t-field="user.name"/><small t-if="user.karma == 0"> (not verified)</small> </h1> - <a class="btn btn-primary d-none d-md-inline-block" t-if="request.env.user == user and validation_email_done or request.env.user._is_admin()" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}"> + <a class="btn btn-primary d-none d-md-inline-block" t-if="request.env.user == user and user.karma != 0 or request.env.user._is_admin()" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}"> <i class="fa fa-pencil mr-2"/>EDIT PROFILE </a> </div> |
