[FIX] account: Duplicating journal entries
When duplictating a Journal Entry that has been created from a new payment (accounting/purchases/payments/create), the new copy of the Journal Entry also duplicated the already existent relationship (link) to the payment, causing possible future conflicts in functionalities like reports, payments, reconciliations, among others. opw:775151
This commit is contained in:
@@ -385,7 +385,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_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)
|
||||
|
||||
Reference in New Issue
Block a user