runbot/runbot_merge/views/batch.xml
Xavier Morel ccca46c992 [FIX] runbot_merge: layout backend issues galore
- Odoo 17 seems to not be adjusting `nolabel` fields to be `colspan=2`
  by default, so every such occurrence has to be adjusted by hand or
  it gets squeezed in just the labels column.
- Because of the loss of readonly mode, some fields / setups which
  previously looked ugly during the rare edition (e.g. Pr titles) now
  look ugly all the time. Rework layout and force them to always be
  readonly (hopefully we won't need to edit those).
- This is compounded by unfortunate styling I can't find how to
  override e.g. char fields are 100% width even if readonly.
- `<header>` system requires some workarounds to have the right layout
  and spacing (notably `header` has a bunch of awful rules which we
  need to work around via an interstitial div to set up our own
  flexbox).
2024-08-16 15:12:04 +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" invisible="merge_date"/>
<field name="skipchecks" invisible="merge_date"/>
<field name="cancel_staging" invisible="merge_date"/>
<field name="fw_policy"/>
</group>
<group>
<field name="blocked"/>
</group>
</group>
<group string="Pull Requests">
<group colspan="4">
<field colspan="2" name="all_prs" nolabel="1" readonly="1">
<tree>
<button type="object" name="get_formview_action" icon="fa-external-link" title="open PR"/>
<field name="display_name"/>
<field name="repository"/>
<field name="state"/>
</tree>
</field>
</group>
</group>
<group string="Genealogy">
<group colspan="4">
<field colspan="2" name="genealogy_ids" nolabel="1" readonly="1">
<tree decoration-muted="id == parent.id">
<button type="object" name="get_formview_action" icon="fa-external-link" title="open batch"/>
<field name="name"/>
<field name="target"/>
<field name="all_prs" widget="many2many_tags"/>
</tree>
</field>
</group>
</group>
<group string="Stagings">
<group colspan="4">
<field colspan="2" name="staging_ids" nolabel="1" readonly="1">
<tree>
<button type="object" name="get_formview_action" icon="fa-external-link" title="open staging"/>
<field name="staged_at"/>
<field name="state"/>
<field name="reason"/>
</tree>
</field>
</group>
</group>
</sheet>
</form>
</field>
</record>
</odoo>