summaryrefslogtreecommitdiff
path: root/addons/account/wizard
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account/wizard')
-rw-r--r--addons/account/wizard/account_validate_account_move.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py
index 23ff062a021..922f5685a18 100644
--- a/addons/account/wizard/account_validate_account_move.py
+++ b/addons/account/wizard/account_validate_account_move.py
@@ -9,7 +9,7 @@ class ValidateAccountMove(models.TransientModel):
def validate_move(self):
context = dict(self._context or {})
moves = self.env['account.move'].browse(context.get('active_ids'))
- move_to_post = moves.filtered(lambda m: m.state == 'draft').sorted(lambda m: (m.date, m.ref, m.id))
+ move_to_post = moves.filtered(lambda m: m.state == 'draft').sorted(lambda m: (m.date, m.ref or '', m.id))
if not move_to_post:
raise UserError(_('There are no journal items in the draft state to post.'))
move_to_post.post()