Metadata-Version: 2.1
Name: odoo14-addon-sale-coupon-auto-refresh
Version: 14.0.2.0.0
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
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 14.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.6
Requires-Dist: odoo (<14.1dev,>=14.0a)

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

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/14.0/sale_coupon_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-14-0/sale-promotion-14-0-sale_coupon_auto_refresh
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
    :target: https://runbot.odoo-community.org/runbot/296/14.0
    :alt: Try me on Runbot

|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_coupon_auto_refresh.sale_order_triggers`
   - For `sale.order.line`: `sale_coupon_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 removiming 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 *Promo Code Usage* set to
*Automatically applied*. This can be done in *Sales > Products > Promotion programs*.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-promotion/issues/new?body=module:%20sale_coupon_auto_refresh%0Aversion:%2014.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

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

  * Silvio Gregorini

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/14.0/sale_coupon_auto_refresh>`_ project on GitHub.

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


