[FIX] runbot: fix frontend urls to backend

Urls are broken after 18.0 upgrade
This commit is contained in:
William Braeckman 2024-12-09 15:05:44 +01:00
parent cfae7ddafe
commit f6b66fcc98
7 changed files with 17 additions and 9 deletions

View File

@ -19,7 +19,7 @@
<data noupdate="1">
<record model="ir.config_parameter" id="runbot.runbot_upgrade_exception_message">
<field name="key">runbot.runbot_upgrade_exception_message</field>
<field name="value">Upgrade exception [#{exception.id}]({base_url}/web/#id={exception.id}&amp;view_type=form&amp;model=runbot.upgrade.exception) added\
<field name="value">Upgrade exception [#{exception.id}]({base_url}/odoo/runbot.upgrade.exception/{exception.id}) added\
{exception.elements}
</field>
</record>

View File

@ -12,7 +12,8 @@
<td>
<a t-out="batch.bundle_id.name" t-attf-href="/runbot/bundle/{{batch.bundle_id.id}}"/>
&amp;emsp;
<a groups="runbot.group_runbot_advanced_user" t-attf-href="/web/#id={{batch.id}}&amp;view_type=form&amp;model=runbot.batch&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default btn-sm" target="new" title="View Batch in Backend">
<a groups="runbot.group_runbot_advanced_user"
t-attf-href="/odoo/runbot.batch/{{batch.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default btn-sm" target="new" title="View Batch in Backend">
<i class="fa fa-list"/>
</a>
</td>

View File

@ -11,7 +11,8 @@
<span class="text-muted"><t t-out="branch.remote_id.short_name"/>:</span><t t-out="branch.name"/> <i t-if="not branch.alive" title="deleted/closed" class="fa fa-ban text-danger"/>
<div class="btn-group" role="group">
<a t-att-href="branch.branch_url" class="btn btn-sm text-start" title="View Branch on Github"><i class="fa fa-github"/></a>
<a groups="runbot.group_runbot_admin" class="btn btn-sm fa fa-list text-start" t-attf-href="/web/#id={{branch.id}}&amp;view_type=form&amp;model=runbot.branch" target="new" title="View Branch in Backend"/>
<a groups="runbot.group_runbot_admin" class="btn btn-sm fa fa-list text-start"
t-attf-href="/odoo/runbot.branch/{{branch.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View Branch in Backend"/>
</div>
</h3>
</div>

View File

@ -35,7 +35,8 @@
</div>
<div class="col">
<a t-att-href="build_error.last_seen_build_id.build_url" t-attf-title="View last affected build ({{build_error.last_seen_build_id.id}})"><i class="fa fa-external-link"/></a>
<a groups="base.group_user" t-attf-href="/web/#id={{build_error.id}}&amp;view_type=form&amp;model=runbot.build.error&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View in Backend">
<a groups="base.group_user"
t-attf-href="/odoo/runbot.build.error/{{build_error.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View in Backend">
<span class="badge text-bg-info" t-out="build_error.build_count" t-attf-title="This error was seen {{build_error.build_count}} View in backend"/>
</a>
<span groups="!base.group_user" class="badge text-bg-info" t-out="build_error.build_count" t-attf-title="This error was seen {{build_error.build_count}}"/>
@ -111,7 +112,8 @@
<div t-if="team" class='col-md-12'>
<div class="col-lg-12 text-center mb16">
<h2>Team <t t-out="team.name.capitalize()"/>
<a groups="base.group_user" t-attf-href="/web/#id={{team.id}}&amp;view_type=form&amp;model=runbot.team&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View in Backend">
<a groups="base.group_user"
t-attf-href="/odoo/runbot.team/{{team.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View in Backend">
<i class="fa fa-list"/>
</a>
</h2>

View File

@ -11,7 +11,8 @@
<t t-out="bundle.name"/>
<i t-if="bundle.sticky" class="fa fa-star" style="color: #f0ad4e" />
<div class="btn-group" role="group">
<a groups="runbot.group_runbot_advanced_user" t-attf-href="/web/#id={{bundle.id}}&amp;view_type=form&amp;model=runbot.bundle&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default" target="new" title="View in Backend">
<a groups="runbot.group_runbot_advanced_user"
t-attf-href="/odoo/runbot.bundle/{{bundle.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" class="btn btn-default" target="new" title="View in Backend">
<i class="fa fa-list"/>
</a>
<a groups="runbot.group_runbot_advanced_user" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force" title="Force A New Batch">
@ -67,7 +68,8 @@
<div class="btn-toolbar mb-1" role="toolbar">
<div class="btn-group btn-group-ssm" role="group">
<a t-att-href="branch.branch_url" class="btn btn-default text-start" title="View Branch on Github"><i class="fa fa-github"/></a>
<a groups="runbot.group_runbot_admin" class="btn btn-default fa fa-list text-start" t-attf-href="/web/#id={{branch.id}}&amp;view_type=form&amp;model=runbot.branch" target="new" title="View Branch in Backend"/>
<a groups="runbot.group_runbot_admin" class="btn btn-default fa fa-list text-start"
t-attf-href="/odoo/runbot.branch/{{branch.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View Branch in Backend"/>
<a href="#" t-out="branch.remote_id.short_name" class="btn btn-default disabled text-start"/>
<a t-attf-href="/runbot/branch/{{branch.id}}" class="btn btn-default text-start" title="View Branch Details"><span t-att-class="'' if branch.alive else 'line-through'" t-out="branch.name"/> <i t-if="not branch.alive" title="deleted/closed" class="fa fa-ban text-danger"/></a>
<t t-if="not any (b.is_pr and b.alive for b in group[1]) and not branch.is_pr">

View File

@ -32,7 +32,8 @@
<t t-out="commit.name"/>
<div class="btn-group" role="group">
<a t-att-href="'' if not reflogs else 'https://%s/commit/%s' % (reflogs[0].branch_id.remote_id.base_url, commit.name)" class="btn btn-sm text-start" title="View Commit on Github"><i class="fa fa-github"/></a>
<a groups="runbot.group_runbot_admin" class="btn btn-sm fa fa-list text-start" t-attf-href="/web/#id={{commit.id}}&amp;view_type=form&amp;model=runbot.commit" target="new" title="View Commit in Backend"/>
<a groups="runbot.group_runbot_admin" class="btn btn-sm fa fa-list text-start"
t-attf-href="/odoo/runbot.commit/{{commit.id}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new" title="View Commit in Backend"/>
</div>
</td>
</tr>

View File

@ -365,7 +365,8 @@
<i class="fa fa-search"/>
Find similar builds
</a>
<a class="dropdown-item" t-attf-href="/web/#id={{bu['id']}}&amp;view_type=form&amp;model=runbot.build&amp;menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new">
<a class="dropdown-item"
t-attf-href="/odoo/runbot.build/{{bu['id']}}?menu_id={{env['ir.model.data']._xmlid_to_res_id('runbot.runbot_menu_root')}}" target="new">
<i class="fa fa-list"/>
View in backend
</a>