From e403593799740d3eec278e6eeae72c11dc818020 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 10 Jun 2024 14:31:02 +0200 Subject: [PATCH] [FIX] runbot_merge: incorrect computation dependencies `Batch.staging_ids` is a computed field, it can't be used as a dependency for an other compute (at least not in 15.0). --- runbot_merge/models/pull_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index 7cdc6a38..a40db2d8 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -396,12 +396,12 @@ class PullRequests(models.Model): staging_id = fields.Many2one('runbot_merge.stagings', compute='_compute_staging', store=True) staging_ids = fields.Many2many('runbot_merge.stagings', string="Stagings", compute='_compute_stagings', context={"active_test": False}) - @api.depends('batch_id.staging_ids.active') + @api.depends('batch_id.batch_staging_ids.runbot_merge_stagings_id.active') def _compute_staging(self): for p in self: p.staging_id = p.batch_id.staging_ids.filtered('active') - @api.depends('batch_id.staging_ids') + @api.depends('batch_id.batch_staging_ids.runbot_merge_stagings_id') def _compute_stagings(self): for p in self: p.staging_ids = p.batch_id.staging_ids