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

===================
Sale delivery State
===================

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

.. |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-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
    :target: https://github.com/OCA/sale-workflow/tree/18.0/sale_delivery_state
    :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-18-0/sale-workflow-18-0-sale_delivery_state
    :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=18.0
    :alt: Try me on Runboat

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

This odoo module add delivery state on the sale order.

Delivery state is computed based on qty_delivered field on sale order
lines.

This is usefull for other modules to provide the state of delivery. The
state of the sale order can be forced to fully delivered in case some
quantities were cancelled by the customer and you consider you have
nothing more to deliver.

Sale order lines can have products or services, as long as the field
qty_delivered is set, it will trigger the computation of delivery state.

Sale order lines with the Skip Delivery State field set to True will be
ignored when computing the delivery state. This field is automatically
set depending on the field Sales > Configuration > Quotations & Orders >
Skip Service products for Sale Delivery State. If set to True, the field
Skip Delivery State in sale order lines containing service products will
be automatically set to True, but it can manually changed.

This module also works with delivery.carrier fees that are added as a
sale order line. Thoses line are special as they will never be
considered delivered. Delivery fees lines are ignored in the computation
of the delivery state.

When the 'sale_stock' module is installed, the glue module
'sale_stock_delivery_state' should also be installed; this module is
designed to override the compute method of the delivery status field
from 'sale_stock'.

**Table of contents**

.. contents::
   :local:

Configuration
=============

#. Go to *Sales > Configuration > Quotations & Orders*. #. Check the
Skip Service products for Sale Delivery State checkbox to automatically
set the field Skip Delivery State in sale order lines to True when the
line contains a service product.

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_delivery_state%0Aversion:%2018.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
-------

* Akretion

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

- Pierrick BRUN <pierrick.brun@akretion.com>
- Benoît Guillot <benoit.guillot@akretion.com>
- Yannick Vaucher <yannick.vaucher@camptocamp.com>
- Daniel Reis <dreis@opensourceintegrators.com>, `Open Source
  Integrators <https://opensourceintegrators.com>`__
- Carlos Lopez <celm1990@gmail.com>
- Virendrasinh Dabhi <veer.190.dabhi@gmail.com>
- Manuel Regidor manuel.regidor@sygel.es
- Simone Orsi simone.orsi@camptocamp.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/18.0/sale_delivery_state>`_ project on GitHub.

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