Repository
odoo/odoo · module folder
Module version
1.0
Category
Sales/Point Of Sale
Folder size
0.93 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
None
Last tracking update
2026-08-07 05:29:14
Authors
Maintainers
None
Committers
Thibault Delavallée, Martin Trigaux, Odoo Translation Bot, Yannick Tivisse, Pierre Masereel, Christophe Monniez, wan, Xavier-Do, Hugo Adan, Joseph Caburnay, Julien Mougenot, Tiffany Chang (tic), Romain Estievenart, roen-odoo, pedrambiria, Hubert Van de Walle (huvw), Jacky (trj), MerlinGuillaume, Yolann Sabaux, Nicolas Bayet, rhe-odoo, Javier Vega, Moises Lopez - https://www.vauxoo.com/, JVegaB
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
pos_coupon_pos_config_view_form pos.config.form pos.config form Inherits point_of_sale.pos_config_view_form
pos_coupon_program_view_coupon_program_form coupon.program.form coupon.program form Inherits coupon.coupon_program_view_coupon_program_form
pos_coupon_program_view_promo_program_form coupon.program.form coupon.program form Inherits coupon.coupon_program_view_promo_program_form
pos_coupon_view_form coupon.coupon.form coupon.coupon form Inherits coupon.coupon_view_form
res_config_view_form_inherit_pos_coupon res.config.form.inherit.pos.coupon res.config.settings form Inherits point_of_sale.res_config_settings_view_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (1)
  • type Selection
    ondelete={'coupon': 'set default'} selection_add=[('coupon', 'Coupon')]
Public methods (0)

No public methods.

New fields (2)
  • pos_order_id Many2one → pos.order
    help='PoS order where this coupon is consumed/booked.' string='Applied on PoS Order' args: 'pos.order'
  • source_pos_order_id Many2one → pos.order
    help='PoS order where this coupon is generated.' string='PoS Order Reference' args: 'pos.order'
Public methods (0)

No public methods.

New fields (7)
  • pos_config_ids Many2many → pos.config
    readonly=True string='Point of Sales' args: 'pos.config'
  • pos_order_count Integer
    compute='_compute_pos_order_count' args: 'PoS Order Count'
  • pos_order_ids Many2many → pos.order
    copy=False help='The PoS orders where this program is applied.' args: 'pos.order'
  • pos_order_line_ids One2many → pos.order.line
    help='Order lines where this program is applied.' string='PoS Order Lines' args: 'pos.order.line', 'program_id'
  • promo_barcode Char
    default=<expr> help='A technical field used as an alternative to the promo_code. This is automatically generated when promo_code is changed.' args: 'Barcode'
  • valid_partner_ids Many2many → res.partner
    compute='_compute_valid_partner_ids' help='These are the partners that can avail this program.' args: 'res.partner', 'Valid Partners'
  • valid_product_ids Many2many → product.product
    compute='_compute_valid_product_ids' help='These are the products that are valid in this program.' args: 'product.product', 'Valid Products'
Public methods (2)
  • action_view_pos_orders(self)
  • write(self, vals)

New fields (4)
  • coupon_program_ids Many2many → coupon.program
    compute='_filter_programs' inverse='_set_programs' string='Coupon Programs' args: 'coupon.program'
  • program_ids Many2many → coupon.program
    string='Coupons and Promotions' args: 'coupon.program'
  • promo_program_ids Many2many → coupon.program
    compute='_filter_programs' inverse='_set_programs' string='Promotion Programs' args: 'coupon.program'
  • use_coupon_programs Boolean
    help='Use coupon and promotion programs in this PoS configuration.' args: 'Coupons & Promotions'
Public methods (2)
  • open_session_cb(self, check_coa=True)
  • use_coupon_code(self, code, creation_date, partner_id, reserved_program_ids)

New fields (3)
  • applied_program_ids Many2many → coupon.program
    help='Technical field. This is set when the order is validated. We normally get this value thru the `program_id` of the reward lines.' string='Applied Programs' args: 'coupon.program'
  • generated_coupon_ids One2many → coupon.coupon
    string='Generated Coupons' args: 'coupon.coupon', 'source_pos_order_id'
  • used_coupon_ids One2many → coupon.coupon
    string='Consumed Coupons' args: 'coupon.coupon', 'pos_order_id'
Public methods (1)
  • validate_coupon_programs(self, program_ids_to_generate_coupons, unused_coupon_ids)
    This is called after create_from_ui is called. We set here fields that are used to link programs and coupons to the order. We also return the generated coupons that can be used in the frontend to print the generated codes in the receipt.

New fields (3)
  • coupon_id Many2one → coupon.coupon
    help='Coupon that generated this reward.' string='Coupon' args: 'coupon.coupon'
  • is_program_reward Boolean
    help='Flag indicating that this order line is a result of coupon/promo program.' args: 'Is reward line'
  • program_id Many2one → coupon.program
    help='Promotion/Coupon Program where this reward line is based.' string='Program' args: 'coupon.program'
Public methods (0)

No public methods.