Point of Sale - Coupons & Loyalty

pos_loyalty
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/pos_loyalty
VERSION
VERSION 2.0
CATEGORY
CATEGORYSales/Point Of Sale
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Thibault Delavallée, Xavier Morel, Yannick Tivisse, Laurent Smet, Alexandre Kühn, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), Julien Mougenot, Tiffany Chang (tic), Gorash, Pierre Paridans, William Braeckman, roen-odoo, Demesmaeker, Valentin Chevalier, David Monnom (moda), Pedram (PEBR), Louis Wicket (wil), Dylan Kiss (dyki), Sarah Bellefroid, Pedram (pebr), Adrien Guilliams (adgu), kdeb@odoo.com, kcv-odoo, dere-odoo, Chrysanthe (chgo), Junqi Wu, Joseph (jcb), parp-odoo, Majed Alhanash (malh), Loukas Wets (lowe), manv-afk, sabr, Pierre Pulinckx (PIPU), Jitendra Prajapat, paan-odoo, David Monnom, Nesma Harraz, gvar-odoo, Arthur Nanson, Mohammad Abdulmoneim (abdu), Pierre Pulinckx, Bastien PIERRE, Vincent Sevestre, plha-odoo, Krzysztof Magusiak (krma), Omar (OSAH), Ajit Singh, Shubham Agarwal [SHAG], Basioni (basm), Robin Engels (roen), Hadi El Yakhni, dhruv, Guillaume V, vlst-odoo, Meet Jivani [MEJI], vpan-odoo, sjai-odoo, Ali Hassan (alhy), Yash Pathak, Quentin (qucol), abhk-odoo, rpka-odoo, jand-odoo, Stephane Vanmeerhaeghe (stva), Traina Ludo, Mauricio Rubio Haro, Nikita Desai, Stephane vm, Mohamed (mobt)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - loyalty
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - portal
    - http_routing
    - auth_signup
    - account
    - onboarding
    - analytic
    - digest
    - resource
    - point_of_sale
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - phone_validation
    - partner_autocomplete
    - iap_mail
    - iap
    - iot_base
    - google_address_autocomplete
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
loyalty_card_view_form_inherit_pos_loyalty loyalty.card.view.form.inherit.pos.loyalty loyalty.card xpath Inherits loyalty.loyalty_card_view_form
loyalty_mail_view_tree_inherit_pos_loyalty loyalty.mail.view.list.inherit.pos.loyalty loyalty.mail field Inherits loyalty.loyalty_mail_view_tree
loyalty_program_view_form_inherit_pos_loyalty loyalty.program.view.form.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_form
loyalty_program_view_tree_inherit_pos_loyalty loyalty.program.view.list.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_tree
res_config_view_form_inherit_pos_loyalty res.config.settings.view.form.inherit.pos_loyalty res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
res_partner_form res.partner.view.buttons res.partner button Inherits loyalty.res_partner_form
Models touched (14)

New fields (0)

No new fields.

Public methods (0)

No public methods.

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

No public methods.

New fields (2)
  • source_pos_order_id Many2one → pos.order
    help='PoS order where this coupon was generated.' args: 'pos.order', 'PoS Order Reference'
  • source_pos_order_partner_id Many2one → res.partner
    related='source_pos_order_id.partner_id' args: 'res.partner', 'PoS Order Customer'
Public methods (2)
  • 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_id Many2one → ir.actions.report
    domain=[('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'
Public methods (0)

No public methods.

New fields (4)
  • pos_config_ids Many2many → pos.config
    compute='_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=False store=True string='Point of Sales' args: 'pos.config'
  • pos_ok Boolean
    default=True args: 'Point of Sale'
  • pos_order_count Integer
    compute='_compute_pos_order_count' args: 'PoS Order Count'
  • pos_report_print_id Many2one → ir.actions.report
    compute='_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=False string='Print Report' args: 'ir.actions.report'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)

New fields (3)
  • any_product Boolean
    compute='_compute_valid_product_ids' help='Technical field, whether all product match'
  • promo_barcode Char
    compute='_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=False store=True args: 'Barcode'
  • valid_product_ids Many2many → product.product
    compute='_compute_valid_product_ids' help='These are the products that are valid for this rule.' args: 'product.product', 'Valid Products'
Public methods (0)

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_id Many2one → loyalty.card
    help='The coupon used to claim that reward.' ondelete='restrict' args: 'loyalty.card', 'Coupon'
  • is_reward_line Boolean
    help='Whether this line is part of a reward or not.'
  • points_cost Float
    help='How many point this reward cost on the coupon.'
  • reward_id Many2one → loyalty.reward
    help='The reward associated with this line.' index='btree_not_null' ondelete='restrict' args: 'loyalty.reward', 'Reward'
  • reward_identifier_code Char
    help='\n Technical field used to link multiple reward lines from the same reward together.\n '
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 (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • loyalty_card_count Integer
    groups='base.group_user,point_of_sale.group_pos_user'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/pos_loyalty
VERSION
VERSION 2.0
CATEGORY
CATEGORYSales/Point Of Sale
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Xavier Morel, Odoo Online, Laurent Smet, Arnold Moyaux, Aurélien Warnon, Victor Feyens, Andrea Grazioso (agr-odoo), Prakash Prajapati, Tiffany Chang (tic), Gorash, William Braeckman, roen-odoo, Demesmaeker, Vincent Larcin, Moises Lopez - https://www.vauxoo.com/, David Monnom (moda), Pedram (PEBR), Louis Wicket (wil), Dylan Kiss (dyki), Sarah Bellefroid, Pedram (pebr), adda-odoo, Adrien Guilliams (adgu), kdeb@odoo.com, lase@odoo.com, Louis (loti), Maxime de Neuville, axtr, kcv-odoo, dere-odoo, Louis Gobert, Lina (liew), Louis (wil), Junqi Wu, Joseph (jcb), parp-odoo, Parth Solanki[PASO], Majed Alhanash (malh), Loukas Wets (lowe), manv-afk, mash, Ryan Cen, vlst, sabr, Pierre Pulinckx (PIPU), ahta, Abdessamad Zouiten (abzo), Jitendra Prajapat, paan-odoo, David Monnom, Nesma Harraz, “Ali, gvar-odoo, Arthur Nanson, Pierre Pulinckx, Bastien PIERRE, jeep-odoo, Vincent Sevestre, Krzysztof Magusiak (krma), Ajit Singh, Shubham Agarwal [SHAG], Robin Engels (roen), Hadi El Yakhni, Guillaume V, vlst-odoo, Meet Jivani [MEJI], sjai-odoo, Ali Hassan (alhy), Quentin (qucol), David (davg), nesma-neha, abhk-odoo, jand-odoo, taal-odoo, Traina Ludo, enricodg, Mauricio Rubio Haro, Nikita Desai
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - loyalty
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - account
    - onboarding
    - analytic
    - digest
    - resource
    - point_of_sale
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - phone_validation
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
loyalty_card_view_form_inherit_pos_loyalty loyalty.card.view.form.inherit.pos.loyalty loyalty.card xpath Inherits loyalty.loyalty_card_view_form
loyalty_mail_view_tree_inherit_pos_loyalty loyalty.mail.view.list.inherit.pos.loyalty loyalty.mail field Inherits loyalty.loyalty_mail_view_tree
loyalty_program_view_form_inherit_pos_loyalty loyalty.program.view.form.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_form
loyalty_program_view_tree_inherit_pos_loyalty loyalty.program.view.list.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_tree
res_config_view_form_inherit_pos_loyalty res.config.settings.view.form.inherit.pos_loyalty res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
res_partner_form res.partner.view.buttons res.partner button Inherits loyalty.res_partner_form
Models touched (13)

New fields (0)

No new fields.

Public methods (0)

No public methods.

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

No public methods.

New fields (1)
  • source_pos_order_id Many2one → pos.order
    help='PoS order where this coupon was generated.' args: 'pos.order', 'PoS Order Reference'
Public methods (0)

No public methods.

New fields (1)
  • pos_report_print_id Many2one → ir.actions.report
    domain=[('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'
Public methods (0)

No public methods.

New fields (4)
  • pos_config_ids Many2many → pos.config
    compute='_compute_pos_config_ids' help='Restrict publishing to those shops.' readonly=False store=True string='Point of Sales' args: 'pos.config'
  • pos_ok Boolean
    default=True args: 'Point of Sale'
  • pos_order_count Integer
    compute='_compute_pos_order_count' args: 'PoS Order Count'
  • pos_report_print_id Many2one → ir.actions.report
    compute='_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=False string='Print Report' args: 'ir.actions.report'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)

New fields (3)
  • any_product Boolean
    compute='_compute_valid_product_ids' help='Technical field, whether all product match'
  • promo_barcode Char
    compute='_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=False store=True args: 'Barcode'
  • valid_product_ids Many2many → product.product
    compute='_compute_valid_product_ids' help='These are the products that are valid for this rule.' args: 'product.product', 'Valid Products'
Public methods (0)

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_id Many2one → loyalty.card
    help='The coupon used to claim that reward.' ondelete='restrict' args: 'loyalty.card', 'Coupon'
  • is_reward_line Boolean
    help='Whether this line is part of a reward or not.'
  • points_cost Float
    help='How many point this reward cost on the coupon.'
  • reward_id Many2one → loyalty.reward
    help='The reward associated with this line.' index='btree_not_null' ondelete='restrict' args: 'loyalty.reward', 'Reward'
  • reward_identifier_code Char
    help='\n Technical field used to link multiple reward lines from the same reward together.\n '
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_count Integer
    groups='base.group_user,point_of_sale.group_pos_user'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/pos_loyalty
VERSION
VERSION 2.0
CATEGORY
CATEGORYSales/Point Of Sale
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Géry Debongnie, Odoo Online, Jorge Pinna Puissant, Victor Feyens, Andrea Grazioso (agr-odoo), Joseph Caburnay, Samuel Degueldre, Ivan Yelizariev, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, William Braeckman, roen-odoo, pedrambiria, Jacky (trj), Vishnu Vanneri, Aurelien van Delft (avd), Valentin Chevalier, rhe-odoo, niyasraphy, Moises Lopez - https://www.vauxoo.com/, David Monnom (moda), Pedram (PEBR), Louis Wicket (wil), Maruan Aguerdouh (magm), Dylan Kiss (dyki), Michael (mcm), Valeriya(vchu), Sarah Bellefroid, Pedram (pebr), adda-odoo, Adrien Guilliams (adgu), Zachary Hanham, stefanorigano (SRI), lase@odoo.com, Louis (loti), ROEN, axtr, kcv-odoo, dere-odoo, Louis (wil), Junqi Wu, Loukas Wets (lowe), Ryan Cen, vlst, sabr, Abdessamad Zouiten (abzo), Jitendra Prajapat, paan-odoo, “Ali, Pierre Pulinckx (pipu), Bastien PIERRE, Ajit Singh, Pulinckx Pierre (PIPU), Shubham Agarwal [SHAG], Robin Engels (roen), Guillaume V, vpan-odoo, Ali Hassan (alhy), Quentin Colla (qucol)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - loyalty
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - point_of_sale
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - onboarding
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
loyalty_card_view_form_inherit_pos_loyalty loyalty.card.view.form.inherit.pos.loyalty loyalty.card xpath Inherits loyalty.loyalty_card_view_form
loyalty_mail_view_tree_inherit_pos_loyalty loyalty.mail.view.tree.inherit.pos.loyalty loyalty.mail field Inherits loyalty.loyalty_mail_view_tree
loyalty_program_view_form_inherit_pos_loyalty loyalty.program.view.form.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_form
loyalty_program_view_tree_inherit_pos_loyalty loyalty.program.view.tree.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_tree
res_config_view_form_inherit_pos_loyalty res.config.settings.view.form.inherit.pos_loyalty res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
res_partner_form res.partner.view.buttons res.partner button Inherits loyalty.res_partner_form
Models touched (11)

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

No public methods.

New fields (1)
  • source_pos_order_id Many2one → pos.order
    help='PoS order where this coupon was generated.' args: 'pos.order', 'PoS Order Reference'
Public methods (0)

No public methods.

New fields (1)
  • pos_report_print_id Many2one → ir.actions.report
    domain=[('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'
Public methods (0)

No public methods.

New fields (4)
  • pos_config_ids Many2many → pos.config
    compute='_compute_pos_config_ids' help='Restrict publishing to those shops.' readonly=False store=True string='Point of Sales' args: 'pos.config'
  • pos_ok Boolean
    default=True args: 'Point of Sale'
  • pos_order_count Integer
    compute='_compute_pos_order_count' args: 'PoS Order Count'
  • pos_report_print_id Many2one → ir.actions.report
    compute='_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=False string='Print Report' args: 'ir.actions.report'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)

New fields (3)
  • any_product Boolean
    compute='_compute_valid_product_ids' help='Technical field, whether all product match'
  • promo_barcode Char
    compute='_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=False store=True args: 'Barcode'
  • valid_product_ids Many2many → product.product
    compute='_compute_valid_product_ids' help='These are the products that are valid for this rule.' args: 'product.product', 'Valid Products'
Public methods (0)

No public methods.

New fields (1)
  • gift_card_settings Selection
    default='create_set' help='Defines the way you want to set your gift cards.' string='Gift Cards settings' args: [('create_set', 'Generate PDF cards'), ('scan_use', 'Scan existing cards')]
Public methods (1)
  • use_coupon_code(self, code, creation_date, partner_id, pricelist_id)

New fields (0)

No new fields.

Public methods (2)
  • 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_id Many2one → loyalty.card
    help='The coupon used to claim that reward.' ondelete='restrict' args: 'loyalty.card', 'Coupon'
  • is_reward_line Boolean
    help='Whether this line is part of a reward or not.'
  • points_cost Float
    help='How many point this reward cost on the coupon.'
  • reward_id Many2one → loyalty.reward
    help='The reward associated with this line.' ondelete='restrict' args: 'loyalty.reward', 'Reward'
  • reward_identifier_code Char
    help='\n Technical field used to link multiple reward lines from the same reward together.\n '
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_pos_ui_res_partner_by_params(self, custom_search_params)

New fields (1)
  • pos_gift_card_settings Selection
    readonly=False related='pos_config_id.gift_card_settings'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/pos_loyalty
VERSION
VERSION 2.0
CATEGORY
CATEGORYSales/Point Of Sale
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Pierre Masereel, Xavier-Do, Victor Feyens, Akim Juillerat, Joseph Caburnay, Ivan Yelizariev, Gorash, William Braeckman, roen-odoo, pedrambiria, Jacky (trj), MerlinGuillaume, hungbui, Yolann Sabaux, Vishnu Vanneri, Aurelien van Delft (avd), rhe-odoo, niyasraphy, Moises Lopez - https://www.vauxoo.com/, David Monnom (moda), Pedram (PEBR), Maruan Aguerdouh (magm), AH-Yussef, Sarah Bellefroid, Pedram (pebr), adda-odoo, Adrien Guilliams (adgu), Zachary Hanham, Paul Stroobant, Louis (loti), axtr, kcv-odoo, dere-odoo, Martin Trigaux (mat), Abdessamad Zouiten (abzo), tau, Juan Carlos B, Jitendra Prajapat, paan-odoo, David Monnom
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - loyalty
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - point_of_sale
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - account
    - analytic
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
loyalty_card_view_form_inherit_pos_loyalty loyalty.card.view.form.inherit.pos.loyalty loyalty.card xpath Inherits loyalty.loyalty_card_view_form
loyalty_mail_view_tree_inherit_pos_loyalty loyalty.mail.view.tree.inherit.pos.loyalty loyalty.mail field Inherits loyalty.loyalty_mail_view_tree
loyalty_program_view_form_inherit_pos_loyalty loyalty.program.view.form.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_form
loyalty_program_view_tree_inherit_pos_loyalty loyalty.program.view.tree.inherit.pos.loyalty loyalty.program field Inherits loyalty.loyalty_program_view_tree
res_config_view_form_inherit_pos_loyalty res.config.settings.view.form.inherit.pos_loyalty res.config.settings xpath Inherits point_of_sale.res_config_settings_view_form
Models touched (11)

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

No public methods.

New fields (1)
  • source_pos_order_id Many2one → pos.order
    help='PoS order where this coupon was generated.' args: 'pos.order', 'PoS Order Reference'
Public methods (0)

No public methods.

New fields (1)
  • pos_report_print_id Many2one → ir.actions.report
    domain=[('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'
Public methods (0)

No public methods.

New fields (4)
  • pos_config_ids Many2many → pos.config
    compute='_compute_pos_config_ids' help='Restrict publishing to those shops.' readonly=False store=True string='Point of Sales' args: 'pos.config'
  • pos_ok Boolean
    default=True args: 'Point of Sale'
  • pos_order_count Integer
    compute='_compute_pos_order_count' args: 'PoS Order Count'
  • pos_report_print_id Many2one → ir.actions.report
    compute='_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=False string='Print Report' args: 'ir.actions.report'
Public methods (1)
  • action_view_pos_orders(self)

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)

New fields (3)
  • any_product Boolean
    compute='_compute_valid_product_ids' help='Technical field, whether all product match'
  • promo_barcode Char
    compute='_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=False store=True args: 'Barcode'
  • valid_product_ids Many2many → product.product
    compute='_compute_valid_product_ids' help='These are the products that are valid for this rule.' args: 'product.product', 'Valid Products'
Public methods (0)

No public methods.

New fields (1)
  • gift_card_settings Selection
    default='create_set' help='Defines the way you want to set your gift cards.' string='Gift Cards settings' args: [('create_set', 'Generate PDF cards'), ('scan_use', 'Scan existing cards')]
Public methods (1)
  • use_coupon_code(self, code, creation_date, partner_id)

New fields (0)

No new fields.

Public methods (2)
  • 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_id Many2one → loyalty.card
    help='The coupon used to claim that reward.' ondelete='restrict' args: 'loyalty.card', 'Coupon'
  • is_reward_line Boolean
    help='Whether this line is part of a reward or not.'
  • points_cost Float
    help='How many point this reward cost on the coupon.'
  • reward_id Many2one → loyalty.reward
    help='The reward associated with this line.' ondelete='restrict' args: 'loyalty.reward', 'Reward'
  • reward_identifier_code Char
    help='\n Technical field used to link multiple reward lines from the same reward together.\n '
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_pos_ui_res_partner_by_params(self, custom_search_params)

New fields (1)
  • pos_gift_card_settings Selection
    readonly=False related='pos_config_id.gift_card_settings'
Public methods (0)

No public methods.