Sale coupon free shipping default product
avoids creating multiple free shipping products
Sale coupon free shipping default product
This modules allows to set a default product for the promotions when selecting free shipping
Table of contents
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. 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.
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.
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 project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Once the user has seen at least one product this snippet will be visible.