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