Skip to content
Health
95/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by20/25
    2 modules depend on it
  • Maturity25/25
    In 5 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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 IDNameModelTypeStatus
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)
  • 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
    comodel_name='pos.order' help='The POS order from which coupon is generated' index='btree_not_null' readonly=True string='POS Order Reference'
Public methods (1)
  • get_card_status(self, code, config_id)
    @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 string='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 products 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 (0)

No public methods.

New fields (4)
  • active_payment_programs Json
    copy=False default=list
  • active_rewards Json
    copy=False default=list
  • applied_codes Json
    copy=False default=list
  • disabled_program_ids Json
    copy=False default=list
Public methods (1)
  • 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_id Many2one → loyalty.card
    help='The card used to claim that reward.' index='btree_not_null' ondelete='restrict' args: 'loyalty.card', 'Card'
  • gift_card_vals Json
    copy=False help='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_line Boolean
    help='Whether this line is part of a reward or not.'
  • points_cost Float
    help='How many points this reward cost.'
  • reward_id Many2one → loyalty.reward
    help='The reward associated with this line.' index='btree_not_null' ondelete='restrict' args: 'loyalty.reward', 'Reward'
Public methods (0)

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…