2021-11-12 22:04:34 +07:00
|
|
|
<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">
|
2024-11-28 19:22:32 +07:00
|
|
|
<form>
|
2021-11-12 22:04:34 +07:00
|
|
|
<sheet>
|
|
|
|
<div class="alert alert-warning" role="alert"
|
[MERGE] bot from 16.0 to 17.0
Broken (can't run odoo at all):
- In Odoo 17.0, the `pre_init_hook` takes an env, not a cursor, update
`_check_citext`.
- Odoo 17.0 rejects `@attrs` and doesn't say where they are or how to
update them, fun, hunt down `attrs={'invisible': ...` and try to fix
them.
- Odoo 17.0 warns on non-multi creates, update them, most were very
reasonable, one very wasn't.
Test failures:
- Odoo 17.0 deprecates `name_get` and doesn't use it as a *source*
anymore, replace overrides by overrides to `_compute_display_name`.
- Multiple tracking changes:
- `_track_set_author` takes a `Partner` not an id.
- `_message_compute_author` still requires overriding in order to
handle record creation, which in standard doesn't support author
overriding.
- `mail.tracking.value.field_type` has been removed, the field type
now needs to be retrieved from the `field_id`.
- Some tracking ordering have changed and require adjusting a few
tests.
Also added a few flushes before SQL queries which are not (obviously
at least) at the start of a cron or controller, no test failure
observed but better safe than sorry (probably).
2024-08-12 18:13:03 +07:00
|
|
|
invisible="not errors">
|
2021-11-12 22:04:34 +07:00
|
|
|
<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}"/>
|
2023-01-24 13:41:14 +07:00
|
|
|
<field name="pr_state_key" readonly="1"/>
|
2021-11-12 22:04:34 +07:00
|
|
|
</group>
|
|
|
|
</group>
|
2022-12-07 15:25:55 +07:00
|
|
|
<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">
|
2023-01-24 17:14:52 +07:00
|
|
|
<tree editable="bottom">
|
[FIX] runbot_merge: make freeze wizard labels lookup not shit
I DECLARE BANKRUPTCY!!!
The previous implementation of labels lookup was really not
intuitive (it was just a char field, and matched labels by equality
including the owner tag), and was also full of broken edge
cases (e.g. traceback if a label matched multiple PRs in the same repo
because people reuse branch names).
Tried messing about with contextual `display_name` and `name_search`
on PRs but the client goes wonky in that case, and there is no clean
autocomplete for non-relational fields.
So created a view which reifies labels, and that can be used as the
basis for our search. It doesn't have to be maintained by hand, can be
searched somewhat flexibly, we can add new view fields in the future
if desirable, and it seems to work fine providing a nice
understandable UX, with the reliability of using a normal Odoo model
the normal way.
Also fixed the handling of bump PRs, clearly clearing the entire field
before trying to update existing records (even with a link_to
inbetween) is not the web client's fancy, re-selecting the current
label would just empty the thing entirely.
So use a two-step process slightly closer to the release PRs instead:
- first update or delete the existing bump PRs
- then add the new ones
The second part is because bump PRs are somewhat less critical than
release, so it can be a bit more DWIM compared to the more deliberate
process of release PRs where first the list of repositories involved
has to be set up just so, then the PRs can be filled in each of them.
Fixes #697
2023-01-24 17:19:18 +07:00
|
|
|
<field name="repository_id" options="{'no_create': True}"/>
|
2022-12-07 15:25:55 +07:00
|
|
|
<field name="pr_id" options="{'no_create': True}"/>
|
|
|
|
<field name="label"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
2022-07-11 13:17:04 +07:00
|
|
|
</group>
|
2022-12-07 15:25:55 +07:00
|
|
|
<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>
|
2021-11-12 22:04:34 +07:00
|
|
|
</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"
|
[MERGE] bot from 16.0 to 17.0
Broken (can't run odoo at all):
- In Odoo 17.0, the `pre_init_hook` takes an env, not a cursor, update
`_check_citext`.
- Odoo 17.0 rejects `@attrs` and doesn't say where they are or how to
update them, fun, hunt down `attrs={'invisible': ...` and try to fix
them.
- Odoo 17.0 warns on non-multi creates, update them, most were very
reasonable, one very wasn't.
Test failures:
- Odoo 17.0 deprecates `name_get` and doesn't use it as a *source*
anymore, replace overrides by overrides to `_compute_display_name`.
- Multiple tracking changes:
- `_track_set_author` takes a `Partner` not an id.
- `_message_compute_author` still requires overriding in order to
handle record creation, which in standard doesn't support author
overriding.
- `mail.tracking.value.field_type` has been removed, the field type
now needs to be retrieved from the `field_id`.
- Some tracking ordering have changed and require adjusting a few
tests.
Also added a few flushes before SQL queries which are not (obviously
at least) at the start of a cron or controller, no test failure
observed but better safe than sorry (probably).
2024-08-12 18:13:03 +07:00
|
|
|
class="btn-success" invisible="errors"/>
|
2021-11-12 22:04:34 +07:00
|
|
|
<button string="Freeze" type="object" name="action_freeze"
|
[MERGE] bot from 16.0 to 17.0
Broken (can't run odoo at all):
- In Odoo 17.0, the `pre_init_hook` takes an env, not a cursor, update
`_check_citext`.
- Odoo 17.0 rejects `@attrs` and doesn't say where they are or how to
update them, fun, hunt down `attrs={'invisible': ...` and try to fix
them.
- Odoo 17.0 warns on non-multi creates, update them, most were very
reasonable, one very wasn't.
Test failures:
- Odoo 17.0 deprecates `name_get` and doesn't use it as a *source*
anymore, replace overrides by overrides to `_compute_display_name`.
- Multiple tracking changes:
- `_track_set_author` takes a `Partner` not an id.
- `_message_compute_author` still requires overriding in order to
handle record creation, which in standard doesn't support author
overriding.
- `mail.tracking.value.field_type` has been removed, the field type
now needs to be retrieved from the `field_id`.
- Some tracking ordering have changed and require adjusting a few
tests.
Also added a few flushes before SQL queries which are not (obviously
at least) at the start of a cron or controller, no test failure
observed but better safe than sorry (probably).
2024-08-12 18:13:03 +07:00
|
|
|
class="btn-primary" invisible="not errors"/>
|
2021-11-12 22:04:34 +07:00
|
|
|
<button string="Save & Close" special="save"/>
|
|
|
|
<button string="Cancel" type="object" name="action_cancel" class="btn-warning"/>
|
|
|
|
</footer>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
2022-02-07 21:15:13 +07:00
|
|
|
|
|
|
|
<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>
|
2021-11-12 22:04:34 +07:00
|
|
|
</odoo>
|