Skip to content
Snippets Groups Projects
Commit 01c34a51 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] website, website_sale: correctly set company_id on address


During checkout, the user can create a new billing (only for public user as it
will create a 'normal' `res.partner`), a new shipping, edit its billing (that
will edit himself) or edit its shipping address.

All those cases will go through the exact same methods, public user and logged
in user included.

This previously led to multiple issues and multiple fixes to correctly set
`company_id` and `website_id` on the address (res.partner).

See 44372471 that fixed the `website_id` part.

See 3a0f05f3 that fixed the multi-company behavior, but needed 2ba71140 to not
modify the company of an already created partner, but was still incomplete as
after that fix a logged in user would still have the admin (sudo) company
instead of the website one as supposed.

This commit will fix that bug and add some tests for all mentionned issues.

Fixes #28853

Backport from odoo/odoo#34596

closes odoo/odoo#34689

Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
parent d24c1963
No related branches found
No related tags found
No related merge requests found
Loading
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