TIP: You can type at any time to perform a new search.
Point of Sale - Coupons & Loyalty
pos_loyalty · odoo/odoo
Security findings
- Repository
- odoo/odoo · module folder
- Module version
- 2.0
- Category
- Sales/Point Of Sale
- Folder size
- 1.68 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- Yes
- Website
- None
- Last tracking update
- 2026-10-03 21:22:40
- Authors
- Odoo S.A.
- Maintainers
- Odoo S.A.
- Committers
- Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Christophe Matthieu, Géry Debongnie, Victor Feyens, Sébastien Theys, Julien Mougenot, Tiffany Chang (tic), fja-odoo, Mathieu Duckerts-Antoine, Pierre Paridans, william-andre, Nicolas Bayet, David Monnom (moda), Pedram (PEBR), Victor Piryns (pivi), Dylan Kiss (dyki), Chong Wang (cwg), tong-odoo, Xavier Bol (xbo), Sarah Bellefroid, Adrien Guilliams (adgu), omra-odoo, Louis (loti), sami odoo, Harsh Shah, Parth Solanki[PASO], manv-afk, parp-odoo, Loukas Wets (lowe), paan-odoo, Jitendra Prajapat, David Monnom, dija-odoo, Pierre Pulinckx, Bastien PIERRE, Michaël Mattiello, Vincent Sevestre, Krzysztof Magusiak (krma), Ajit Singh, Robin Engels (roen), vpan-odoo, dhruv, vlst-odoo, Guillaume V, sjai-odoo, Julien Launois (jula), Laetitia (ldau), assh-odoo, Quentin (qucol), jand-odoo, Traina Ludo, rpka-odoo, Stephane Vanmeerhaeghe (stva), Léopold Cantraine, abhk-odoo, ELCO, adgu-odoo, Shubham Agarwal, jipr-odoo, Abhishek Khant, Vedant Pandey (vpan-odoo), Jean Schoenlaub, Elisabeth Dickinson (edi), Ahmed Hamila
Code Analysis
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…