Browse Source

Filter by date by default, to have an aged open invoices report as of today

pull/102/head
Alexis de Lattre 10 years ago
committed by Alexis de Lattre
parent
commit
8ffc548a0d
  1. 1
      account_financial_report_webkit/report/aged_open_invoices.py
  2. 5
      account_financial_report_webkit/wizard/aged_open_invoices_wizard.py

1
account_financial_report_webkit/report/aged_open_invoices.py

@ -155,7 +155,6 @@ class AccountAgedOpenInvoicesWebkit(PartnersOpenInvoicesWebkit):
aged_dict[classif] = 0.0 aged_dict[classif] = 0.0
for acc in self.objects: for acc in self.objects:
#print "acc.code=", acc.code
aged_open_inv[acc.id] = aged_dict.copy() aged_open_inv[acc.id] = aged_dict.copy()
aged_open_inv[acc.id]['balance'] = 0.0 aged_open_inv[acc.id]['balance'] = 0.0

5
account_financial_report_webkit/wizard/aged_open_invoices_wizard.py

@ -33,6 +33,10 @@ class AgedOpenInvoice(orm.TransientModel):
_name = "aged.open.invoices.webkit" _name = "aged.open.invoices.webkit"
_description = "Aged open invoices" _description = "Aged open invoices"
_defaults = {
'filter': 'filter_date',
}
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False, def onchange_fiscalyear(self, cr, uid, ids, fiscalyear=False,
period_id=False, date_to=False, until_date=False, period_id=False, date_to=False, until_date=False,
context=None): context=None):
@ -43,7 +47,6 @@ class AgedOpenInvoice(orm.TransientModel):
filters = self.onchange_filter(cr, uid, ids, filter='filter_period', filters = self.onchange_filter(cr, uid, ids, filter='filter_period',
fiscalyear_id=fiscalyear, fiscalyear_id=fiscalyear,
context=context) context=context)
print "filters=", filters
res['value'].update({ res['value'].update({
'period_from': filters['value']['period_from'], 'period_from': filters['value']['period_from'],
'period_to': filters['value']['period_to'], 'period_to': filters['value']['period_to'],

Loading…
Cancel
Save