summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2017-01-16 14:46:40 +0100
committerNicolas Martinelli <nim@odoo.com>2017-01-16 14:46:40 +0100
commitc61e359fad9fdc2e7658a3e9f584fc40e0cfecf6 (patch)
tree7e8a499b9c69c155d419a1206d883f8fcc0c4448
parent655a9bcd519c35ae915fee4715d1fae47619374f (diff)
[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
-rw-r--r--addons/account/models/account_move.py4
1 files 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.