bzr revid: mra@mra-laptop-20100901082326-2fkp2g3kvgl32wc2
This commit is contained in:
Mustufa Rangwala 2010-09-01 13:53:26 +05:30
parent 6a28d8037d
commit c826332fd7
2 changed files with 6 additions and 5 deletions

View File

@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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,
}

View File

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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: