From 8ffc548a0d995f3f3a58403cadc4b97d8ff055b7 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 10 Jul 2015 19:58:51 +0200 Subject: [PATCH] Filter by date by default, to have an aged open invoices report as of today --- account_financial_report_webkit/report/aged_open_invoices.py | 1 - .../wizard/aged_open_invoices_wizard.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account_financial_report_webkit/report/aged_open_invoices.py b/account_financial_report_webkit/report/aged_open_invoices.py index 049903fd..47fc5081 100644 --- a/account_financial_report_webkit/report/aged_open_invoices.py +++ b/account_financial_report_webkit/report/aged_open_invoices.py @@ -155,7 +155,6 @@ class AccountAgedOpenInvoicesWebkit(PartnersOpenInvoicesWebkit): aged_dict[classif] = 0.0 for acc in self.objects: - #print "acc.code=", acc.code aged_open_inv[acc.id] = aged_dict.copy() aged_open_inv[acc.id]['balance'] = 0.0 diff --git a/account_financial_report_webkit/wizard/aged_open_invoices_wizard.py b/account_financial_report_webkit/wizard/aged_open_invoices_wizard.py index c1297b43..3eb9f2fc 100644 --- a/account_financial_report_webkit/wizard/aged_open_invoices_wizard.py +++ b/account_financial_report_webkit/wizard/aged_open_invoices_wizard.py @@ -33,6 +33,10 @@ class AgedOpenInvoice(orm.TransientModel): _name = "aged.open.invoices.webkit" _description = "Aged open invoices" + _defaults = { + 'filter': 'filter_date', + } + def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False, period_id=False, date_to=False, until_date=False, context=None): @@ -43,7 +47,6 @@ class AgedOpenInvoice(orm.TransientModel): filters = self.onchange_filter(cr, uid, ids, filter='filter_period', fiscalyear_id=fiscalyear, context=context) - print "filters=", filters res['value'].update({ 'period_from': filters['value']['period_from'], 'period_to': filters['value']['period_to'],