[IMP] account_budget: added date filter in print budget report
Fixes #1743, opw 611307
This commit is contained in:
parent
99ce17cfca
commit
20a99ae129
|
@ -120,10 +120,6 @@ class crossovered_budget_lines(osv.osv):
|
|||
raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
|
||||
date_to = line.date_to
|
||||
date_from = line.date_from
|
||||
if context.has_key('wizard_date_from'):
|
||||
date_from = context['wizard_date_from']
|
||||
if context.has_key('wizard_date_to'):
|
||||
date_to = context['wizard_date_to']
|
||||
if line.analytic_account_id.id:
|
||||
cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date "
|
||||
"between to_date(%s,'yyyy-mm-dd') AND to_date(%s,'yyyy-mm-dd')) AND "
|
||||
|
|
|
@ -89,7 +89,7 @@ class budget_report(report_sxw.rml_parse):
|
|||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0])])
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0]), ('date_to', '>=', d_from), ('date_from', '<=', d_to)])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0.00
|
||||
|
||||
|
|
Loading…
Reference in New Issue