From 3a756494fc1fb2eb251ae93ef81eb836ee22eb11 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Thu, 14 Jan 2021 11:01:23 +0000 Subject: [PATCH] [FIX] account: Hide 'Cut-off' button on invoice if not posted entry If the journal entry is not posted, the 'Cut-off' button must not be visible on invoice lines. closes odoo/odoo#64595 X-original-commit: 28b748a559e1ffb5fb7c3631bf77adba121b2ebf Signed-off-by: oco-odoo --- addons/account/views/account_move_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 4f029a9dd82..d16e5842f5a 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -1021,7 +1021,7 @@ string="Cut-Off" aria-label="Change Period" class="float-right" - attrs="{'invisible': [('account_internal_group', 'not in', ('income', 'expense'))], 'column_invisible': [('parent.move_type', '=', 'entry')]}" + attrs="{'invisible': [('account_internal_group', 'not in', ('income', 'expense'))], 'column_invisible': ['|', ('parent.move_type', '=', 'entry'), ('parent.state', '!=', 'posted')]}" context="{'hide_automatic_options': 1, 'default_action': 'change_period'}"/>