[IMP] account_reports: move footnotes and line folding methods to the common context object, moved the totals to the bottom linesm and some small fixes
This commit is contained in:
@@ -66,7 +66,7 @@ class ReportL10nBePartnerVatListing(models.AbstractModel):
|
||||
'id': record['partner_id'],
|
||||
'type': 'partner_id',
|
||||
'name': record['name'],
|
||||
'footnotes': self._get_footnotes('partner_id', record['partner_id'], context_id),
|
||||
'footnotes': self.context_id._get_footnotes('partner_id', record['partner_id'], context_id),
|
||||
'columns': columns,
|
||||
'level': 2,
|
||||
'unfoldable': False,
|
||||
@@ -74,14 +74,6 @@ class ReportL10nBePartnerVatListing(models.AbstractModel):
|
||||
})
|
||||
return lines
|
||||
|
||||
@api.model
|
||||
def _get_footnotes(self, type, target_id, context_id):
|
||||
footnotes = context_id.footnotes.filtered(lambda s: s.type == type and s.target_id == target_id)
|
||||
result = {}
|
||||
for footnote in footnotes:
|
||||
result.update({footnote.column: footnote.number})
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def get_title(self):
|
||||
return _('Partner VAT Listing')
|
||||
|
||||
Reference in New Issue
Block a user