From ba1cc76ac7a2b59001cbdb017b998e1c6d102fa5 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 11 Sep 2008 12:30:25 +0530 Subject: [PATCH] revert changes from account_budget_crossover bzr revid: mra@tinyerp.com-20080911070025-jcw72l28a8xg785k --- .../crossovered_budget.py | 90 +------------------ .../crossovered_budget_report.xml | 4 - .../crossovered_budget_view.xml | 90 ------------------- .../report/__init__.py | 2 - .../security/ir.model.access.csv | 8 +- .../wizard/__init__.py | 2 - 6 files changed, 4 insertions(+), 192 deletions(-) diff --git a/addons/account_budget_crossover/crossovered_budget.py b/addons/account_budget_crossover/crossovered_budget.py index 7d26908750a..461bab436a5 100644 --- a/addons/account_budget_crossover/crossovered_budget.py +++ b/addons/account_budget_crossover/crossovered_budget.py @@ -191,94 +191,6 @@ class account_analytic_account(osv.osv): account_analytic_account() -#moved from account modules -# --------------------------------------------------------- -# Budgets (project) -# --------------------------------------------------------- -#class account_analytic_budget_post(osv.osv): -# _name = 'account.analytic.budget.post' -# _description = 'Budget item' -# _columns = { -# 'code': fields.char('Code', size=64, required=True), -# 'name': fields.char('Name', size=256, required=True), -# 'sens': fields.selection( [('charge','Charge'), ('produit','Product')], 'Direction', required=True), -# 'dotation_ids': fields.one2many('account.analytic.budget.post.dotation', 'post_id', 'Expenses'), -# 'account_ids': fields.many2many('account.analytic.account', 'account_analytic_budget_rel', 'budget_id', 'account_id', 'Accounts'), -# } -# _defaults = { -# 'sens': lambda *a: 'produit', -# } -# -# def spread(self, cr, uid, ids, fiscalyear_id=False, quantity=0.0, amount=0.0): -# -# dobj = self.pool.get('account.analytic.budget.post.dotation') -# for o in self.browse(cr, uid, ids): -# # delete dotations for this post -# dobj.unlink(cr, uid, dobj.search(cr, uid, [('post_id','=',o.id)])) -# -# # create one dotation per period in the fiscal year, and spread the total amount/quantity over those dotations -# fy = self.pool.get('account.fiscalyear').browse(cr, uid, [fiscalyear_id])[0] -# num = len(fy.period_ids) -# for p in fy.period_ids: -# dobj.create(cr, uid, {'post_id': o.id, 'period_id': p.id, 'quantity': quantity/num, 'amount': amount/num}) -# return True -#account_analytic_budget_post() -# -#class account_analytic_budget_post_dotation(osv.osv): -# _name = 'account.analytic.budget.post.dotation' -# _description = "Budget item endowment" -# _columns = { -# 'name': fields.char('Name', size=64), -# 'post_id': fields.many2one('account.analytic.budget.post', 'Item', select=True), -# 'period_id': fields.many2one('account.period', 'Period'), -# 'quantity': fields.float('Quantity', digits=(16,2)), -# 'amount': fields.float('Amount', digits=(16,2)), -# } -#account_analytic_budget_post_dotation() - -#================================================================================== - -# from account module...account.py -# --------------------------------------------------------- -# Budgets -# --------------------------------------------------------- - -class account_budget_post(osv.osv): - _name = 'account.budget.post' - _description = 'Budget item' - _columns = { - 'code': fields.char('Code', size=64, required=True), - 'name': fields.char('Name', size=256, required=True), - 'dotation_ids': fields.one2many('account.budget.post.dotation', 'post_id', 'Expenses'), - 'account_ids': fields.many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts'), - } - _defaults = { - } - - def spread(self, cr, uid, ids, fiscalyear_id=False, amount=0.0): - dobj = self.pool.get('account.budget.post.dotation') - for o in self.browse(cr, uid, ids): - # delete dotations for this post - dobj.unlink(cr, uid, dobj.search(cr, uid, [('post_id','=',o.id)])) - - # create one dotation per period in the fiscal year, and spread the total amount/quantity over those dotations - fy = self.pool.get('account.fiscalyear').browse(cr, uid, [fiscalyear_id])[0] - num = len(fy.period_ids) - 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): - _name = 'account.budget.post.dotation' - _description = "Budget item endowment" - _columns = { - 'name': fields.char('Name', size=64), - 'post_id': fields.many2one('account.budget.post', 'Item', select=True), - 'period_id': fields.many2one('account.period', 'Period'), -# 'quantity': fields.float('Quantity', digits=(16,2)), - 'amount': fields.float('Amount', digits=(16,2)), - } -account_budget_post_dotation() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget_crossover/crossovered_budget_report.xml b/addons/account_budget_crossover/crossovered_budget_report.xml index a0ff720d52d..5fd907d03b1 100644 --- a/addons/account_budget_crossover/crossovered_budget_report.xml +++ b/addons/account_budget_crossover/crossovered_budget_report.xml @@ -40,9 +40,5 @@ rml="account_budget_crossover/report/analytic_account_budget_report.rml" auto="False" menu="False"/> - - - - diff --git a/addons/account_budget_crossover/crossovered_budget_view.xml b/addons/account_budget_crossover/crossovered_budget_view.xml index cf03edf2075..613d9edf960 100644 --- a/addons/account_budget_crossover/crossovered_budget_view.xml +++ b/addons/account_budget_crossover/crossovered_budget_view.xml @@ -250,96 +250,6 @@ - - - - - - - - Budgets - account.budget.post - tree - - - - - - account.budget.post.form - account.budget.post - form - -
- - - - - - -