[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 <oco-odoo@users.noreply.github.com>
This commit is contained in:
Laurent Smet
2021-01-15 10:05:30 +00:00
parent b940d1c25f
commit 3a756494fc
+1 -1
View File
@@ -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'}"/>
<!-- Others fields -->