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

==========================
Notify Users about Picking
==========================

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

.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github
    :target: https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_status_notification
    :alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_status_notification
    :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/stock-logistics-workflow&target_branch=16.0
    :alt: Try me on Runboat

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

This module allows to send notifications to selected backend users when
the state of stock picking changes . For this configurable notification
rules are used. Rules are checked using flexible patterns. The first one
rule matching the pattern is triggered.

By default notifications are sent when a picking is set to the "Waiting"
or "Ready" status. However you can enable notifications for other
pickings too.

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

Imagine you have a warehouse that is serving a retail store and online
shop.

Each time a sale is done in the retail shop you would like to process
that order immediately. For this you need to notify selected employees
about such order so that they could switch to it **asap**.

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

To configure notification rules:

- Go to
  ``"Inventory -> Configuration -> Warehouse Management -> New Picking Notifications"``
  and create a new notification
- Put the following data in the notification form:

  - ``Priority``. Defines the order in which notification rules are
    checked. The lower is the number the higher is the priority. Default
    is ``10``
  - ``Operation Types``, required. Specifies the operation types for
    which this notification will be triggered
  - ``Notified Users``, required. List of users to be notified
  - ``Source Document Pattern``, optional. Notification will be sent if
    source document name matches the specified regex pattern. Leave
    blank to match any source
  - ``Custom Message``, optional. Custom message to be used instead of
    the default one. Leave blank to use the default message
  - ``Notification Sound``, optional. Custom sound to be used with
    notification. Leave blank to use notification without sound
  - ``Draft`` - optional. If enabled, notifications will be sent when a
    picking is in the "Draft" state
  - ``Waiting Another Operation`` - optional. If enabled, notifications
    will be sent when a picking is in the "Waiting Another Operation"
    state
  - ``Waiting`` - optional. If enabled, notifications will be sent when
    a picking is in the "Waiting" state
  - ``Ready`` - optional. If enabled, notifications will be sent when a
    picking is in the "Ready" state.
  - ``Done`` - optional. If enabled, notifications will be sent when a
    picking is in the "Done" state.
  - ``Cancel`` - optional. If enabled, notifications will be sent when a
    picking is in the "Cancelled" state

Usage
=====

When a new picking is created and this picking matches some notification
rule a notification will be shown for selected users:

- Document number in the notification title
- Message text in the notification body
- "Open document" button. Click it to open the related document

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-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/stock-logistics-workflow/issues/new?body=module:%20stock_picking_status_notification%0Aversion:%2016.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
-------

* Cetmix

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/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_status_notification>`_ project on GitHub.

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