mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: active trigger and filter manual
- dont display manual trigger having a team if not member of that team - add an active field on triggers
This commit is contained in:
parent
326ac36b5e
commit
b44ed5f7a6
@ -57,6 +57,7 @@ class Trigger(models.Model):
|
||||
has_stats = fields.Boolean('Has a make_stats config step', compute="_compute_has_stats", store=True)
|
||||
|
||||
team_ids = fields.Many2many('runbot.team', string="Runbot Teams", help="Teams responsible of this trigger, mainly usefull for nightly")
|
||||
active = fields.Boolean("Active", default=True)
|
||||
|
||||
@api.depends('config_id.step_order_ids.step_id.make_stats')
|
||||
def _compute_has_stats(self):
|
||||
|
@ -121,7 +121,9 @@
|
||||
<td>Manual</td>
|
||||
<td>
|
||||
<t t-foreach="batch.slot_ids.filtered(lambda s: s.trigger_id.manual)" t-as="slot">
|
||||
<t t-call="runbot.slot_button"/>
|
||||
<t t-if="slot.build_id or (not slot.trigger_id.team_ids) or (user_id in slot.trigger_id.team_ids.user_ids)">
|
||||
<t t-call="runbot.slot_button"/>
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -8,7 +8,9 @@
|
||||
<header>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group name="repo_group">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="description"/>
|
||||
|
Loading…
Reference in New Issue
Block a user