Point of Sale - Coupons & Loyalty
pos_loyalty · odoo/odoo
Replaces
pos_coupon, pos_gift_card (16.0)OCA/pos 10.0–11.0 → odoo/odoo 16.0–20.0
Health
95/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by20/252 modules depend on it
-
Maturity25/25In 5 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Required by
2
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.78 MB
Module directory on disk
Code analysis
0 migration notes
14 models
7 views
0 HTTP endpoints
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
loyalty_card_view_form_inherit_pos_loyalty |
loyalty.card.view.form.inherit.pos.loyalty | loyalty.card | form | Inherits loyalty.loyalty_card_view_form |
loyalty_mail_view_tree_inherit_pos_loyalty |
loyalty.mail.view.list.inherit.pos.loyalty | loyalty.mail | list | Inherits loyalty.loyalty_mail_view_tree |
loyalty_program_view_form_inherit_pos_loyalty |
loyalty.program.view.form.inherit.pos.loyalty | loyalty.program | form | Inherits loyalty.loyalty_program_view_form |
loyalty_program_view_tree_inherit_pos_loyalty |
loyalty.program.view.list.inherit.pos.loyalty | loyalty.program | list | Inherits loyalty.loyalty_program_view_tree |
pos_loyalty.pos_order_receipt |
pos_loyalty.pos_order_receipt | ir.ui.view | qweb | Inherits point_of_sale.pos_order_receipt |
res_config_view_form_inherit_pos_loyalty |
res.config.settings.view.form.inherit.pos_loyalty | res.config.settings | form | Inherits point_of_sale.res_config_settings_view_form |
res_partner_form |
res.partner.view.buttons | res.partner | form | Inherits loyalty.res_partner_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 14
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
typeSelectionondelete={'coupon': 'set default'}selection_add=[('coupon', 'Coupon')]
No public methods.
New fields (1)
-
source_pos_order_idMany2one → pos.ordercomodel_name='pos.order'help='The POS order from which coupon is generated'index='btree_not_null'readonly=Truestring='POS Order Reference'
-
get_card_status(self, code, config_id)@api.model
New fields (1)
-
pos_report_print_idMany2one → ir.actions.reportdomain=[('model', '=', 'loyalty.card')]help='The report action to be executed when creating a coupon/gift card/loyalty card in the PoS.'string='Print Report' args: 'ir.actions.report'
No public methods.
New fields (4)
-
pos_config_idsMany2many → pos.configcompute='_compute_pos_config_ids'help='Restrict publishing to those shops. Note: A program will only be used in the shops using the same currency as the program.'readonly=Falsestore=Truestring='Point of Sales' args: 'pos.config' -
pos_okBooleandefault=Truestring='Point of sale' -
pos_order_countIntegercompute='_compute_pos_order_count' args: 'PoS Order Count' -
pos_report_print_idMany2one → ir.actions.reportcompute='_compute_pos_report_print_id'domain=[('model', '=', 'loyalty.card')]help='This is used to print the generated gift cards from PoS.'inverse='_inverse_pos_report_print_id'readonly=Falsestring='Print Report' args: 'ir.actions.report'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
unlink(self)
New fields (3)
-
any_productBooleancompute='_compute_valid_product_ids'help='Technical field, whether all products match' -
promo_barcodeCharcompute='_compute_promo_barcode'help='A technical field used as an alternative to the promo code. This is automatically generated when the promo code is changed.'readonly=Falsestore=True args: 'Barcode' -
valid_product_idsMany2many → product.productcompute='_compute_valid_product_ids'help='these are the products that are valid for this rule.' args: 'product.product', 'Valid Products'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (4)
-
active_payment_programsJsoncopy=Falsedefault=list -
active_rewardsJsoncopy=Falsedefault=list -
applied_codesJsoncopy=Falsedefault=list -
disabled_program_idsJsoncopy=Falsedefault=list
-
read_pos_data(self, data, config)Return the loyalty cards touched by these orders alongside the order data. ``_process_loyalty`` credits/debits cards server-side after the order is saved, but the base sync response carries no ``loyalty.card`` records. Without this, a card sold or credited on the order keeps its stale in-memory balance (e.g. a gift card sold and then redeemed in the same session would read a 0 balance). Sending the cards back lets the client refresh their points via ``loadConnectedData``.
New fields (5)
-
card_idMany2one → loyalty.cardhelp='The card used to claim that reward.'index='btree_not_null'ondelete='restrict' args: 'loyalty.card', 'Card' -
gift_card_valsJsoncopy=Falsehelp='POS-only: the gift-card/eWallet program (and optional physical code and expiration date) this funding line sold. The loyalty.card is created from it when the order is saved; afterwards card_id holds the durable link.' -
is_reward_lineBooleanhelp='Whether this line is part of a reward or not.' -
points_costFloathelp='How many points this reward cost.' -
reward_idMany2one → loyalty.rewardhelp='The reward associated with this line.'index='btree_not_null'ondelete='restrict' args: 'loyalty.reward', 'Reward'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
order_receipt_generate_data(self, basic_receipt=False)Add the loyalty points summary and issued-coupon barcodes to the receipt. The JS counterpart is ``GeneratePrinterData._generateLoyaltyReceiptData``; both must produce the same rows (won/spent/balance per loyalty program, and the ``new_coupons`` barcodes) so the frontend and backend receipts match.
New fields (0)
No new fields.
Public methods (1)-
filter_local_data(self, models_to_filter)
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…
Loading…
Loading…
Loading…