runbot/forwardport/data/views.xml
Xavier Morel 53e46001ba [IMP] runbot_merge, forwardport: notify when main crons are off
During freezes it can be useful to notify viewers that nothing is
going to forward port or merge for a while, and that this is
intentional (not something that's broken).

Fixes #307
2020-02-11 08:07:57 +01:00

73 lines
3.2 KiB
XML

<odoo>
<template id="dashboard" inherit_id="runbot_merge.dashboard">
<xpath expr="//div[@id='alerts']">
<t t-set="fpcron" t-value="env(user=1).ref('forwardport.port_forward')"/>
<div t-if="not fpcron.active" class="alert alert-warning col-12" role="alert">
Forward-port is disabled, merged pull requests will not be forward-ported.
</div>
</xpath>
</template>
<record model="ir.ui.view" id="project">
<field name="name">Show forwardport project fields</field>
<field name="inherit_id" ref="runbot_merge.runbot_merge_form_project"/>
<field name="model">runbot_merge.project</field>
<field name="arch" type="xml">
<xpath expr="//sheet/group[2]" position="after">
<group string="Forwardport Configuration">
<group>
<field string="Token" name="fp_github_token"/>
</group>
<group>
<field string="Bot Name" name="fp_github_name"/>
<field string="Bot Email" name="fp_github_email"/>
</group>
</group>
</xpath>
<xpath expr="//field[@name='repo_ids']/tree" position="inside">
<field string="FP remote" name="fp_remote_target"
help="Repository where forward port branches will be created"
/>
</xpath>
<xpath expr="//field[@name='branch_ids']/tree" position="inside">
<field name="fp_target" string="FP to"
help="This branch will be forward-ported to (from lower ones)"
/>
<field name="fp_sequence" string="FP sequence"
help="Overrides the normal sequence"
/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="pr">
<field name="name">Show forwardport PR fields</field>
<field name="inherit_id" ref="runbot_merge.runbot_merge_form_prs"/>
<field name="model">runbot_merge.pull_requests</field>
<field name="arch" type="xml">
<xpath expr="//sheet/group[2]" position="after">
<separator string="Forwardported" attrs="{'invisible': [('source_id', '=', False)]}"/>
<group attrs="{'invisible': [('source_id', '=', False)]}">
<group>
<field string="Original PR" name="source_id"/>
</group>
<group attrs="{'invisible': [('parent_id', '=', False)]}">
<field name="parent_id"/>
</group>
<group colspan="4" attrs="{'invisible': [('parent_id', '!=', False)]}">
<span>
Detached from forward porting (either conflicting
or explicitly updated).
</span>
</group>
<group>
<field string="Forward ported up to" name="limit_id"/>
</group>
</group>
</xpath>
</field>
</record>
</odoo>