Health
68/100
fair
-
Security25/25No findings
-
Activity6/25Last human commit 28 months ago
-
Required by25/2511 modules depend on it
-
Maturity12/25In 2 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Required by
11
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
1.79 MB
Module directory on disk
Code analysis
9 migration notes
8 models
13 views
0 HTTP endpoints
Migration considerations
Coupon— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceCouponReward— Migrating to 17.0: `name_get` no longer feeds `display_name`: override `_compute_display_name` instead. migration-name-get · sourceCouponRule— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourcecoupon_generate_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_program_view_form_common— 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. (3 occurrences in this file) migration-view-attrs-states · sourcecoupon_program_view_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). (2 occurrences in this file) migration-view-tree-tag · sourcecoupon_view_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · 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. (2 occurrences in this file) migration-view-attrs-states · sourceexpire_coupon_cron— Migrating to 18.0: `ir.cron` lost `numbercall`/`doall`: remove them from the record, data loading fails on unknown fields. migration-cron-numbercall · 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
Integrate coupon mechanism in orders.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- coupon_chatter, coupon_commercial_partner_applicability, coupon_criteria_multi_product, coupon_domain_free_product, coupon_domain_product_discount, coupon_incompatibility, coupon_limit, coupon_multi_gift, coupon_promotion_generate_coupon, pos_coupon, sale_coupon
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 13
| 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 | form | 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 | form | 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 |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 8
New fields (6)
-
codeChardefault=<expr>readonly=Truerequired=True -
discount_line_product_idMany2one → product.producthelp='Product used in the sales order to apply the discount.'readonly=Falserelated='program_id.discount_line_product_id' args: 'product.product' -
expiration_dateDatecompute='_compute_expiration_date' args: 'Expiration Date' -
partner_idMany2one → res.partnerargs: 'res.partner', 'For Customer' -
program_idMany2one → coupon.programargs: 'coupon.program', 'Program' -
stateSelectiondefault='new'required=True args: [('reserved', 'Pending'), ('new', 'Valid'), ('sent', 'Sent'), ('used', 'Used'), ('expired', 'Expired'), ('cancel', 'Cancelled')]
-
action_coupon_cancel(self) -
action_coupon_send(self)Open a window to compose an email, with the edi invoice template message loaded by default -
cron_expire_coupon(self)
New fields (5)
-
generation_typeSelectiondefault='nbr_coupon' args: [('nbr_coupon', 'Number of Coupons'), ('nbr_customer', 'Number of Selected Customers')] -
has_partner_emailBooleancompute='_compute_has_partner_email' -
nbr_couponsIntegerdefault=1help='Number of coupons'string='Number of Coupons' -
partners_domainChardefault='[]'string='Customer' -
template_idMany2one → mail.templatedomain="[('model', '=', 'coupon.coupon')]" args: 'mail.template', 'Use template'
-
generate_coupon(self)Generates the number of coupons entered in wizard field nbr_coupons
New fields (16)
-
activeBooleandefault=Truehelp='A program is available for the customers when active' args: 'Active' -
company_idMany2one → res.companydefault=<expr>required=Truestring='Company' args: 'res.company' -
coupon_countIntegercompute='_compute_coupon_count' -
coupon_idsOne2many → coupon.couponcopy=Falsestring='Generated Coupons' args: 'coupon.coupon', 'program_id' -
currency_idMany2onereadonly=Truerelated='company_id.currency_id'string='Currency' -
maximum_use_numberIntegerhelp='Maximum number of sales orders in which reward can be provided' -
nameCharrequired=Truetranslate=True -
program_typeSelectionhelp='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_applicabilitySelectiondefault='on_current_order'string='Applicability' args: [('on_current_order', 'Apply On Current Order'), ('on_next_order', 'Send a Coupon')] -
promo_codeCharcopy=Falsehelp="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_usageSelectionhelp=<expr> args: [('no_code_needed', 'Automatically Applied'), ('code_needed', 'Use a code')] -
reward_idMany2one → coupon.rewardcopy=Falseondelete='restrict'required=Truestring='Reward' args: 'coupon.reward' -
rule_idMany2one → coupon.ruleondelete='restrict'required=Truestring='Coupon Rule' args: 'coupon.rule' -
sequenceIntegercopy=Falsehelp=<expr> -
total_order_countIntegercompute='_compute_total_order_count' args: 'Total Order Count' -
validity_durationIntegerdefault=30help='Validity duration for a coupon after its generation'
-
create(self, vals)@api.model -
toggle_active(self) -
unlink(self) -
write(self, vals)
New fields (12)
-
discount_apply_onSelectiondefault='on_order'help=<expr> args: [('on_order', 'On Order'), ('cheapest_product', 'On Cheapest Product'), ('specific_products', 'On Specific Products')] -
discount_fixed_amountFloathelp='The discount in fixed amount'string='Fixed Amount' -
discount_line_product_idMany2one → product.productcopy=Falsehelp='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_amountFloatdefault=0help='Maximum amount of discount that can be provided' -
discount_percentageFloatdefault=10help='The discount in percentage, between 1 and 100'string='Discount' -
discount_specific_product_idsMany2many → product.producthelp='Products that will be discounted if the discount is applied on specific products'string='Products' args: 'product.product' -
discount_typeSelectiondefault='percentage'help=<expr> args: [('percentage', 'Percentage'), ('fixed_amount', 'Fixed Amount')] -
reward_descriptionCharargs: 'Reward Description' -
reward_product_idMany2one → product.producthelp='Reward Product'string='Free Product' args: 'product.product' -
reward_product_quantityIntegerdefault=1help='Reward product quantity'string='Quantity' -
reward_product_uom_idMany2onereadonly=Truerelated='reward_product_id.product_tmpl_id.uom_id'string='Unit of Measure' -
reward_typeSelectiondefault='discount'help=<expr>string='Reward Type' args: [('discount', 'Discount'), ('product', 'Free Product')]
-
name_get(self)Returns a complete description of the reward
New fields (7)
-
rule_date_fromDatetimehelp='Coupon program start date'string='Start Date' -
rule_date_toDatetimehelp='Coupon program end date'string='End Date' -
rule_min_quantityIntegerdefault=1help='Minimum required product quantity to get the reward'string='Minimum Quantity' -
rule_minimum_amountFloatdefault=0.0help='Minimum required amount to get the reward' -
rule_minimum_amount_tax_inclusionSelectiondefault='tax_excluded' args: [('tax_included', 'Tax Included'), ('tax_excluded', 'Tax Excluded')] -
rule_partners_domainCharhelp='Coupon program will work for selected customers only'string='Based on Customers' -
rule_products_domainChardefault=[['sale_ok', '=', True]]help='On Purchase of selected product, reward will be given'string='Based on Products'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…