Metadata-Version: 2.1
Name: odoo-addon-sale_partner_sale_contact_website_sale
Version: 19.0.1.0.0.2
Requires-Dist: odoo-addon-sale_partner_sale_contact==19.0.*
Requires-Dist: odoo==19.0.*
Summary: Apply the sale contact auto-switch to eCommerce orders
Home-page: https://github.com/OCA/sale-workflow
License: LGPL-3
Author: ForgeFlow, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

========================================
Sale Partner Sale Contact - Website Sale
========================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:bd14a453849df53f8ae065efef38cfcb93a28b1b257ebadfbc4c8eef4196c142
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
    :target: https://github.com/OCA/sale-workflow/tree/19.0/sale_partner_sale_contact_website_sale
    :alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_partner_sale_contact_website_sale
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=19.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module is the glue between *Sale Partner Sale Contact* and the
eCommerce (``website_sale``).

When a portal user who is a contact person of a company places an order
on the website, the order is created with the contact person as customer
(``partner_id``). The auto-switch logic of *Sale Partner Sale Contact*
is implemented as an onchange and therefore never runs for website
orders.

This module applies the switch when the website order is confirmed:

- ``partner_id`` is replaced by the commercial partner (the company);
- the contact person who placed the order is stored in the *Sale
  Contact* field (``sale_contact_partner_id``);
- the invoice and delivery addresses chosen during checkout, the fiscal
  position and the payment terms are preserved.

The switch is deliberately not applied while the order is still a cart:
``website_sale`` resets the cart customer to the logged-in user's
partner on every request and looks up abandoned carts by that partner,
so an earlier switch would be reverted and would break cart recovery.

**Table of contents**

.. contents::
   :local:

Usage
=====

No specific configuration is needed; the module is installed
automatically when both *Sale Partner Sale Contact* and *eCommerce* are
installed.

1. As a portal user that is a contact person of a company, place an
   order on the website and complete the checkout.
2. Once the order is confirmed, open it in the backend: the *Customer*
   is the company and the *Sale Contact* is the person who placed the
   order.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_partner_sale_contact_website_sale%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/19.0/sale_partner_sale_contact_website_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
