diff --git a/account_commission/views/account_move_views.xml b/account_commission/views/account_move_views.xml index e6a65c4cb..712a6da23 100644 --- a/account_commission/views/account_move_views.xml +++ b/account_commission/views/account_move_views.xml @@ -88,9 +88,10 @@ name="recompute_lines_agents" type="object" string="Regenerate agents" - states="draft" attrs="{'invisible': [ - ('move_type', 'not in', ['out_invoice', 'out_refund']) + '|', + ('move_type', 'not in', ['out_invoice', 'out_refund']), + ('state', '!=', 'draft') ]}" />