[FIX] account: avoid deleting taxes when they are linked to move lines
Equivalent of 8c337f9743
but for account.move.line as well.
Closes #11883
This commit is contained in:
@@ -379,7 +379,7 @@ class AccountMoveLine(models.Model):
|
||||
date = fields.Date(related='move_id.date', string='Date', required=True, index=True, default=fields.Date.context_today, store=True, copy=False)
|
||||
analytic_line_ids = fields.One2many('account.analytic.line', 'move_id', string='Analytic lines', oldname="analytic_lines")
|
||||
tax_ids = fields.Many2many('account.tax', string='Taxes')
|
||||
tax_line_id = fields.Many2one('account.tax', string='Originator tax')
|
||||
tax_line_id = fields.Many2one('account.tax', string='Originator tax', ondelete='restrict')
|
||||
analytic_account_id = fields.Many2one('account.analytic.account', string='Analytic Account')
|
||||
company_id = fields.Many2one('res.company', related='account_id.company_id', string='Company', store=True)
|
||||
counterpart = fields.Char("Counterpart", compute='_get_counterpart', help="Compute the counter part accounts of this journal item for this journal entry. This can be needed in reports.")
|
||||
|
||||
Reference in New Issue
Block a user