diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index d64cfeda184..1cc71ad27cd 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -152,7 +152,7 @@ class AccountMove(models.Model):
], string='Type', required=True, store=True, index=True, readonly=True, tracking=True,
default="entry", change_default=True)
type_name = fields.Char('Type Name', compute='_compute_type_name')
- to_check = fields.Boolean(string='To Check', default=False,
+ to_check = fields.Boolean(string='To Check', default=False, tracking=True,
help='If this checkbox is ticked, it means that the user was not sure of all the related information at the time of the creation of the move and that the move needs to be checked again.')
journal_id = fields.Many2one('account.journal', string='Journal', required=True, readonly=True,
states={'draft': [('readonly', False)]},
@@ -2557,6 +2557,10 @@ class AccountMove(models.Model):
'views': [[view_id, 'form']],
}
+ def button_set_checked(self):
+ for move in self:
+ move.to_check = False
+
def button_draft(self):
AccountMoveLine = self.env['account.move.line']
excluded_move_ids = []
diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index d16e5842f5a..c4acdc3dc24 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -405,6 +405,7 @@
+
@@ -444,6 +445,7 @@
+
@@ -567,9 +569,14 @@
attrs="{'invisible': ['|', ('move_type', 'not in', ('out_invoice', 'in_invoice')), ('state', '!=', 'posted')]}"/>
+ attrs="{'invisible' : ['|', '|', ('id', '=', False), ('state', '!=', 'draft'),('move_type', '!=', 'entry')]}"/>
+
+
+