Skip to content

[19.0][ADD] website_sale_partner_sale_contact#1233

Open
JasminSForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-add-website_sale_partner_sale_contact
Open

[19.0][ADD] website_sale_partner_sale_contact#1233
JasminSForgeFlow wants to merge 1 commit into
OCA:19.0from
ForgeFlow:19.0-add-website_sale_partner_sale_contact

Conversation

@JasminSForgeFlow

@JasminSForgeFlow JasminSForgeFlow commented Jun 3, 2026

Copy link
Copy Markdown

When an order is placed from the website, the logged-in user is usually a
child contact of a company. Standard website_sale sets that contact as the
order customer (partner_id).

This module mirrors the backend sale_partner_sale_contact behaviour on the
website: the parent company becomes the order customer and the contact
is stored in the Sale Contact field (sale_contact_partner_id). Billing
and shipping addresses are left untouched.

Depends on:

@ForgeFlow

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_partner_sale_contact Module website_sale_partner_sale_contact labels Jun 3, 2026

@AaronHForgeFlow AaronHForgeFlow left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional 👍

Comment on lines +29 to +30
if self.parent_id != company:
self.parent_id = company

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if-condition seems pointless. We've just created company so it's safe to assume it's not the contact's parent

Suggested change
if self.parent_id != company:
self.parent_id = company
self.parent_id = company

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally functional review LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants