[FIX] account: incorrect report parameter
self.ids is empty (and is the ids of the report, not the partner) Fixes #14663
This commit is contained in:
@@ -33,10 +33,10 @@ class ReportOverdue(models.AbstractModel):
|
||||
@api.model
|
||||
def render_html(self, docids, data=None):
|
||||
totals = {}
|
||||
lines = self._get_account_move_lines(self.ids)
|
||||
lines = self._get_account_move_lines(docids)
|
||||
lines_to_display = {}
|
||||
company_currency = self.env.user.company_id.currency_id
|
||||
for partner_id in self.ids:
|
||||
for partner_id in docids:
|
||||
lines_to_display[partner_id] = {}
|
||||
totals[partner_id] = {}
|
||||
for line_tmp in lines[partner_id]:
|
||||
@@ -58,9 +58,9 @@ class ReportOverdue(models.AbstractModel):
|
||||
totals[partner_id][currency]['mat'] += line['mat']
|
||||
totals[partner_id][currency]['total'] += line['debit'] - line['credit']
|
||||
docargs = {
|
||||
'doc_ids': self.ids,
|
||||
'doc_ids': docids,
|
||||
'doc_model': 'res.partner',
|
||||
'docs': self.env['res.partner'].browse(self.ids),
|
||||
'docs': self.env['res.partner'].browse(docids),
|
||||
'time': time,
|
||||
'Lines': lines_to_display,
|
||||
'Totals': totals,
|
||||
|
||||
Reference in New Issue
Block a user