-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] runbot: introduce matrix for upgrade
The initial way to configure upgrades was working fine and automatically but does not alway match the reality of what should be supported. Saying, upgrade from the last main version and last intermediate (for 18, from 17.0 and 17.4) we may also want to test from 17.2 because for some reason there are many people in 17.2 taht will need to upgrade in 18.0. But the transition 17.2->17.3 doesn't make sense anymore after a while since people will go in 18 imediatly at some point. This matrix can be generated automatically from the parameters and new versions should appear automatically, but it is possible to tweak the values on demand.
- Loading branch information
Showing
9 changed files
with
300 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<templates xml:space="preserve"> | ||
|
||
<t t-name="runbot.Matrixx2ManyField"> | ||
<table class="table table-sm"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th class="thead-dark" t-foreach="to_versions" t-as="to_version" t-esc="to_version" t-key="to_version"/> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr t-foreach="from_versions" t-as="from_version" t-key="from_version"> | ||
<th class="thead-dark" t-esc="from_version"/> | ||
<t t-foreach="to_versions" t-as="to_version" t-key="to_version"> | ||
<t t-set="entry" t-value="getEntry(from_version, to_version)"/> | ||
<td t-att-style="entry and entry.data.manually_edited ? 'background-color: #CCC' : ''"> | ||
<span t-if="entry" > | ||
<BooleanToggleField name="'enabled'" record="entry"/> | ||
</span> | ||
</td> | ||
</t> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</t> | ||
|
||
</templates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<odoo> | ||
<data> | ||
<record id="runbot_upgrade_matrix_form" model="ir.ui.view"> | ||
<field name="name">runbot.upgrade.matrix.form</field> | ||
<field name="model">runbot.upgrade.matrix</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<header> | ||
<button name="update_matrix_entries" string="Create missing entries" type="object" class="oe_highlight"/> | ||
<button name="reset_matrix_enabled" string="Reset matrix entries default enabled state" type="object" class="oe_highlight"/> | ||
</header> | ||
<group > | ||
<group > | ||
<field name="name"/> | ||
<field name="project_id"/> | ||
<field name="auto_update"/> | ||
</group > | ||
<group > | ||
<field name="upgrade_to_major_versions"/> | ||
<field name="upgrade_to_all_versions"/> | ||
<field name="upgrade_from_previous_major_version"/> | ||
<field name="upgrade_from_last_intermediate_version"/> | ||
<field name="upgrade_from_all_intermediate_version"/> | ||
|
||
</group > | ||
</group > | ||
<group > | ||
|
||
<field name="entry_ids" widget="version_matrix"> | ||
<list> | ||
<field name="from_version_id"/> | ||
<field name="to_version_id"/> | ||
<field name="to_version_number"/> | ||
<field name="from_version_number"/> | ||
<field name="enabled" widget="boolean_toggle"/> | ||
<field name="manually_edited"/> | ||
</list> | ||
</field> | ||
|
||
<field name="entry_ids"> | ||
<list> | ||
<field name="from_version_id"/> | ||
<field name="to_version_id"/> | ||
<field name="enabled" widget="boolean_toggle"/> | ||
</list> | ||
</field> | ||
|
||
</group> | ||
</sheet> | ||
<chatter/> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="runbot_upgrade_matrix_tree" model="ir.ui.view"> | ||
<field name="name">runbot.upgrade.matrix.tree</field> | ||
<field name="model">runbot.upgrade.matrix</field> | ||
<field name="arch" type="xml"> | ||
<list string="Upgrade matrix"> | ||
<field name="name" optional="show" readonly="1"/> | ||
<field name="project_id" optional="hide" readonly="1"/> | ||
</list> | ||
</field> | ||
</record> | ||
|
||
<record id="open_view_runbot_upgrade_matrix_tree" model="ir.actions.act_window"> | ||
<field name="name">Upgrade matrix</field> | ||
<field name="res_model">runbot.upgrade.matrix</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</data> | ||
</odoo> |