runbot/runbot_merge/views/batch.xml
Xavier Morel 7a0a6d4415 [IMP] runbot_merge: backend UI
- Update branch name to prefix with project as it can be hard to
  differentiate when filtering by or trying to set targets, given some
  targets are extremely common (e.g. `master`/`main`) and not all
  fields are filtered by project (or even can be).
- Add a proper menu item and list view for batches, maybe it'll be of
  use one day.
- Upgrade label in PR search, it's more likely to be needed than
  author or target.
- Put PRs first in the mergebot menu, as it's *by far* the most likely
  item to look for, unless it's staging in order to cancel one.
2024-07-23 13:00:19 +02:00

99 lines
4.4 KiB
XML

<odoo>
<record id="runbot_merge_action_batches" model="ir.actions.act_window">
<field name="name">Batches</field>
<field name="res_model">runbot_merge.batch</field>
<field name="view_mode">tree,form</field>
</record>
<record id="runbot_merge_batch_search" model="ir.ui.view">
<field name="name">batches search</field>
<field name="model">runbot_merge.batch</field>
<field name="arch" type="xml">
<search>
<filter name="all" domain="['|', ('active', '=', True), ('active', '=', False)]"/>
<filter name="inactive" domain="[('active', '=', False)]"/>
<field name="name"/>
<field name="target"/>
<field name="id"/>
</search>
</field>
</record>
<record id="runbot_merge_batch_tree" model="ir.ui.view">
<field name="name">batches list</field>
<field name="model">runbot_merge.batch</field>
<field name="arch" type="xml">
<tree decoration-muted="not active">
<field name="id"/>
<field name="name"/>
<field name="target"/>
<field name="prs" widget="many2many_tags"/>
<field name="blocked"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<record id="runbot_merge_batch_form" model="ir.ui.view">
<field name="name">Batch form</field>
<field name="model">runbot_merge.batch</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title"><h1><field name="name"/></h1></div>
<group>
<group>
<field name="target"/>
<field name="merge_date"/>
<field name="priority" attrs="{'invisible': [('merge_date', '!=', False)]}"/>
<field name="skipchecks" widget="boolean_toggle" attrs="{'invisible': [('merge_date', '!=', False)]}"/>
<field name="cancel_staging" widget="boolean_toggle" attrs="{'invisible': [('merge_date', '!=', False)]}"/>
<field name="fw_policy"/>
</group>
<group>
<field name="blocked"/>
</group>
</group>
<group string="Pull Requests">
<group colspan="4">
<field name="all_prs" nolabel="1" readonly="1">
<tree>
<button type="object" name="get_formview_action" icon="fa-external-link"/>
<field name="display_name"/>
<field name="repository"/>
<field name="state"/>
</tree>
</field>
</group>
</group>
<group string="Genealogy">
<group colspan="4">
<field name="genealogy_ids" nolabel="1" readonly="1">
<tree decoration-muted="id == parent.id">
<button type="object" name="get_formview_action" icon="fa-external-link"/>
<field name="name"/>
<field name="target"/>
<field name="all_prs" widget="many2many_tags"/>
</tree>
</field>
</group>
</group>
<group string="Stagings">
<group colspan="4">
<field name="staging_ids" nolabel="1" readonly="1">
<tree>
<button type="object" name="get_formview_action" icon="fa-external-link"/>
<field name="staged_at"/>
<field name="state"/>
<field name="reason"/>
</tree>
</field>
</group>
</group>
</sheet>
</form>
</field>
</record>
</odoo>