Skip to content

Commit 1a8bfdb

Browse files
committed
fix(spp_scoring): duplicate scoring model copies indicators and thresholds
Added copy=True to indicator_ids and threshold_ids One2many fields so that Action > Duplicate copies indicators and thresholds to the new model. The existing copy() method already handles code suffix and deactivation.
1 parent 2720864 commit 1a8bfdb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

spp_scoring/models/scoring_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ class SppScoringModel(models.Model):
116116
comodel_name="spp.scoring.indicator",
117117
inverse_name="model_id",
118118
string="Indicators",
119+
copy=True,
119120
)
120121
threshold_ids = fields.One2many(
121122
comodel_name="spp.scoring.threshold",
122123
inverse_name="model_id",
123124
string="Thresholds",
125+
copy=True,
124126
)
125127
result_ids = fields.One2many(
126128
comodel_name="spp.scoring.result",

0 commit comments

Comments
 (0)