From 945f05a3109e9dacb758e2120c54f8e2919f3a43 Mon Sep 17 00:00:00 2001
From: qdp-odoo <qdp@odoo.com>
Date: Thu, 12 Oct 2017 16:14:40 +0200
Subject: [PATCH] [FIX] account: copy=False on account.move.line's payment_id
 field.

---
 addons/account/models/account_move.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index bce124dc9f30..ef60c1897a7c 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -421,7 +421,7 @@ class AccountMoveLine(models.Model):
         help="The move of this entry line.", index=True, required=True, auto_join=True)
     narration = fields.Text(related='move_id.narration', string='Narration')
     ref = fields.Char(related='move_id.ref', string='Reference', store=True, copy=False, index=True)
-    payment_id = fields.Many2one('account.payment', string="Originator Payment", help="Payment that created this entry")
+    payment_id = fields.Many2one('account.payment', string="Originator Payment", help="Payment that created this entry", copy=False)
     statement_line_id = fields.Many2one('account.bank.statement.line', index=True, string='Bank statement line reconciled with this entry', copy=False, readonly=True)
     statement_id = fields.Many2one('account.bank.statement', related='statement_line_id.statement_id', string='Statement', store=True,
         help="The bank statement used for bank reconciliation", index=True, copy=False)
-- 
GitLab