Change states on button to use the same way than fields
This commit is contained in:
@@ -35,20 +35,20 @@
|
||||
<field name="state" readonly="1"/>
|
||||
<group col="6" colspan="2">
|
||||
<button string="Install" name="button_install"
|
||||
type="object" states="state == 'uninstalled'"/>
|
||||
type="object" states="{'invisible': '''state != 'uninstalled' '''}"/>
|
||||
<button string="Cancel Install" name="button_install_cancel"
|
||||
type="object" states="state == 'to install'"/>
|
||||
type="object" states="{'invisible': '''state != 'to install' '''}"/>
|
||||
<button string="Uninstall (beta)" name="button_uninstall"
|
||||
type="object" states="state == 'installed'"/>
|
||||
type="object" states="{'invisible': '''state != 'installed' '''}"/>
|
||||
<button string="Cancel Uninstall" name="button_uninstall_cancel"
|
||||
type="object" states="state == 'to remove'"/>
|
||||
type="object" states="{'invisible': '''state != 'to remove' '''}"/>
|
||||
<button string="Upgrade" name="button_upgrade"
|
||||
type="object" states="state == 'installed'"/>
|
||||
type="object" states="{'invisible': '''state != 'installed' '''}"/>
|
||||
<button string="Cancel Upgrade" name="button_upgrade_cancel"
|
||||
type="object" states="state == 'to upgrade'"/>
|
||||
type="object" states="{'invisible': '''state != 'to upgrade' '''}"/>
|
||||
<!--
|
||||
<button string="Update translations" name="button_update_translations"
|
||||
type="object" states="state == 'installed'"/>
|
||||
type="object" states="{'invisible': '''state != 'installed' '''}"/>
|
||||
-->
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<label name="trigger_date"/>
|
||||
<field name="trigger_date"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="request_send" states="state in ('draft', 'active')"
|
||||
<button name="request_send" states="{'invisible': '''state not in ('draft', 'active')'''}"
|
||||
string="Send" type="object"/>
|
||||
<button name="request_reply" states="state == 'waiting'"
|
||||
<button name="request_reply" states="{'invisible': '''state != 'waiting' '''}"
|
||||
string="Reply" type="object"/>
|
||||
</group>
|
||||
<separator string="References" colspan="4"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
<group col="3" colspan="2">
|
||||
<label name="active"/>
|
||||
<field name="active"/>
|
||||
<button name="request_close" states="state in ('waiting', 'draft', 'active')"
|
||||
<button name="request_close" states="{'invisible': '''state not in ('waiting', 'draft', 'active')'''}"
|
||||
string="Close" type="object"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user