TIP: You can type at any time to perform a new search.
Point of Sale Coupons
pos_coupon · odoo/odoo
- 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
Code Analysis ⓘ
Views touched (5)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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)
-
typeSelectionondelete={'coupon': 'set default'}selection_add=[('coupon', 'Coupon')]
No public methods.
New fields (2)
-
pos_order_idMany2one → pos.orderhelp='PoS order where this coupon is consumed/booked.'string='Applied on PoS Order' args: 'pos.order' -
source_pos_order_idMany2one → pos.orderhelp='PoS order where this coupon is generated.'string='PoS Order Reference' args: 'pos.order'
No public methods.
New fields (7)
-
pos_config_idsMany2many → pos.configreadonly=Truestring='Point of Sales' args: 'pos.config' -
pos_order_countIntegercompute='_compute_pos_order_count' args: 'PoS Order Count' -
pos_order_idsMany2many → pos.ordercopy=Falsehelp='The PoS orders where this program is applied.' args: 'pos.order' -
pos_order_line_idsOne2many → pos.order.linehelp='Order lines where this program is applied.'string='PoS Order Lines' args: 'pos.order.line', 'program_id' -
promo_barcodeChardefault=<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_idsMany2many → res.partnercompute='_compute_valid_partner_ids'help='These are the partners that can avail this program.' args: 'res.partner', 'Valid Partners' -
valid_product_idsMany2many → product.productcompute='_compute_valid_product_ids'help='These are the products that are valid in this program.' args: 'product.product', 'Valid Products'
-
action_view_pos_orders(self) -
write(self, vals)
New fields (4)
-
coupon_program_idsMany2many → coupon.programcompute='_filter_programs'inverse='_set_programs'string='Coupon Programs' args: 'coupon.program' -
program_idsMany2many → coupon.programstring='Coupons and Promotions' args: 'coupon.program' -
promo_program_idsMany2many → coupon.programcompute='_filter_programs'inverse='_set_programs'string='Promotion Programs' args: 'coupon.program' -
use_coupon_programsBooleanhelp='Use coupon and promotion programs in this PoS configuration.' args: 'Coupons & Promotions'
-
open_session_cb(self, check_coa=True) -
use_coupon_code(self, code, creation_date, partner_id, reserved_program_ids)
New fields (3)
-
applied_program_idsMany2many → coupon.programhelp='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_idsOne2many → coupon.couponstring='Generated Coupons' args: 'coupon.coupon', 'source_pos_order_id' -
used_coupon_idsOne2many → coupon.couponstring='Consumed Coupons' args: 'coupon.coupon', 'pos_order_id'
-
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_idMany2one → coupon.couponhelp='Coupon that generated this reward.'string='Coupon' args: 'coupon.coupon' -
is_program_rewardBooleanhelp='Flag indicating that this order line is a result of coupon/promo program.' args: 'Is reward line' -
program_idMany2one → coupon.programhelp='Promotion/Coupon Program where this reward line is based.'string='Program' args: 'coupon.program'
No public methods.