Skip to content
Snippets Groups Projects
Commit 009b632c authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] portal: Portal user not able to update their details


Steps to reproduce the bug:

- Create a portal user U
- Try to update the details of U from portal

Bug:

A server error was raised because the country_id was set as a character.

opw:2082450

closes odoo/odoo#38795

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 4ffc517d
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,7 @@ class CustomerPortal(Controller):
if not error:
values = {key: post[key] for key in self.MANDATORY_BILLING_FIELDS}
values.update({key: post[key] for key in self.OPTIONAL_BILLING_FIELDS if key in post})
values.update({'country_id': int(values.pop('country_id', 0))})
values.update({'zip': values.pop('zipcode', '')})
if values.get('state_id') == '':
values.update({'state_id': False})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment