diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index 3e706268..90da29f6 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -393,12 +393,18 @@ class PullRequests(models.Model): batch_id = fields.Many2one('runbot_merge.batch', index=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}) @api.depends('batch_id.staging_ids.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') + def _compute_stagings(self): + for p in self: + p.staging_ids = p.batch_id.staging_ids + commits_map = fields.Char(help="JSON-encoded mapping of PR commits to actually integrated commits. The integration head (either a merge commit or the PR's topmost) is mapped from the 'empty' pr commit (the key is an empty string, because you can't put a null key in json maps).", default='{}') link_warned = fields.Boolean( diff --git a/runbot_merge/views/batch.xml b/runbot_merge/views/batch.xml index 89fc3902..7d87d94f 100644 --- a/runbot_merge/views/batch.xml +++ b/runbot_merge/views/batch.xml @@ -23,6 +23,7 @@ +