Repository
odoo/odoo · module folder
Module version
1.0
Category
Website/Website
Folder size
0.49 MB
License
LGPL-3
Application
No
Auto-installable
Yes
Website
None
Last tracking update
2026-08-07 05:29:16
Authors
Maintainers
None
Committers
Thibault Delavallée, Martin Trigaux, Odoo Translation Bot, Jeremy Kersten, GitHub, Yannick Tivisse, Romain Derie, Adrian Torres, Xavier-Do, Joseph Caburnay, Julien Mougenot, William Braeckman, Antoine Vandevenne (anv), xO-Tx
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
website_sale_coupon_page, website_sale_coupon_restrict
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.
    

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
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)HandlerAuthTypeMethodsFlags
/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_id Many2one → coupon.coupon
    domain="[('program_id', '=', program_id)]" args: 'coupon.coupon'
  • program_id Many2one → coupon.program
    domain=['|', ('program_type', '=', 'coupon_program'), ('promo_code_usage', '=', 'code_needed')] required=True args: 'coupon.program'
  • program_website_id Many2one → website
    related='program_id.website_id' string='Program Website' args: 'website'
  • promo_code Char
    compute='_compute_promo_code'
  • redirect Char
    default='/shop' required=True
  • share_link Char
    compute='_compute_share_link'
  • website_id Many2one → website
    default=_get_default_website_id required=True args: 'website'
Public methods (2)
  • 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…