Coupons & Promotions for eCommerce
website_sale_coupon · odoo/odoo
Renamed to website_sale_loyalty in 16.0
Health
69/100
fair
-
Security25/25No findings
-
Activity6/25Last human commit 36 months ago
-
Required by20/252 modules depend on it
-
Maturity18/25In 3 Odoo series since 13.0
Heuristic over the facts below, not an audit · How it's computed
Required by
2
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.49 MB
Module directory on disk
Code analysis
4 migration notes
5 models
11 views
4 HTTP endpoints
Migration considerations
coupon_share_view_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourcecoupon_view_tree— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceres_config_settings_view_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourcesale_coupon_program_view_tree_website— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Create coupon and promotion codes to share in order to boost your sales (free products, discounts, etc.). Shoppers can use them in the eCommerce checkout.
Coupon & promotion programs can be edited in the Catalog menu of the Website app.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 11
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
cart_discount |
Show Discount in Subtotal | ir.ui.view | qweb | Inherits website_sale.total |
cart_summary |
Payment | ir.ui.view | qweb | Inherits website_sale.cart_summary |
coupon_share_view_form |
coupon.share.form | coupon.share | form | New |
coupon_view_tree |
coupon.coupon.tree | coupon.coupon | tree | Inherits coupon.coupon_view_tree |
layout |
layout | ir.ui.view | qweb | Inherits website.layout |
reduction_coupon_code |
reduction_coupon_code | ir.ui.view | qweb | Inherits website_sale.reduction_code |
res_config_settings_view_form |
res.config.settings.view.form.inherit.website.sale.coupon | res.config.settings | form | Inherits website.res_config_settings_view_form |
sale_coupon_program_view_form_common_website |
coupon.program.common.form | coupon.program | form | Inherits coupon.coupon_program_view_form_common |
sale_coupon_program_view_tree_website |
coupon.program.tree | coupon.program | tree | Inherits coupon.coupon_program_view_tree |
sale_coupon_result |
sale_coupon_result | ir.ui.view | qweb | Inherits website_sale.coupon_form |
website_sale_coupon_cart_hide_qty |
website_sale_coupon_cart_hide_qty | ir.ui.view | qweb | Inherits website_sale.cart_lines |
HTTP endpoints 4
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/coupon/<string:code> |
WebsiteSale.activate_coupon |
public | http | ALL | website |
/shop/cart |
WebsiteSale.cart |
public | http | ALL | website |
/shop/pricelist |
WebsiteSale.pricelist |
user | http | ALL | sudo |
| (inherited route override) | WebsiteSale.shop_payment |
inherited | http | ALL |
Models touched 5
New fields (0)
No new fields.
Public methods (1)-
action_coupon_share(self)Open a window to copy the coupon link
New fields (0)
No new fields.
Public methods (1)-
action_program_share(self)Open a window to copy the program link
New fields (7)
-
coupon_idMany2one → coupon.coupondomain="[('program_id', '=', program_id)]" args: 'coupon.coupon' -
program_idMany2one → coupon.programdomain=['|', ('program_type', '=', 'coupon_program'), ('promo_code_usage', '=', 'code_needed')]required=True args: 'coupon.program' -
program_website_idMany2one → websiterelated='program_id.website_id'string='Program Website' args: 'website' -
promo_codeCharcompute='_compute_promo_code' -
redirectChardefault='/shop'required=True -
share_linkCharcompute='_compute_share_link' -
website_idMany2one → websitedefault=_get_default_website_idrequired=True args: 'website'
-
action_generate_short_link(self) -
create_share_action(self, coupon=None, program=None)@api.model
New fields (0)
No new fields.
Public methods (2)-
get_promo_code_error(self, delete=True) -
recompute_coupon_lines(self)
New fields (0)
No new fields.
Public methods (1)-
sale_reset(self)
Loading…
Loading…