Skip to content
Health
64/100
fair
  • Security25/25
    No findings
  • Activity12/25
    Last human commit 16 months ago
  • Required by15/25
    1 module depends on it
  • Maturity12/25
    In 2 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
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis 0 migration notes 3 models 3 views 0 HTTP endpoints

Description

This module allows to define multiple reward products on promotions.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
sale_loyalty_multi_gift

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 3

XML IDNameModelTypeStatus
loyalty_reward_view_form loyalty.reward form Inherits loyalty.loyalty_reward_view_form
loyalty_reward_view_form loyalty.reward form Inherits loyalty.loyalty_reward_view_form
loyalty_reward_view_kanban_multi_gift loyalty.reward kanban Inherits loyalty.loyalty_reward_view_kanban

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 3

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    In https://github.com/odoo/odoo/blob/69b1993fb45b76110c24f5189a0ecfe9eb59a2aa /addons/loyalty/models/loyalty_program.py#L409 there is a call convert_to_cache on reward_ids that causes that one2many create commands are called twice and thus we get a duplicated record.

New fields (3)
  • loyalty_multi_gift_ids One2many → loyalty.reward.product_line
    comodel_name='loyalty.reward.product_line' inverse_name='reward_id' string='Gift list'
  • multi_gift Boolean
    compute='_compute_multi_gift'
  • reward_type Selection
    ondelete={'multi_gift': 'set default'} selection_add=[('multi_gift', 'Multi Gift')]
Public methods (1)
  • write(self, vals)
    Avoid duplicating the multi gift lines when updating the reward

New fields (4)
  • reward_default_product_id Many2one → product.product
    comodel_name='product.product' compute='_compute_reward_default_product_id' readonly=False
  • reward_id Many2one → loyalty.reward
    comodel_name='loyalty.reward'
  • reward_product_ids Many2many → product.product
    comodel_name='product.product' help='Reward Product' string='Gift Options'
  • reward_product_quantity Integer
    help='Reward product quantity' string='Quantity'
Public methods (1)
  • onchange_reward_product_ids(self)
    @api.onchange('reward_product_ids')

Loading…

Loading…