[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:
pvy
2015-05-15 17:33:44 +02:00
parent a8a9fe821a
commit c1cd63fc4e
+1 -9
View File
@@ -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')