Skip to main content

avoids creating multiple free shipping products

Project description

Beta License: LGPL-3 OCA/sale-promotion Translate me on Weblate Try me on Runboat

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

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo14_addon_sale_coupon_free_shipping_default_product-14.0.1.0.1.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo14_addon_sale_coupon_free_shipping_default_product-14.0.1.0.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf5b60bbbaa9b1a253e16a5dd9050294ae763e5ac3f01881f0030f56f1d369d
MD5 6cb0b0659de61b4eb7506c0d00a9e4e1
BLAKE2b-256 499cac2b1eabe711d4fa5cae48c3df3967543ac128132433d63fb0e2555f6c54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page