From c1cd63fc4e484f3ee408a49f6516b56fe561ddda Mon Sep 17 00:00:00 2001 From: pvy Date: Fri, 15 May 2015 17:33:44 +0200 Subject: [PATCH] [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 --- addons/l10n_be/partner_vat_listing.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/addons/l10n_be/partner_vat_listing.py b/addons/l10n_be/partner_vat_listing.py index b4e6a9d2ef5..13dbeb96d9d 100644 --- a/addons/l10n_be/partner_vat_listing.py +++ b/addons/l10n_be/partner_vat_listing.py @@ -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')