[FIX] account: do not copy 'Reverse entry'

When a journal entry is duplicated, `reverse_entry_id` should not be
copied for obvious reasons.

opw-2055947

closes odoo/odoo#35847

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-08-20 12:26:15 +00:00
parent bdf1817d03
commit 7f365127d6
+1 -1
View File
@@ -117,7 +117,7 @@ class AccountMove(models.Model):
"This is needed when cancelling the source: it will post the inverse journal entry to cancel that part too.")
auto_reverse = fields.Boolean(string='Reverse Automatically', default=False, help='If this checkbox is ticked, this entry will be automatically reversed at the reversal date you defined.')
reverse_date = fields.Date(string='Reversal Date', help='Date of the reverse accounting entry.')
reverse_entry_id = fields.Many2one('account.move', String="Reverse entry", store=True, readonly=True)
reverse_entry_id = fields.Many2one('account.move', String="Reverse entry", store=True, readonly=True, copy=False)
tax_type_domain = fields.Char(store=False, help='Technical field used to have a dynamic taxes domain on the form view.')
@api.constrains('line_ids', 'journal_id', 'auto_reverse', 'reverse_date')