From c826332fd71f3a3cf68a2b12da9c42a075e98c79 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 1 Sep 2010 13:53:26 +0530 Subject: [PATCH] [REF] bzr revid: mra@mra-laptop-20100901082326-2fkp2g3kvgl32wc2 --- addons/account_budget/crossovered_budget.py | 5 +++-- addons/account_budget/wizard/account_budget_report.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py index 9252d2cf210..3a5846c7d86 100644 --- a/addons/account_budget/crossovered_budget.py +++ b/addons/account_budget/crossovered_budget.py @@ -18,9 +18,9 @@ # along with this program. If not, see . # ############################################################################## +import datetime from osv import osv,fields -import datetime from tools.translate import _ def strToDate(dt): @@ -58,6 +58,7 @@ class account_budget_post(osv.osv): for p in fy.period_ids: dobj.create(cr, uid, {'post_id': o.id, 'period_id': p.id, 'amount': amount/num}) return True + account_budget_post() class account_budget_post_dotation(osv.osv): @@ -116,7 +117,7 @@ class crossovered_budget(osv.osv): } _defaults = { - 'state': lambda *a: 'draft', + 'state': 'draft', 'creating_user_id': lambda self,cr,uid,context: uid, } diff --git a/addons/account_budget/wizard/account_budget_report.py b/addons/account_budget/wizard/account_budget_report.py index 9fe2e0c5977..58ba9ad8191 100644 --- a/addons/account_budget/wizard/account_budget_report.py +++ b/addons/account_budget/wizard/account_budget_report.py @@ -18,6 +18,7 @@ # along with this program. If not, see . # ############################################################################## + import time from osv import fields, osv @@ -50,13 +51,12 @@ class account_budget_report(osv.osv_memory): data_model = self.pool.get(datas['model']).browse(cr, uid, context['active_id']) if not data_model.dotation_ids: raise osv.except_osv(_('Insufficient Data!'),_('No Depreciation or Master Budget Expenses Found on Budget %s!') % data_model.name) - return { 'type': 'ir.actions.report.xml', 'report_name': 'account.budget', 'datas': datas, } + account_budget_report() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file