diff --git a/statement.py b/statement.py index ecf6e123c0..d7c6e2e889 100644 --- a/statement.py +++ b/statement.py @@ -164,19 +164,24 @@ class Statement(Workflow, ModelSQL, ModelView): cls._buttons.update({ 'draft': { 'invisible': Eval('state') != 'cancel', + 'depends': ['state'], }, 'validate_statement': { 'invisible': Eval('state') != 'draft', + 'depends': ['state'], }, 'post': { 'invisible': Eval('state') != 'validated', + 'depends': ['state'], }, 'cancel': { 'invisible': ~Eval('state').in_(['draft', 'validated']), + 'depends': ['state'], }, 'reconcile': { 'invisible': Eval('state').in_(['draft', 'cancel']), 'readonly': ~Eval('to_reconcile'), + 'depends': ['state', 'to_reconcile'], }, }) diff --git a/view/statement_form.xml b/view/statement_form.xml index 599158719e..c4623040fe 100644 --- a/view/statement_form.xml +++ b/view/statement_form.xml @@ -48,5 +48,4 @@ this repository contains the full copyright notices and license terms. --> -