mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 16:05:42 +07:00

Turns out to not work well in 17.0, and after consideration moc hasn't really used the auto-update feature (or the required-prs gate in general to be honest), usually he knows what PRs he's waiting for and only validates once he's confirmed every which way. So it's probably not worth fixing the thing. According to jpp, this should probably use something based on bus subscriptions to update just the field (though tbf the `root.update` call doesn't really seem to be "deep" anymore, so in reality rather than update the *form*'s record I should probably have tried reloading the required_pr_ids records to fetch the new color). Closes #997
84 lines
4.2 KiB
XML
84 lines
4.2 KiB
XML
<odoo>
|
|
<record id="runbot_merge_project_freeze_form" model="ir.ui.view">
|
|
<field name="name">Freeze Wizard Configuration Screen</field>
|
|
<field name="model">runbot_merge.project.freeze</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<div class="alert alert-warning" role="alert"
|
|
invisible="not errors">
|
|
<field name="errors" readonly="True"/>
|
|
</div>
|
|
<group>
|
|
<group colspan="2">
|
|
<field name="branch_name"/>
|
|
<field name="required_pr_ids" widget="many2many_tags"
|
|
options="{'color_field': 'state_color', 'no_create': True}"/>
|
|
<field name="pr_state_key" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<group string="Release">
|
|
<p colspan="2">
|
|
Release (freeze) PRs, provide the first commit
|
|
of the new branches. Each PR must have a single
|
|
commit.
|
|
</p>
|
|
<p class="alert alert-warning" role="alert" colspan="2">
|
|
These PRs will be merged directly, not staged.
|
|
</p>
|
|
<field name="release_label" colspan="2"/>
|
|
<field name="release_pr_ids" nolabel="1" colspan="2">
|
|
<tree editable="bottom">
|
|
<field name="repository_id" options="{'no_create': True}"/>
|
|
<field name="pr_id" options="{'no_create': True}"/>
|
|
<field name="label"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group string="Bump">
|
|
<p colspan="2">
|
|
Bump PRs, provide the first commit of the source
|
|
branches after the release has been cut.
|
|
</p>
|
|
<p class="alert alert-warning" role="alert" colspan="2">
|
|
These PRs will be merged directly, not staged.
|
|
</p>
|
|
<field name="bump_label" colspan="2"/>
|
|
<field name="bump_pr_ids" nolabel="1" colspan="2">
|
|
<tree editable="bottom">
|
|
<field name="repository_id" options="{'no_create': True}"/>
|
|
<field name="pr_id" options="{'no_create': True}"/>
|
|
<field name="label"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<footer>
|
|
<!--
|
|
the operator should always be able to try freezing, in
|
|
case the smart form blows up or whatever, but change
|
|
the style of the button if the form has "no errors"
|
|
-->
|
|
<button string="Freeze" type="object" name="action_freeze"
|
|
class="btn-success" invisible="errors"/>
|
|
<button string="Freeze" type="object" name="action_freeze"
|
|
class="btn-primary" invisible="not errors"/>
|
|
<button string="Save & Close" special="save"/>
|
|
<button string="Cancel" type="object" name="action_cancel" class="btn-warning"/>
|
|
</footer>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="runbot_merge_repository_freeze" model="ir.ui.view">
|
|
<field name="name">Add freeze field to repo form</field>
|
|
<field name="model">runbot_merge.repository</field>
|
|
<field name="inherit_id" ref="form_repository"/>
|
|
<field name="arch" type="xml">
|
|
<field name="branch_filter" position="after">
|
|
<field name="freeze"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
</odoo>
|