From 2fc78c00c834b34c979c56f43a80ffbdecfdb1a4 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 11 Sep 2008 12:13:28 +0530 Subject: [PATCH] remove all reference of budget from account module..now it will move in account_budget_crossover bzr revid: mra@tinyerp.com-20080911064328-hsqms2eovfwq2g03 --- addons/account/account.py | 45 +--- addons/account/account_report.xml | 1 - addons/account/account_view.xml | 76 +----- addons/account/account_wizard.xml | 7 +- addons/account/project/project.py | 46 ---- addons/account/project/project_report.xml | 44 ++-- addons/account/report/__init__.py | 1 - addons/account/report/budget_report.py | 78 ------ addons/account/report/budget_report.rml | 248 ------------------ addons/account/security/ir.model.access.csv | 132 +++++----- addons/account/wizard/__init__.py | 2 - addons/account/wizard/wizard_budget_report.py | 61 ----- addons/account/wizard/wizard_budget_spread.py | 66 ----- .../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 + 19 files changed, 278 insertions(+), 725 deletions(-) delete mode 100644 addons/account/report/budget_report.py delete mode 100644 addons/account/report/budget_report.rml delete mode 100644 addons/account/wizard/wizard_budget_report.py delete mode 100644 addons/account/wizard/wizard_budget_spread.py diff --git a/addons/account/account.py b/addons/account/account.py index 95984e4a02e..5c25c668327 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1321,49 +1321,6 @@ class account_tax(osv.osv): return res account_tax() -# --------------------------------------------------------- -# 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() - - # --------------------------------------------------------- # Account Entries Models # --------------------------------------------------------- @@ -1789,7 +1746,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): Create a new account chart for a company. Wizards ask: * a company - * an account chart template + * an account chart template * a number of digits for formatting code of non-view accounts * a list of bank account owned by the company Then, the wizard: diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index f3cb4ea4a94..1ec5d25aa4f 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -5,7 +5,6 @@ - diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 460a46d5756..8cbe1879e00 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -982,80 +982,6 @@ - - Budgets - account.budget.post - tree - - - - - - account.budget.post.form - account.budget.post - form - -
- - - - - - -