Files
odoo_source/addons
61a7328c2f [FIX] website_sale: block employees from updating their billing address
Reproduction:
1. Install Event, Sales, Webiste
2. Login as Admin, go to Website -> Go to website -> Events
3. Click the Open wood event, Register, buy one VIP ticket
4. In Address step, Edit the billing address, change the name to “Test
Name”, click next
5. The user name “Mitchell Admin” is changed to  “Test Name”, we
shouldn’t be able to change the info

Reason: In the fix to block name change here: https://github.com/odoo/odoo/commit/d823033ad67702b1b92d27a3f66c7a4ec304c644
we use the can_edit_vat to check if we have existing invoice(s) or
SO(s). However, we should block the route that an employee changes the
billing address when placing an order. If they are placing an order for
external people, it should be done from the back end.

Fix: add an extra error case when it's an employee trying to change the
name or email address when editing billing address. This is the case
when an employee tries to order for external people. They should do it
from the back end. They can still buy for themselves without changing
the billing address. Also added translation in pot. Edited the test for
editing address of log in user, added tests for portal user. Reformat
the invoice exsits check for name change to have better readability

The adding of can_edit_vat:
https://github.com/odoo/odoo/commit/f8b05f52f5ea7f31135f700b0e240ff563204085

Related fix to block the name change:
https://github.com/odoo/odoo/commit/d823033ad67702b1b92d27a3f66c7a4ec304c644

A patch to not block the checkout process when name is not set:
https://github.com/odoo/odoo/commit/781dbeaccac76a6ec4f4b8cac1b607810697e394

opw-3126325

closes odoo/odoo#126261

X-original-commit: 972c55bf76f4c5f1b1bedec4a77ddaeac8be1483
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-06-23 18:00:27 +02:00
..
2023-06-23 17:59:57 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00
2023-05-11 10:40:53 +02:00
2023-05-11 10:40:55 +02:00
2023-06-08 21:52:44 +02:00
2023-06-23 18:00:05 +02:00
2023-06-23 18:00:05 +02:00
2023-06-23 18:00:05 +02:00
2023-06-23 18:00:05 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00
2023-06-12 22:39:26 +02:00