TIP: You can type at any time to perform a new search.
Point of Sale - Coupons & Loyalty
pos_loyalty · odoo/odoo
- Repository
- odoo/odoo · module folder
- Module version
- 2.0
- Category
- Sales/Point Of Sale
- Folder size
- 2.01 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- Yes
- Website
- None
- Last tracking update
- 2026-08-15 22:44:16
- Authors
- Odoo S.A.
- Maintainers
- Odoo S.A.
- Committers
- Xavier Morel, Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Yannick Tivisse, Laurent Smet, Alexandre Kühn, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), Julien Mougenot, Tiffany Chang (tic), fja-odoo, Gorash, Pierre Paridans, William Braeckman, roen-odoo, Demesmaeker, Valentin Chevalier, David Monnom (moda), Louis Wicket (wil), Pedram (PEBR), Dylan Kiss (dyki), Sarah Bellefroid, Pedram (pebr), Adrien Guilliams (adgu), kdeb@odoo.com, kcv-odoo, dere-odoo, Chrysanthe (chgo), Junqi Wu, Majed Alhanash (malh), manv-afk, Joseph (jcb), parp-odoo, Loukas Wets (lowe), sabr, Pierre Pulinckx (PIPU), paan-odoo, Jitendra Prajapat, David Monnom, Nesma Harraz, Arthur Nanson, gvar-odoo, Mohammad Abdulmoneim (abdu), Pierre Pulinckx, Bastien PIERRE, Vincent Sevestre, plha-odoo, Krzysztof Magusiak (krma), Omar (OSAH), Ajit Singh, Shubham Agarwal [SHAG], Robin Engels (roen), Basioni (basm), vpan-odoo, dhruv, vlst-odoo, Guillaume V, Meet Jivani [MEJI], Hadi El Yakhni, Yash Pathak, sjai-odoo, Ali Hassan (alhy), Quentin (qucol), jand-odoo, Traina Ludo, rpka-odoo, Stephane Vanmeerhaeghe (stva), abhk-odoo, Mauricio Rubio Haro, Nikita Desai, Stephane vm, Mohamed (mobt)
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- pos_restaurant_loyalty, pos_sale_loyalty
- Description
Code Analysis ⓘ
Views touched (6)
| 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 |
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 (2)
-
source_pos_order_idMany2one → pos.orderhelp='PoS order where this coupon was generated.' args: 'pos.order', 'PoS Order Reference' -
source_pos_order_partner_idMany2one → res.partnerrelated='source_pos_order_id.partner_id' args: 'res.partner', 'PoS Order Customer'
-
get_gift_card_status(self, gift_code, config_id)@api.model -
get_loyalty_card_partner_by_code(self, code)@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=True args: '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 product 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 (1)-
use_coupon_code(self, code, creation_date, partner_id, pricelist_id)
New fields (0)
No new fields.
Public methods (3)-
add_loyalty_history_lines(self, coupon_data, coupon_updates) -
confirm_coupon_programs(self, coupon_data)This is called after the order is created. This will create all necessary coupons and link them to their line orders etc.. It will also return the points of all concerned coupons to be updated in the cache. -
validate_coupon_programs(self, point_changes, new_codes)This is called upon validating the order in the pos. This will check the balance for any pre-existing coupon to make sure that the rewards are in fact all claimable. This will also check that any set code for coupons do not exist in the database.
New fields (5)
-
coupon_idMany2one → loyalty.cardhelp='The coupon used to claim that reward.'index='btree_not_null'ondelete='restrict' args: 'loyalty.card', 'Coupon' -
is_reward_lineBooleanhelp='Whether this line is part of a reward or not.' -
points_costFloathelp='How many point this reward cost on the coupon.' -
reward_idMany2one → loyalty.rewardhelp='The reward associated with this line.'index='btree_not_null'ondelete='restrict' args: 'loyalty.reward', 'Reward' -
reward_identifier_codeCharhelp='\n Technical field used to link multiple reward lines from the same reward together.\n '
-
isRefund(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
loyalty_card_countIntegergroups='base.group_user,point_of_sale.group_pos_user'
No public methods.
Loading…
Loading…
Loading…