| REPOSITORY | |
|---|---|
| REPOSITORY | odoo/odoo |
| GIT | |
| GIT | https://github.com/odoo/odoo.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/odoo/odoo/tree/15.0/coupon |
| VERSION | |
| VERSION | 1.0 |
| CATEGORY | |
| CATEGORY | Sales |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | |
| MAINTAINERS | |
| MAINTAINERS | |
| COMMITTERS | |
| COMMITTERS | Raphael Collet, Odoo Translation Bot, Martin Trigaux, Thibault Delavallée, Goffin Simon, Nicolas Lempereur, Romain Derie, Christophe Monniez, Adrian Torres, Xavier-Do, Victor Feyens, Andrea Grazioso (agr-odoo), Joseph Caburnay, Julien Mougenot, Ivan Yelizariev, nie, Tiffany Chang (tic), William Braeckman, Kevin Baptiste, Hardik Prajapati, Jacky (trj), Michael Mattiello (mcm), Mylyna Hy, Malay Khamar, Anita (anko), MAHAMADASIF ANSARI |
| WEBSITE | |
| WEBSITE | |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:25:30 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - account - base_setup - base - web - product - bus - web_tour - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | Integrate coupon mechanism in orders. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
coupon_generate_view_form |
coupon.generate.wizard.form | coupon.generate.wizard | form | New |
coupon_program_view_coupon_program_form |
coupon.program.form | coupon.program | xpath | Inherits coupon_program_view_form_common |
coupon_program_view_form_common |
coupon.program.common.form | coupon.program | form | New |
coupon_program_view_promo_program_form |
coupon.promotion.program.form | coupon.program | xpath | Inherits coupon_program_view_form_common |
coupon_program_view_promo_program_search |
coupon.promotion.program.search | coupon.program | search | New |
coupon_program_view_promo_program_tree |
coupon.promotion.program.tree | coupon.program | tree | New |
coupon_program_view_search |
coupon.program.search | coupon.program | search | New |
coupon_program_view_tree |
coupon.program.tree | coupon.program | tree | New |
coupon_view_form |
coupon.coupon.form | coupon.coupon | form | New |
coupon_view_tree |
coupon.coupon.tree | coupon.coupon | tree | New |
report_coupon |
report_coupon | ir.ui.view | qweb | New |
report_coupon_i18n |
report_coupon_i18n | ir.ui.view | qweb | New |
view_coupon_program_kanban |
coupon.program.kanban | coupon.program | kanban | New |
code
Char
default=<expr>
readonly=True
required=True
discount_line_product_id
Many2one → product.product
help='Product used in the sales order to apply the discount.'
readonly=False
related='program_id.discount_line_product_id'
args: 'product.product'
expiration_date
Date
compute='_compute_expiration_date'
args: 'Expiration Date'
partner_id
Many2one → res.partner
program_id
Many2one → coupon.program
state
Selection
default='new'
required=True
args: [('reserved', 'Pending'), ('new', 'Valid'), ('sent', 'Sent'), ('used', 'Used'), ('expired', 'Expired'), ('cancel', 'Cancelled')]
action_coupon_cancel(self)
action_coupon_send(self)
cron_expire_coupon(self)
generation_type
Selection
default='nbr_coupon'
args: [('nbr_coupon', 'Number of Coupons'), ('nbr_customer', 'Number of Selected Customers')]
has_partner_email
Boolean
compute='_compute_has_partner_email'
nbr_coupons
Integer
default=1
help='Number of coupons'
string='Number of Coupons'
partners_domain
Char
default='[]'
string='Customer'
template_id
Many2one → mail.template
domain="[('model', '=', 'coupon.coupon')]"
args: 'mail.template', 'Use template'
generate_coupon(self)
active
Boolean
default=True
help='A program is available for the customers when active'
args: 'Active'
company_id
Many2one → res.company
default=<expr>
required=True
string='Company'
args: 'res.company'
coupon_count
Integer
compute='_compute_coupon_count'
coupon_ids
One2many → coupon.coupon
copy=False
string='Generated Coupons'
args: 'coupon.coupon', 'program_id'
currency_id
Many2one
readonly=True
related='company_id.currency_id'
string='Currency'
maximum_use_number
Integer
help='Maximum number of sales orders in which reward can be provided'
name
Char
required=True
translate=True
program_type
Selection
help='A promotional program can be either a limited promotional offer without code (applied automatically)\n or with a code (displayed on a magazine for example) that may generate a discount on the current\n order or create a coupon for a next order.\n\n A coupon program generates coupons with a code that can be used to generate a discount on the current\n order or create a coupon for a next order.'
args: [('promotion_program', 'Promotional Program'), ('coupon_program', 'Coupon Program')]
promo_applicability
Selection
default='on_current_order'
string='Applicability'
args: [('on_current_order', 'Apply On Current Order'), ('on_next_order', 'Send a Coupon')]
promo_code
Char
copy=False
help="A promotion code is a code that is associated with a marketing discount. For example, a retailer might tell frequent customers to enter the promotion code 'THX001' to receive a 10%% discount on their whole order."
args: 'Promotion Code'
promo_code_usage
Selection
help=<expr>
args: [('no_code_needed', 'Automatically Applied'), ('code_needed', 'Use a code')]
reward_id
Many2one → coupon.reward
copy=False
ondelete='restrict'
required=True
string='Reward'
args: 'coupon.reward'
rule_id
Many2one → coupon.rule
ondelete='restrict'
required=True
string='Coupon Rule'
args: 'coupon.rule'
sequence
Integer
copy=False
help=<expr>
total_order_count
Integer
compute='_compute_total_order_count'
args: 'Total Order Count'
validity_duration
Integer
default=30
help='Validity duration for a coupon after its generation'
create(self, vals)
toggle_active(self)
unlink(self)
write(self, vals)
discount_apply_on
Selection
default='on_order'
help=<expr>
args: [('on_order', 'On Order'), ('cheapest_product', 'On Cheapest Product'), ('specific_products', 'On Specific Products')]
discount_fixed_amount
Float
help='The discount in fixed amount'
string='Fixed Amount'
discount_line_product_id
Many2one → product.product
copy=False
help='Product used in the sales order to apply the discount. Each coupon program has its own reward product for reporting purpose'
string='Reward Line Product'
args: 'product.product'
discount_max_amount
Float
default=0
help='Maximum amount of discount that can be provided'
discount_percentage
Float
default=10
help='The discount in percentage, between 1 and 100'
string='Discount'
discount_specific_product_ids
Many2many → product.product
help='Products that will be discounted if the discount is applied on specific products'
string='Products'
args: 'product.product'
discount_type
Selection
default='percentage'
help=<expr>
args: [('percentage', 'Percentage'), ('fixed_amount', 'Fixed Amount')]
reward_description
Char
reward_product_id
Many2one → product.product
help='Reward Product'
string='Free Product'
args: 'product.product'
reward_product_quantity
Integer
default=1
help='Reward product quantity'
string='Quantity'
reward_product_uom_id
Many2one
readonly=True
related='reward_product_id.product_tmpl_id.uom_id'
string='Unit of Measure'
reward_type
Selection
default='discount'
help=<expr>
string='Reward Type'
args: [('discount', 'Discount'), ('product', 'Free Product')]
name_get(self)
rule_date_from
Datetime
help='Coupon program start date'
string='Start Date'
rule_date_to
Datetime
help='Coupon program end date'
string='End Date'
rule_min_quantity
Integer
default=1
help='Minimum required product quantity to get the reward'
string='Minimum Quantity'
rule_minimum_amount
Float
default=0.0
help='Minimum required amount to get the reward'
rule_minimum_amount_tax_inclusion
Selection
default='tax_excluded'
args: [('tax_included', 'Tax Included'), ('tax_excluded', 'Tax Excluded')]
rule_partners_domain
Char
help='Coupon program will work for selected customers only'
string='Based on Customers'
rule_products_domain
Char
default=[['sale_ok', '=', True]]
help='On Purchase of selected product, reward will be given'
string='Based on Products'
No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | odoo/odoo |
| GIT | |
| GIT | https://github.com/odoo/odoo.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/odoo/odoo/tree/14.0/coupon |
| VERSION | |
| VERSION | 1.0 |
| CATEGORY | |
| CATEGORY | Sales |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | |
| MAINTAINERS | |
| MAINTAINERS | |
| COMMITTERS | |
| COMMITTERS | Odoo Translation Bot, Martin Trigaux, Olivier Dony, Xavier Morel, Nicolas Lempereur, Aaron Bohy, Barad Mahendra, Pierre Masereel, Christophe Monniez, Xavier-Do, Andrea Grazioso (agr-odoo), Loan (lse), Ivan Yelizariev, Baptiste Vergote, Swapnesh Shah, nie, Ivàn Todorovich, William Braeckman, BVE, Mylyna Hy, Malay Khamar |
| WEBSITE | |
| WEBSITE | |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:14:31 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - account - base_setup - base - web - product - bus - web_tour - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | Integrate coupon mechanism in orders. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
coupon_generate_view_form |
coupon.generate.wizard.form | coupon.generate.wizard | form | New |
coupon_program_view_coupon_program_form |
coupon.program.form | coupon.program | xpath | Inherits coupon_program_view_form_common |
coupon_program_view_form_common |
coupon.program.common.form | coupon.program | form | New |
coupon_program_view_promo_program_form |
coupon.promotion.program.form | coupon.program | xpath | Inherits coupon_program_view_form_common |
coupon_program_view_promo_program_search |
coupon.promotion.program.search | coupon.program | search | New |
coupon_program_view_promo_program_tree |
coupon.promotion.program.tree | coupon.program | tree | New |
coupon_program_view_search |
coupon.program.search | coupon.program | search | New |
coupon_program_view_tree |
coupon.program.tree | coupon.program | tree | New |
coupon_view_form |
coupon.coupon.form | coupon.coupon | form | New |
coupon_view_tree |
coupon.coupon.tree | coupon.coupon | tree | New |
report_coupon |
report_coupon | ir.ui.view | qweb | New |
report_coupon_i18n |
report_coupon_i18n | ir.ui.view | qweb | New |
view_coupon_program_kanban |
coupon.program.kanban | coupon.program | kanban | New |
code
Char
default=_generate_code
readonly=True
required=True
discount_line_product_id
Many2one → product.product
help='Product used in the sales order to apply the discount.'
readonly=False
related='program_id.discount_line_product_id'
args: 'product.product'
expiration_date
Date
compute='_compute_expiration_date'
args: 'Expiration Date'
partner_id
Many2one → res.partner
program_id
Many2one → coupon.program
state
Selection
default='new'
required=True
args: [('reserved', 'Pending'), ('new', 'Valid'), ('sent', 'Sent'), ('used', 'Used'), ('expired', 'Expired'), ('cancel', 'Cancelled')]
action_coupon_cancel(self)
action_coupon_sent(self)
cron_expire_coupon(self)
generation_type
Selection
default='nbr_coupon'
args: [('nbr_coupon', 'Number of Coupons'), ('nbr_customer', 'Number of Selected Customers')]
has_partner_email
Boolean
compute='_compute_has_partner_email'
nbr_coupons
Integer
default=1
help='Number of coupons'
string='Number of Coupons'
partners_domain
Char
default='[]'
string='Customer'
generate_coupon(self)
active
Boolean
default=True
help='A program is available for the customers when active'
args: 'Active'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
coupon_count
Integer
compute='_compute_coupon_count'
coupon_ids
One2many → coupon.coupon
copy=False
string='Generated Coupons'
args: 'coupon.coupon', 'program_id'
currency_id
Many2one
readonly=True
related='company_id.currency_id'
string='Currency'
maximum_use_number
Integer
help='Maximum number of sales orders in which reward can be provided'
name
Char
required=True
translate=True
program_type
Selection
help='A promotional program can be either a limited promotional offer without code (applied automatically)\n or with a code (displayed on a magazine for example) that may generate a discount on the current\n order or create a coupon for a next order.\n\n A coupon program generates coupons with a code that can be used to generate a discount on the current\n order or create a coupon for a next order.'
args: [('promotion_program', 'Promotional Program'), ('coupon_program', 'Coupon Program')]
promo_applicability
Selection
default='on_current_order'
string='Applicability'
args: [('on_current_order', 'Apply On Current Order'), ('on_next_order', 'Send a Coupon')]
promo_code
Char
copy=False
help="A promotion code is a code that is associated with a marketing discount. For example, a retailer might tell frequent customers to enter the promotion code 'THX001' to receive a 10%% discount on their whole order."
args: 'Promotion Code'
promo_code_usage
Selection
help=<expr>
args: [('no_code_needed', 'Automatically Applied'), ('code_needed', 'Use a code')]
reward_id
Many2one → coupon.reward
copy=False
ondelete='restrict'
required=True
string='Reward'
args: 'coupon.reward'
rule_id
Many2one → coupon.rule
ondelete='restrict'
required=True
string='Coupon Rule'
args: 'coupon.rule'
sequence
Integer
copy=False
help=<expr>
validity_duration
Integer
default=30
help='Validity duration for a coupon after its generation'
create(self, vals)
toggle_active(self)
unlink(self)
write(self, vals)
discount_apply_on
Selection
default='on_order'
help=<expr>
args: [('on_order', 'On Order'), ('cheapest_product', 'On Cheapest Product'), ('specific_products', 'On Specific Products')]
discount_fixed_amount
Float
help='The discount in fixed amount'
string='Fixed Amount'
discount_line_product_id
Many2one → product.product
copy=False
help='Product used in the sales order to apply the discount. Each coupon program has its own reward product for reporting purpose'
string='Reward Line Product'
args: 'product.product'
discount_max_amount
Float
default=0
help='Maximum amount of discount that can be provided'
discount_percentage
Float
default=10
help='The discount in percentage, between 1 and 100'
string='Discount'
discount_specific_product_ids
Many2many → product.product
help='Products that will be discounted if the discount is applied on specific products'
string='Products'
args: 'product.product'
discount_type
Selection
default='percentage'
help=<expr>
args: [('percentage', 'Percentage'), ('fixed_amount', 'Fixed Amount')]
reward_description
Char
reward_product_id
Many2one → product.product
help='Reward Product'
string='Free Product'
args: 'product.product'
reward_product_quantity
Integer
default=1
help='Reward product quantity'
string='Quantity'
reward_product_uom_id
Many2one
readonly=True
related='reward_product_id.product_tmpl_id.uom_id'
string='Unit of Measure'
reward_type
Selection
default='discount'
help=<expr>
string='Reward Type'
args: [('discount', 'Discount'), ('product', 'Free Product')]
name_get(self)
rule_date_from
Datetime
help='Coupon program start date'
string='Start Date'
rule_date_to
Datetime
help='Coupon program end date'
string='End Date'
rule_min_quantity
Integer
default=1
help='Minimum required product quantity to get the reward'
string='Minimum Quantity'
rule_minimum_amount
Float
default=0.0
help='Minimum required amount to get the reward'
rule_minimum_amount_tax_inclusion
Selection
default='tax_excluded'
args: [('tax_included', 'Tax Included'), ('tax_excluded', 'Tax Excluded')]
rule_partners_domain
Char
help='Coupon program will work for selected customers only'
string='Based on Customers'
rule_products_domain
Char
default=[['sale_ok', '=', True]]
help='On Purchase of selected product, reward will be given'
string='Based on Products'
No public methods.
No new fields.
Public methods (1)send_mail(self, **kwargs)
No new fields.
Public methods (0)No public methods.