[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#38924 X-original-commit: 009b632c552822cb9892a2ccdbe9d79947d88a34 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user