Filter by date by default, to have an aged open invoices report as of today
parent
0452608a2f
commit
8ffc548a0d
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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…
Reference in New Issue