Health
64/100
fair
-
Security25/25No findings
-
Activity12/25Last human commit 16 months ago
-
Required by15/251 module depends on it
-
Maturity12/25In 2 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_idsOne2many → loyalty.reward.product_linecomodel_name='loyalty.reward.product_line'inverse_name='reward_id'string='Gift list' -
multi_giftBooleancompute='_compute_multi_gift' -
reward_typeSelectionondelete={'multi_gift': 'set default'}selection_add=[('multi_gift', 'Multi Gift')]
-
write(self, vals)Avoid duplicating the multi gift lines when updating the reward
New fields (4)
-
reward_default_product_idMany2one → product.productcomodel_name='product.product'compute='_compute_reward_default_product_id'readonly=False -
reward_idMany2one → loyalty.rewardcomodel_name='loyalty.reward' -
reward_product_idsMany2many → product.productcomodel_name='product.product'help='Reward Product'string='Gift Options' -
reward_product_quantityIntegerhelp='Reward product quantity'string='Quantity'
-
onchange_reward_product_ids(self)@api.onchange('reward_product_ids')
Loading…
Loading…