Skip to content

Commit

Permalink
Merge 6abaf83 into 8dc3c1d
Browse files Browse the repository at this point in the history
  • Loading branch information
luisg123v committed May 29, 2018
2 parents 8dc3c1d + 6abaf83 commit 0b7b666
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions runbot_travis2docker/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"views/runbot_build_view.xml",
"views/runbot_branch_view.xml",
"data/ir_cron_data.xml",
"templates/build.xml",
],
"demo": [
"demo/runbot_repo_demo.xml",
Expand Down
35 changes: 35 additions & 0 deletions runbot_travis2docker/templates/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="build_button_inherit" inherit_id="runbot.build_button">
<!-- This removes the db name parameter from the URL, if it's a t2d build, because the name won't match.
We look for the full URL because, if it changes in the future, it should fail.
-->
<xpath
expr="(//a[@t-attf-href=&quot;http://{{bu['domain']}}/?db={{bu['real_dest']}}-all&quot;])[2]"
position="attributes">
<attribute
name="t-attf-href"
remove="db={{bu['real_dest']}}-all"
add="{{'' if repo.is_travis2docker_build else 'db=%s-all' % bu['real_dest']}}"
separator="?"/>
</xpath>
<xpath
expr="(//a[@t-attf-href=&quot;http://{{bu['domain']}}/?db={{bu['real_dest']}}-all&quot;])[1]"
position="attributes">
<attribute
name="t-attf-href"
remove="db={{bu['real_dest']}}-all"
add="{{'' if repo.is_travis2docker_build else 'db=%s-all' % bu['real_dest']}}"
separator="?"/>
</xpath>

<!-- Hides the button if t2d was used, because the db *-base is not produced -->
<xpath
expr="//a[@t-attf-href=&quot;http://{{bu['domain']}}/?db={{bu['real_dest']}}-base&quot;]/.."
position="attributes">
<attribute name="t-if" add="repo.is_travis2docker_build" separator=" and "/>
</xpath>
</template>

</odoo>

0 comments on commit 0b7b666

Please sign in to comment.