Skip to content
Snippets Groups Projects
user avatar
Jinjiu Liu authored
Reproduction:
1. Install Event, Sales, Website, Contacts
2. Login as Admin, create a new portal user 123, set the password as 123
3. Go to Contacts, find the created user, add a shipping address, leave
the name blank
4. Open another tab login as the portal user, place an order
5. At the Address step, Edit the billing address, change the name from
empty to “Test Name”, click next
5. An error is thrown cause the new name is not equal to empty value

Fix: this fix aimed the conditions we have in the previous PR: https://github.com/odoo/odoo/pull/111708
This change will allow the user to add a name for shipping address at
checkout.Without the fix, if you
change the name of a shipping address, it won’t be able to get through.
This is because of how we manage the shipping address, e.g. shipping
address is managed as child partners. For shipping address, the check
can_edit_vat is always false. See here: https://github.com/odoo/odoo/blob/14.0/addons/portal/models/res_partner.py
Another check, e.g. if shipping is being edited, is added to make sure
name/email can be changed for delivery address. For internal user, the
editing of shipping address is not blocked because of the `share` check.
But the same condition is used to ensure the consistency in case we
change how the shipping address is managed in the future.

Note: if the data is '' for name for example, the pre-process will
convert it to `False`. Thus the edge case that `'' != False` doen't
exist anymore

Related PR: https://github.com/odoo/odoo/pull/111708



opw-3126325

closes odoo/odoo#128146

Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
38ca3917
History

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials