Skip to content
Health
74/100
fair
  • Security25/25
    No findings
  • Activity6/25
    Last human commit 27 months ago
  • Required by25/25
    15 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
15
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
2.21 MB
Module directory on disk
Code analysis 3 migration notes 5 models 8 views 0 HTTP endpoints

Description

Integrate coupon mechanism in sales orders.

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 8

XML IDNameModelTypeStatus
res_config_settings_view_form res.config.settings.view.form.inherit.sale.coupon res.config.settings form Inherits sale.res_config_settings_view_form
sale_coupon_apply_code_view_form sale.coupon.apply.code.form sale.coupon.apply.code form New
sale_coupon_program_view_coupon_program_form coupon.program.form coupon.program form Inherits coupon.coupon_program_view_coupon_program_form
sale_coupon_program_view_promo_program_form coupon.program.form coupon.program form Inherits coupon.coupon_program_view_promo_program_form
sale_coupon_view_coupon_program_kanban coupon.program.kanban coupon.program kanban Inherits coupon.view_coupon_program_kanban
sale_coupon_view_form coupon.coupon.form coupon.coupon form Inherits coupon.coupon_view_form
sale_coupon_view_tree coupon.coupon.tree coupon.coupon tree Inherits coupon.coupon_view_tree
sale_order_view_form sale.order.form.inherit.coupon sale.order form Inherits sale.view_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 5

New fields (2)
  • order_id Many2one → sale.order
    help='The sales order from which coupon is generated' readonly=True args: 'sale.order', 'Order Reference'
  • sales_order_id Many2one → sale.order
    help='The sales order on which the coupon is applied' readonly=True args: 'sale.order', 'Used in'
Public methods (0)

No public methods.

New fields (1)
  • order_count Integer
    compute='_compute_order_count'
Public methods (1)
  • action_view_sales_orders(self)

New fields (1)
  • coupon_code Char
    required=True string='Code'
Public methods (2)
  • apply_coupon(self, order, coupon_code)
  • process_coupon(self)
    Apply the entered coupon code if valid, raise an UserError otherwise.

New fields (6)
  • applied_coupon_ids One2many → coupon.coupon
    copy=False string='Applied Coupons' args: 'coupon.coupon', 'sales_order_id'
  • code_promo_program_id Many2one → coupon.program
    copy=False domain="[('promo_code_usage', '=', 'code_needed'), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Applied Promo Program' args: 'coupon.program'
  • generated_coupon_ids One2many → coupon.coupon
    copy=False string='Offered Coupons' args: 'coupon.coupon', 'order_id'
  • no_code_promo_program_ids Many2many → coupon.program
    copy=False domain="[('promo_code_usage', '=', 'no_code_needed'), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" string='Applied Immediate Promo Programs' args: 'coupon.program'
  • promo_code Char
    help='Applied program code' readonly=False related='code_promo_program_id.promo_code'
  • reward_amount Float
    compute='_compute_reward_total'
Public methods (5)
  • action_confirm(self)
  • action_draft(self)
  • copy(self, default=None)
    @api.returns('self', <expr>)
  • recompute_coupon_lines(self)
  • update_prices(self)
    Recompute coupons/promotions after pricelist prices reset.

New fields (1)
  • is_reward_line Boolean
    args: 'Is a program reward line'
Public methods (2)
  • modified(self, fnames, *args, **kwargs)
  • unlink(self)

Loading…

Loading…