From c8eb6615d4020ddcb9c006f81daebba09923ff68 Mon Sep 17 00:00:00 2001 From: "Laurent Desausoi (lade)" Date: Thu, 21 Apr 2022 09:25:42 +0000 Subject: [PATCH] [FIX] portal: allow portal user to change their contact details A Portal User (PU) cannot edit his contact details once they are logged in. Step to reproduce the issue: - Go to the Contact module - Create a new contact (as an individual) and link him with a company - From the newly created contact, click on Action > Grant Portal Access - Retrieve the registration link of the newly created user by going to Settings > Users & Companies > Users. You will find the new user when removing the default Internal Users filter. - From the Portal main page, go to the contact details and update some field (e.g. the phone number). Upon submission, you will get an error related to the edition of the company_name while no change was done. Solution: In a previous commit [1], a change was done on the `company_name` input. This modification changed the JSON that was sent upon form submission. Indeed, previously the `company_name` field was not sent (thanks to a

) but now this field is sent, causing an error. To mimic the

behavior and keeping the idea of the first change, the attribute "disabled" was used in the input, allowing to not send this field upon form submission. [1]: https://github.com/odoo/odoo/commit/beb50e8047f4dbe148933edd52cceadb2d5cccde opw-2754584 closes odoo/odoo#89740 X-original-commit: d3912aad67e5a519df3b355e962ce9d2e7894133 Signed-off-by: Romain Derie (rde) Signed-off-by: Desausoi Laurent (lade) --- addons/portal/views/portal_templates.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index 8e3e6dfed58..ecaee6ddbac 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -376,17 +376,20 @@

- - + Changing company name is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.
- + + Changing VAT number is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.