Skip to content
Health
69/100
fair
  • Security25/25
    No findings
  • Activity6/25
    Last human commit 36 months ago
  • Required by20/25
    2 modules depend on it
  • Maturity18/25
    In 3 Odoo series since 13.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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

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 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…