Skip to content
Permalink
Browse files

📺 odoo_backup_sh: added download backup button on form

  • Loading branch information...
em230418 committed Aug 19, 2019
1 parent 85f7b1f commit cfd108a9fa7aea535fe58518aabcfbccd2076717
Showing with 10 additions and 11 deletions.
  1. +10 −11 odoo_backup_sh/views/odoo_backup_sh_views.xml
@@ -72,6 +72,15 @@ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
<field name="code">action = model.action_dashboard_redirect()</field>
</record>

<record model="ir.actions.server" id="download_backup">
<field name="name">Download backup</field>
<field name="model_id" ref="model_odoo_backup_sh_backup_info"/>
<field name="state">code</field>
<field name="code">
action = model.download_backup_action()
</field>
</record>

<!--
Show information about a Storage Service of Database after install additional modules only.
Additional modules:
@@ -91,6 +100,7 @@ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
<field name="encrypted"/>
<field name="backup_size" widget="float"/>
</group>
<button class="btn btn-dark" type="action" name="%(download_backup)d" groups="odoo_backup_sh.group_manager">Download backup</button>
</sheet>
</form>
</field>
@@ -369,17 +379,6 @@ License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
src_model="odoo_backup_sh.backup_info" res_model="odoo_backup_sh.delete_remote_backup_wizard"
view_type="form" view_mode="form" key2="client_action_multi" target="new"/>

<record model="ir.actions.server" id="download_backup">
<field name="name">Download backup</field>
<field name="model_id" ref="model_odoo_backup_sh_backup_info"/>
<field name="binding_model_id" ref="model_odoo_backup_sh_backup_info"/>
<field name="state">code</field>
<field name="condition">True</field>
<field name="code">
action = model.download_backup_action()
</field>
</record>

<menuitem name="Backups" id="menu_backup_root" sequence="100" web_icon="odoo_backup_sh,static/description/icon.png"/>
<menuitem name="Dashboard" action="odoo_backup_sh.ir_actions_server_backup_dashboard" parent="menu_backup_root"
id="menu_dashboard" sequence="1"/>

0 comments on commit cfd108a

Please sign in to comment.
You can’t perform that action at this time.