Skip to content
Snippets Groups Projects
Commit 5bb8d068 authored by Nicolas Martinelli's avatar Nicolas Martinelli Committed by fw-bot
Browse files

[FIX] account: auto-post date


Tests can fail when they are run at the moment when `fields.Date.today`
is different from `fields.Date.context_today`.

closes odoo/odoo#39079

X-original-commit: 0405f4a3
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 2524d78c
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ class AccountMoveReversal(models.TransientModel):
'invoice_date': move.is_invoice(include_receipts=True) and (self.date or move.date) or False,
'journal_id': self.journal_id and self.journal_id.id or move.journal_id.id,
'invoice_payment_term_id': None,
'auto_post': True if self.date > fields.Date.today() else False,
'auto_post': True if self.date > fields.Date.context_today(self) else False,
})
# Handle reverse method.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment