[FIX] account: reverse_moves

When reversing entries in Journal Entry, each entry(account.move.line)
must be copied with its own 'tax_line_id'. In this way, the action window
"act_account_tax_tax" can find all the entries linked to a specific tax
(active_id) to compute the Tax Report.

opw:652598
This commit is contained in:
Goffin Simon
2015-10-26 15:35:21 +01:00
parent cb23864262
commit ac53e2451d
+2 -2
View File
@@ -352,8 +352,8 @@ class AccountMoveLine(models.Model):
help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line.")
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', copy=False, readonly=True)
tax_line_id = fields.Many2one('account.tax', string='Originator tax', copy=False, readonly=True)
tax_ids = fields.Many2many('account.tax', string='Taxes', readonly=True)
tax_line_id = fields.Many2one('account.tax', string='Originator tax', readonly=True)
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.")