mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[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).
This commit is contained in:
parent
14a2b0068d
commit
e403593799
@ -396,12 +396,12 @@ class PullRequests(models.Model):
|
|||||||
staging_id = fields.Many2one('runbot_merge.stagings', compute='_compute_staging', store=True)
|
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})
|
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):
|
def _compute_staging(self):
|
||||||
for p in self:
|
for p in self:
|
||||||
p.staging_id = p.batch_id.staging_ids.filtered('active')
|
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):
|
def _compute_stagings(self):
|
||||||
for p in self:
|
for p in self:
|
||||||
p.staging_ids = p.batch_id.staging_ids
|
p.staging_ids = p.batch_id.staging_ids
|
||||||
|
Loading…
Reference in New Issue
Block a user