Metadata-Version: 2.1
Name: odoo14-addon-sale_coupon_free_shipping_default_product
Version: 14.0.1.0.1.dev2
Summary: avoids creating multiple free shipping products
Home-page: https://github.com/OCA/sale-promotion
Author: Ooops, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
License: LGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 14.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Requires-Python: >=3.6
Requires-Dist: odoo<14.1dev,>=14.0a

=========================================
Sale coupon free shipping default product
=========================================

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

.. |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/licence-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--promotion-lightgray.png?logo=github
    :target: https://github.com/OCA/sale-promotion/tree/14.0/sale_coupon_free_shipping_default_product
    :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_free_shipping_default_product
    :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=14.0
    :alt: Try me on Runboat

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

This modules allows to set a default product for the promotions when selecting free shipping 

**Table of contents**

.. contents::
   :local:

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

BUSINESS NEED:
This module addresses the issue of multiple "Free Shipping" products being 
created whenever new promotion programs are configured. This redundancy leads 
to inefficiencies and unnecessary clutter in the product database. Additionally, 
while the "Free Shipping" product is set in the reward line product field, it is 
not configured as a default product for free shipping.

APPROACH
The apporach that we use was to inherit the couponProgram class and then change 
the functionality of the create function.
The method checks if the reward_type in the vals dictionary is set to 
"free_shipping".
If the condition is met, it retrieves the default "free shipping" product 
configured at the company level using self.env.company.free_shipping_product_default.
If a default product is found, its ID is assigned to the discount_line_product_id
field in vals.


USEFUL INFORMATION:
This module depends on modules sale and coupon.
Different companies can choose different default products for free shipping.




Usage
=====

Go to settings and set the product you want as a default for the free shiping promotion

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_coupon_free_shipping_default_product%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
~~~~~~~

* Ooops

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

* Ooops404 <https://ooops404.com>
  * Daniel Chionne <danielchionne@gmail.com>
  * Sylwester Krasinski <skrasinski62@gmail.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-promotion <https://github.com/OCA/sale-promotion/tree/14.0/sale_coupon_free_shipping_default_product>`_ project on GitHub.

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