[FIX] website_portal: modify user details should inherit from portal
before this commit, when a portal user edited its details, the State field was not updated on change of country_id This was because a CSS class was missing. We make the details template calling portal_layout as it should to get every resource we need in the rendering of details OPW 767041 Closes #18984
This commit is contained in:
@@ -69,11 +69,13 @@ class website_account(http.Controller):
|
||||
|
||||
@http.route(['/my/account'], type='http', auth='user', website=True)
|
||||
def details(self, redirect=None, **post):
|
||||
values = self._prepare_portal_layout_values()
|
||||
partner = request.env.user.partner_id
|
||||
values = {
|
||||
values.update({
|
||||
'error': {},
|
||||
'error_message': []
|
||||
}
|
||||
'error_message': [],
|
||||
'hide_current_user': True,
|
||||
})
|
||||
|
||||
if post:
|
||||
error, error_message = self.details_form_validate(post)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<div class="o_my_contact" t-if="sales_rep">
|
||||
<t t-call="website_portal.contact"/>
|
||||
</div>
|
||||
<div class="o_my_details">
|
||||
<div class="o_my_details" t-if="not hide_current_user and user">
|
||||
<h3 class="page-header">Your Details <a href="/my/account" class="btn btn-default btn-xs">Change</a></h3>
|
||||
<div t-field="user.partner_id" t-options='{"widget": "contact", "fields": ["email", "phone", "address", "name"]}'/>
|
||||
</div>
|
||||
@@ -167,18 +167,10 @@
|
||||
</template>
|
||||
|
||||
<template id="details">
|
||||
<t t-call="website.layout">
|
||||
<t t-call="website_portal.portal_layout">
|
||||
<t t-set="additional_title">Contact Details</t>
|
||||
<div id="wrap">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb mt8">
|
||||
<li><a href="/my/home"><i class="fa fa-home"/></a></li>
|
||||
<li>Details</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Contact Details</h1>
|
||||
<form action="/my/account" method="post">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
Reference in New Issue
Block a user