Add module update/install/cancel buttons to tree view
issue1750 review187002
This commit is contained in:
@@ -68,6 +68,14 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="website"/>
|
||||
<field name="state"/>
|
||||
<field name="description" tree_invisible="1"/>
|
||||
<button string="Mark for Upgrade" name="button_upgrade"
|
||||
type="object"/>
|
||||
<button string="Mark for Installation"
|
||||
name="button_install" type="object"/>
|
||||
<button string="Cancel Installation"
|
||||
name="button_install_cancel" type="object"/>
|
||||
<button string="Cancel Upgrade"
|
||||
name="button_upgrade_cancel" type="object"/>
|
||||
</tree>
|
||||
]]>
|
||||
</field>
|
||||
|
||||
@@ -654,6 +654,45 @@ this repository contains the full copyright notices and license terms. -->
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="module_view_tree">
|
||||
<field name="model">ir.module.module</field>
|
||||
<field name="inherit" ref="ir.module_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
<xpath
|
||||
expr="/tree/button[@name="button_install"]"
|
||||
position="replace">
|
||||
<button string="Mark for Installation"
|
||||
name="button_install" type="object"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'uninstalled')), 'readonly': Not(In(%(res.group_admin)d, Eval('groups', [])))}"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/button[@name="button_install_cancel"]"
|
||||
position="replace">
|
||||
<button string="Cancel Installation"
|
||||
name="button_install_cancel" type="object"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'to install')), 'readonly': Not(In(%(res.group_admin)d, Eval('groups', [])))}"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/button[@name="button_upgrade"]"
|
||||
position="replace">
|
||||
<button string="Mark for Upgrade"
|
||||
name="button_upgrade" type="object"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'installed')), 'readonly': Not(In(%(res.group_admin)d, Eval('groups', [])))}"/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="/tree/button[@name="button_upgrade_cancel"]"
|
||||
position="replace">
|
||||
<button string="Cancel Upgrade"
|
||||
name="button_upgrade_cancel" type="object"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'to upgrade')), 'readonly': Not(In(%(res.group_admin)d, Eval('groups', [])))}"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_cron">
|
||||
<field name="name">Scheduler</field>
|
||||
<field name="model">ir.cron</field>
|
||||
|
||||
Reference in New Issue
Block a user