Metadata-Version: 2.1
Name: odoo-addon-sale_loyalty_auto_refresh
Version: 16.0.1.0.1
Summary: Allows to auto-apply the coupons with no user intervention
Home-page: https://github.com/OCA/sale-promotion
Author: Tecnativa, Camptocamp, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
License: AGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 16.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.10
Requires-Dist: odoo<16.1dev,>=16.0a

====================
Auto Refresh Coupons
====================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
    :target: https://odoo-community.org/page/development-status
    :alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-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--promotion-lightgray.png?logo=github
    :target: https://github.com/OCA/sale-promotion/tree/16.0/sale_loyalty_auto_refresh
    :alt: OCA/sale-promotion
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/sale-promotion-16-0/sale-promotion-16-0-sale_loyalty_auto_refresh
    :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-promotion&target_branch=16.0
    :alt: Try me on Runboat

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

This module allows to auto apply the programs without the need of the user intervention.

**Table of contents**

.. contents::
   :local:

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

You can set this feature on or off in every company. To do so:

#. Go to *Sales > Configuration > Settings*
#. In the *Pricing* section you'll find the option *Auto refresh promotions*.

The auto-refresh in the backend is triggered over a minimum set of fields changes. If
you want to extend the list of that fields:

#. Go to *Settings > Technical > Config parameters*
#. Add or update the key:

   - For `sale.order`: `sale_loyalty_auto_refresh.sale_order_triggers`
   - For `sale.order.line`: `sale_loyalty_auto_refresh.sale_order_line_triggers`
#. In every add the fields seperated by commas that you want to add to the recomputation
   triggers.

⚠️ After configuring or removing a trigger a restart of Odoo is recommended so the
depends are reloaded properly. Anyway it isn't mandatory and the module detects the
new triggers so the auto-refresh works as expected as soon as they are set.

Usage
=====

You need to configure a *Promotion program* with the option *Program trigger* set to
*Automatic* (shown in Debug mode only, read-only computed field). This can be done in *Sales > Products > Discount & Loyalty*.

Now, make a quotation that fulfill the promotion condition and the promotion will be
automatically applied.

Known issues / Roadmap
======================

* This module should be ported to OCA in v13 as Odoo released enterprise modules and
  they are now on the community side.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-promotion/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-promotion/issues/new?body=module:%20sale_loyalty_auto_refresh%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
~~~~~~~

* Tecnativa
* Camptocamp

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

  * David Vidal
  * Pilar Vargas

* `Camptocamp <https://www.camptocamp.com>`_:

  * Silvio Gregorini

* `Trobz <https://www.trobz.com>`_:

  * Nguyen Minh Chien <chien@trobz.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.

.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
    :target: https://github.com/chienandalu
    :alt: chienandalu
.. |maintainer-SilvioC2C| image:: https://github.com/SilvioC2C.png?size=40px
    :target: https://github.com/SilvioC2C
    :alt: SilvioC2C

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-chienandalu| |maintainer-SilvioC2C| 

This module is part of the `OCA/sale-promotion <https://github.com/OCA/sale-promotion/tree/16.0/sale_loyalty_auto_refresh>`_ project on GitHub.

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