mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot_merge: a few backend screens
- override the staging's name_get to provide a slightly more useful display_name (though still not great as the staging object remains quite technical and inimical to human interaction) - show individual PRs in a batch (as m2m tags) for readability - update PR views to show the author and reviewer, except in the list of delegations of users where it's a lot less useful /cc #632
This commit is contained in:
parent
0c882fc0df
commit
c3b90454a2
@ -1683,6 +1683,17 @@ class Stagings(models.Model):
|
|||||||
|
|
||||||
statuses = fields.Binary(compute='_compute_statuses')
|
statuses = fields.Binary(compute='_compute_statuses')
|
||||||
|
|
||||||
|
def name_get(self):
|
||||||
|
return [
|
||||||
|
(staging.id, "%d (%s, %s%s)" % (
|
||||||
|
staging.id,
|
||||||
|
staging.target.name,
|
||||||
|
staging.state,
|
||||||
|
(', ' + staging.reason) if staging.reason else '',
|
||||||
|
))
|
||||||
|
for staging in self
|
||||||
|
]
|
||||||
|
|
||||||
@api.depends('heads')
|
@api.depends('heads')
|
||||||
def _compute_statuses(self):
|
def _compute_statuses(self):
|
||||||
""" Fetches statuses associated with the various heads, returned as
|
""" Fetches statuses associated with the various heads, returned as
|
||||||
|
@ -77,6 +77,8 @@
|
|||||||
<field name="number"/>
|
<field name="number"/>
|
||||||
<field name="target"/>
|
<field name="target"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
|
<field name="author"/>
|
||||||
|
<field name="reviewed_by"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -198,7 +200,8 @@
|
|||||||
<group string="Batches">
|
<group string="Batches">
|
||||||
<field name="batch_ids" colspan="4" nolabel="1">
|
<field name="batch_ids" colspan="4" nolabel="1">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="prs"/>
|
<field name="prs" widget="many2many_tags"
|
||||||
|
options="{'no_quick_create': True}"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
|
@ -70,7 +70,14 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<group colspan="4" string="Delegate On">
|
<group colspan="4" string="Delegate On">
|
||||||
<field name="delegate_reviewer" nolabel="1"/>
|
<field name="delegate_reviewer" nolabel="1">
|
||||||
|
<tree>
|
||||||
|
<field name="repository"/>
|
||||||
|
<field name="number"/>
|
||||||
|
<field name="target"/>
|
||||||
|
<field name="state"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
Loading…
Reference in New Issue
Block a user