From c61e359fad9fdc2e7658a3e9f584fc40e0cfecf6 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 16 Jan 2017 14:46:40 +0100 Subject: [PATCH] [FIX] account: matching number When a journal item duplicated, the matching number is duplicated as well. This will create inconsistencies in the information displayed to the user, and moreover it will not allow to reconcile the item anymore. opw-704902 --- addons/account/models/account_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index d20a6eca15a..fa85b6a47f2 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -388,7 +388,7 @@ class AccountMoveLine(models.Model): statement_id = fields.Many2one('account.bank.statement', string='Statement', help="The bank statement used for bank reconciliation", index=True, copy=False) reconciled = fields.Boolean(compute='_amount_residual', store=True) - full_reconcile_id = fields.Many2one('account.full.reconcile', string="Matching Number") + full_reconcile_id = fields.Many2one('account.full.reconcile', string="Matching Number", copy=False) matched_debit_ids = fields.One2many('account.partial.reconcile', 'credit_move_id', String='Matched Debits', help='Debit journal items that are matched with this journal item.') matched_credit_ids = fields.One2many('account.partial.reconcile', 'debit_move_id', String='Matched Credits', @@ -1358,7 +1358,7 @@ class AccountPartialReconcile(models.Model): company_currency_id = fields.Many2one('res.currency', related='company_id.currency_id', readonly=True, help='Utility field to express amount currency') company_id = fields.Many2one('res.company', related='debit_move_id.company_id', store=True, string='Currency') - full_reconcile_id = fields.Many2one('account.full.reconcile', string="Full Reconcile") + full_reconcile_id = fields.Many2one('account.full.reconcile', string="Full Reconcile", copy=False) def create_exchange_rate_entry(self, aml_to_fix, amount_diff, diff_in_currency, currency, move_date): """ Automatically create a journal entry to book the exchange rate difference.