From 09a6a4da116059414baeb7e663d8a503c3ae082e Mon Sep 17 00:00:00 2001 From: william Date: Thu, 14 May 2020 10:59:53 +0000 Subject: [PATCH] [IMP] account: add inverse of reversed_entry_id We often have to know if an entry is reversed (i.e. if it has a reversal move_id), not if this is the move that is the reversal of another move. --- addons/account/models/account_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 14f8baaa02e..2736f5063c4 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -224,6 +224,7 @@ class AccountMove(models.Model): # ==== Reverse feature fields ==== reversed_entry_id = fields.Many2one('account.move', string="Reversal of", readonly=True, copy=False, check_company=True) + reversal_move_id = fields.One2many('account.move', 'reversed_entry_id') # ========================================================= # Invoice related fields