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
-
-
-
-
-
- account.budget.post.tree
- account.budget.post
- tree
-
-
-
-
-
-
-
-
- account.budget.post.dotation.form
- account.budget.post.dotation
- form
-
-
-
-
-
- account.budget.post.dotation.tree
- account.budget.post.dotation
- tree
-
-
-
-
-
-
-
-
-
- Master Budgets
- account.budget.post
- form
-
-
-
-
diff --git a/addons/account/account_wizard.xml b/addons/account/account_wizard.xml
index 70ec040e354..d5420f34a51 100644
--- a/addons/account/account_wizard.xml
+++ b/addons/account/account_wizard.xml
@@ -6,8 +6,6 @@
-
-
@@ -26,8 +24,8 @@
@@ -61,7 +59,6 @@
-
diff --git a/addons/account/project/project.py b/addons/account/project/project.py
index 8bab0577586..b4cc3468e5f 100644
--- a/addons/account/project/project.py
+++ b/addons/account/project/project.py
@@ -245,51 +245,5 @@ class account_journal(osv.osv):
}
account_journal()
-
-# ---------------------------------------------------------
-# Budgets
-# ---------------------------------------------------------
-
-#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()
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/project/project_report.xml b/addons/account/project/project_report.xml
index ea282adb875..0abfd6625f5 100644
--- a/addons/account/project/project_report.xml
+++ b/addons/account/project/project_report.xml
@@ -2,43 +2,33 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
+
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 8268c697b27..32c84ef568a 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -28,7 +28,6 @@
#
##############################################################################
-import budget_report
import central_journal
import general_journal
import account_journal
diff --git a/addons/account/report/budget_report.py b/addons/account/report/budget_report.py
deleted file mode 100644
index 0356817535f..00000000000
--- a/addons/account/report/budget_report.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
-#
-# $Id$
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import time
-from report import report_sxw
-import datetime
-import operator
-
-class budget_report(report_sxw.rml_parse):
- def __init__(self, cr, uid, name, context):
- super(budget_report, self).__init__(cr, uid, name, context)
- self.localcontext.update( {
- 'lines': self.lines,
- 'budget_total': self.budget_total,
- 'post_total': self.post_total,
- 'time': time,
- })
-
- def post_total(self, post_obj, date1, date2):
- def str2date(date_str):
- return datetime.date.fromtimestamp(time.mktime(time.strptime(date_str, '%Y-%m-%d')))
- def interval(d1str, d2str):
- return (str2date(d2str) - str2date(d1str) + datetime.timedelta(days=1)).days
- prev = reduce(lambda x,d: x + d.amount, post_obj.dotation_ids, 0.0)
- period_days = interval(date1, date2)
- for d in post_obj.dotation_ids:
- i = interval(d.period_id.date_start, d.period_id.date_stop)
- total_days = reduce(lambda x,d: x+interval(d.period_id.date_start, d.period_id.date_stop), post_obj.dotation_ids, 0)
- achievements = reduce(lambda x,l: x+l['achievements'], self.lines(post_obj, date1, date2), 0.0)
- return [{'prev': prev, 'prev_period': prev * period_days / total_days, 'achievements': achievements}]
-
- def budget_total(self, post_objs, date1, date2):
- res = {'prev': 0.0, 'prev_period': 0.0, 'achievements': 0.0}
- for post_obj in post_objs:
- r = self.post_total(post_obj, date1, date2)[0]
- for k in r:
- res[k] += r[k]
- return [res]
-
- def lines(self, post_obj, date1, date2):
- res = []
- for a in post_obj.account_ids:
- self.cr.execute("SELECT COALESCE(SUM(debit-credit), 0) FROM account_move_line WHERE account_id=%d AND date>=%s AND date<=%s and state<>'draft'", (a.id, date1, date2))
- achievements = float(self.cr.fetchone()[0]) * (post_obj.sens=='produit' and -1 or 1)
- res.append({'name': a.name, 'code': a.code, 'achievements': achievements})
- return res
-report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account/report/budget_report.rml',parser=budget_report)
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/account/report/budget_report.rml b/addons/account/report/budget_report.rml
deleted file mode 100644
index 520fed1df2f..00000000000
--- a/addons/account/report/budget_report.rml
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
-
- |
-
- Budget Analysis
- |
-
- From [[ data['form']['date1'] ]]
- to [[ data['form']['date2'] ]]
- |
-
-
- |
- [[ company.name ]]
- |
-
-
-
-
- |
-
- Currency: [[ company.currency_id.name ]]
- |
-
-
-
-
-
- Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]]
-
-
-
-
-
- |
- Budget item detail
- |
-
- Account Number
- |
-
- Budget
-
-
-
- |
-
- Period Budget
-
-
-
- |
-
- Performance
- |
-
- Spread
- |
-
- % performance
- |
-
-
-
-
-
-
- [[ repeatIn(objects, 'o') ]]
-
-
- |
- [[ o.code ]]
- |
-
- [[ o.name ]]
- |
-
-
-
-
- |
-
- [[ repeatIn(lines(o, data['form']['date1'], data['form']['date2']), 'a') ]]
- [[ a['name'] ]]
-
- |
-
- [[ a['code'] ]]
- |
-
-
-
-
- |
-
-
-
-
- |
-
- [[ '%.2f' % a['achievements'] ]]
- |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
- |
- Total [[ o.code ]]
- [[ repeatIn( post_total(o, data['form']['date1'], data['form']['date2']), 'total') ]]
- |
-
- [[ '%.2f' % total['prev'] ]]
- |
-
- [[ '%.2f' % total['prev_period'] ]]
- |
-
- [[ '%.2f' % total['achievements'] ]]
- |
-
- [[ '%.2f' % (total['prev_period'] - total['achievements']) ]]
- |
-
- [[ total['prev_period'] and ('%.2f' % (total['achievements'] / total['prev_period'] * 100.0)) or 0.0]] %
- |
-
-
-
-
-
-
-
-
- |
- Results
- [[ repeatIn( budget_total(objects, data['form']['date1'], data['form']['date2']), 'total') ]]
- |
-
- [[ '%.2f' % total['prev'] ]]
- |
-
- [[ '%.2f' % total['prev_period'] ]]
- |
-
- [[ '%.2f' % total['achievements'] ]]
- |
-
- [[ '%.2f' % (total['prev_period'] - total['achievements']) ]]
- |
-
- [[ '%.2f' % (total['achievements'] / total['prev_period'] * 100.0) ]] %
- |
-
-
-
-
-
-
-
-
diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv
index be4c7aa4518..4cf98aedec0 100644
--- a/addons/account/security/ir.model.access.csv
+++ b/addons/account/security/ir.model.access.csv
@@ -1,67 +1,65 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_account_payment_term,account.payment.term,model_account_payment_term,account.group_account_user,1,0,0,0
-access_account_payment_term_line,account.payment.term.line,model_account_payment_term_line,account.group_account_user,1,0,0,0
-access_account_account_type,account.account.type,model_account_account_type,account.group_account_user,1,0,0,0
-access_account_tax,account.tax,model_account_tax,account.group_account_user,1,0,0,0
-access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0
-access_account_journal_view,account.journal.view,model_account_journal_view,account.group_account_user,1,0,0,0
-access_account_journal_column,account.journal.column,model_account_journal_column,account.group_account_user,1,0,0,0
-access_account_journal,account.journal,model_account_journal,account.group_account_user,1,0,0,0
-access_account_period,account.period,model_account_period,account.group_account_user,1,0,0,0
-access_account_journal_period,account.journal.period,model_account_journal_period,account.group_account_user,1,1,1,1
-access_account_move,account.move,model_account_move,account.group_account_user,1,1,1,1
-access_account_move_reconcile,account.move.reconcile,model_account_move_reconcile,account.group_account_user,1,1,1,1
-access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_user,1,0,0,0
-access_account_tax,account.tax,model_account_tax,account.group_account_user,1,0,0,0
-access_account_budget_post,account.budget.post,model_account_budget_post,account.group_account_manager,1,1,1,1
-access_account_budget_post_dotation,account.budget.post.dotation,model_account_budget_post_dotation,account.group_account_manager,1,1,1,1
-access_account_model,account.model,model_account_model,account.group_account_user,1,1,1,1
-access_account_model_line,account.model.line,model_account_model_line,account.group_account_user,1,1,1,1
-access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1
-access_account_subscription_line,account.subscription.line,model_account_subscription_line,account.group_account_user,1,1,1,1
-access_account_config_fiscalyear,account.config.fiscalyear,model_account_config_fiscalyear,account.group_account_manager,1,1,1,1
-access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1
-access_account_account_template,account.account.template,model_account_account_template,account.group_account_manager,1,1,1,1
-access_account_tax_code_template,account.tax.code.template,model_account_tax_code_template,account.group_account_manager,1,1,1,1
-access_account_chart_template,account.chart.template,model_account_chart_template,account.group_account_manager,1,1,1,1
-access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1
-access_wizard_multi_charts_accounts,wizard.multi.charts.accounts,model_wizard_multi_charts_accounts,account.group_account_manager,1,1,1,1
-access_account_bank_accounts_wizard,account.bank.accounts.wizard,model_account_bank_accounts_wizard,account.group_account_manager,1,1,1,1
-access_account_move_line,account.move.line,model_account_move_line,account.group_account_user,1,1,1,1
-access_account_bank_statement,account.bank.statement,model_account_bank_statement,account.group_account_user,1,1,1,1
-access_account_bank_statement_reconcile,account.bank.statement.reconcile,model_account_bank_statement_reconcile,account.group_account_user,1,1,1,1
-access_account_bank_statement_reconcile_line,account.bank.statement.reconcile.line,model_account_bank_statement_reconcile_line,account.group_account_user,1,1,1,1
-access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1
-access_account_analytic_line,account.analytic.line,model_account_analytic_line,account.group_account_user,1,1,1,1
-access_report_hr_timesheet_invoice_journal,report.hr.timesheet.invoice.journal,model_report_hr_timesheet_invoice_journal,account.group_account_manager,1,0,0,0
-access_account_invoice,account.invoice,model_account_invoice,account.group_account_user,1,0,0,0
-access_account_invoice_line,account.invoice.line,model_account_invoice_line,account.group_account_user,1,0,0,0
-access_account_invoice_tax,account.invoice.tax,model_account_invoice_tax,account.group_account_user,1,0,0,0
-access_account_analytic_account,account.analytic.account,model_account_analytic_account,account.group_account_user,1,0,0,0
-access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0
-access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_user,1,1,1,1
-access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_user,1,1,1,1
-access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_user,1,1,1,1
-access_account_analytic_line_uinvoice,account.analytic.line,model_account_analytic_line,account.group_account_user,1,1,1,1
-access_account_move_uinvoice,account.move,model_account_move,account.group_account_user,1,1,1,1
-access_account_move_reconcile_uinvoice,account.move.reconcile,model_account_move_reconcile,account.group_account_user,1,1,1,1
-access_account_journal_period_uinvoice,account.journal.period,model_account_journal_period,account.group_account_user,1,1,1,1
-access_account_payment_term_manager,account.payment.term,model_account_payment_term,account.group_account_manager,1,1,1,1
-access_account_payment_term_line_manager,account.payment.term.line,model_account_payment_term_line,account.group_account_manager,1,1,1,1
-access_account_account_type_manager,account.account.type,model_account_account_type,account.group_account_manager,1,1,1,1
-access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1
-access_account_account_manager,account.account,model_account_account,account.group_account_manager,1,1,1,1
-access_account_journal_view_manager,account.journal.view,model_account_journal_view,account.group_account_manager,1,1,1,1
-access_account_journal_column_manager,account.journal.column,model_account_journal_column,account.group_account_manager,1,1,1,1
-access_account_journal_manager,account.journal,model_account_journal,account.group_account_manager,1,1,1,1
-access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1
-access_account_tax_code_manager,account.tax.code,model_account_tax_code,account.group_account_manager,1,1,1,1
-access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1
-access_account_invoice_manager,account.invoice,model_account_invoice,account.group_account_manager,1,1,1,1
-access_account_invoice_line_manager,account.invoice.line,model_account_invoice_line,account.group_account_manager,1,1,1,1
-access_account_invoice_tax_manager,account.invoice.tax,model_account_invoice_tax,account.group_account_manager,1,1,1,1
-access_account_analytic_account_manager,account.analytic.account,model_account_analytic_account,account.group_account_manager,1,1,1,1
-access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1
-access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1
-access_account_fiscalyear_user,account.fiscalyear.user,model_account_fiscalyear,account.group_account_user,1,0,0,0
-access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0
+"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0
+"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0
+"access_account_tax","account.tax","model_account_tax","account.group_account_user",1,0,0,0
+"access_account_account","account.account","model_account_account","account.group_account_user",1,0,0,0
+"access_account_journal_view","account.journal.view","model_account_journal_view","account.group_account_user",1,0,0,0
+"access_account_journal_column","account.journal.column","model_account_journal_column","account.group_account_user",1,0,0,0
+"access_account_journal","account.journal","model_account_journal","account.group_account_user",1,0,0,0
+"access_account_period","account.period","model_account_period","account.group_account_user",1,0,0,0
+"access_account_journal_period","account.journal.period","model_account_journal_period","account.group_account_user",1,1,1,1
+"access_account_move","account.move","model_account_move","account.group_account_user",1,1,1,1
+"access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_account_user",1,1,1,1
+"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_account_user",1,0,0,0
+"access_account_tax","account.tax","model_account_tax","account.group_account_user",1,0,0,0
+"access_account_model","account.model","model_account_model","account.group_account_user",1,1,1,1
+"access_account_model_line","account.model.line","model_account_model_line","account.group_account_user",1,1,1,1
+"access_account_subscription","account.subscription","model_account_subscription","account.group_account_user",1,1,1,1
+"access_account_subscription_line","account.subscription.line","model_account_subscription_line","account.group_account_user",1,1,1,1
+"access_account_config_fiscalyear","account.config.fiscalyear","model_account_config_fiscalyear","account.group_account_manager",1,1,1,1
+"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
+"access_account_account_template","account.account.template","model_account_account_template","account.group_account_manager",1,1,1,1
+"access_account_tax_code_template","account.tax.code.template","model_account_tax_code_template","account.group_account_manager",1,1,1,1
+"access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1
+"access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1
+"access_wizard_multi_charts_accounts","wizard.multi.charts.accounts","model_wizard_multi_charts_accounts","account.group_account_manager",1,1,1,1
+"access_account_bank_accounts_wizard","account.bank.accounts.wizard","model_account_bank_accounts_wizard","account.group_account_manager",1,1,1,1
+"access_account_move_line","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1
+"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,1,1,1
+"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_account_user",1,1,1,1
+"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_account_user",1,1,1,1
+"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,1,1,1
+"access_account_analytic_line","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1
+"access_report_hr_timesheet_invoice_journal","report.hr.timesheet.invoice.journal","model_report_hr_timesheet_invoice_journal","account.group_account_manager",1,0,0,0
+"access_account_invoice","account.invoice","model_account_invoice","account.group_account_user",1,0,0,0
+"access_account_invoice_line","account.invoice.line","model_account_invoice_line","account.group_account_user",1,0,0,0
+"access_account_invoice_tax","account.invoice.tax","model_account_invoice_tax","account.group_account_user",1,0,0,0
+"access_account_analytic_account","account.analytic.account","model_account_analytic_account","account.group_account_user",1,0,0,0
+"access_account_analytic_journal","account.analytic.journal","model_account_analytic_journal","account.group_account_user",1,0,0,0
+"access_account_invoice_uinvoice","account.invoice","model_account_invoice","account.group_account_user",1,1,1,1
+"access_account_invoice_line_uinvoice","account.invoice.line","model_account_invoice_line","account.group_account_user",1,1,1,1
+"access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_user",1,1,1,1
+"access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1
+"access_account_move_uinvoice","account.move","model_account_move","account.group_account_user",1,1,1,1
+"access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_user",1,1,1,1
+"access_account_journal_period_uinvoice","account.journal.period","model_account_journal_period","account.group_account_user",1,1,1,1
+"access_account_payment_term_manager","account.payment.term","model_account_payment_term","account.group_account_manager",1,1,1,1
+"access_account_payment_term_line_manager","account.payment.term.line","model_account_payment_term_line","account.group_account_manager",1,1,1,1
+"access_account_account_type_manager","account.account.type","model_account_account_type","account.group_account_manager",1,1,1,1
+"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1
+"access_account_account_manager","account.account","model_account_account","account.group_account_manager",1,1,1,1
+"access_account_journal_view_manager","account.journal.view","model_account_journal_view","account.group_account_manager",1,1,1,1
+"access_account_journal_column_manager","account.journal.column","model_account_journal_column","account.group_account_manager",1,1,1,1
+"access_account_journal_manager","account.journal","model_account_journal","account.group_account_manager",1,1,1,1
+"access_account_period_manager","account.period","model_account_period","account.group_account_manager",1,1,1,1
+"access_account_tax_code_manager","account.tax.code","model_account_tax_code","account.group_account_manager",1,1,1,1
+"access_account_tax_manager","account.tax","model_account_tax","account.group_account_manager",1,1,1,1
+"access_account_invoice_manager","account.invoice","model_account_invoice","account.group_account_manager",1,1,1,1
+"access_account_invoice_line_manager","account.invoice.line","model_account_invoice_line","account.group_account_manager",1,1,1,1
+"access_account_invoice_tax_manager","account.invoice.tax","model_account_invoice_tax","account.group_account_manager",1,1,1,1
+"access_account_analytic_account_manager","account.analytic.account","model_account_analytic_account","account.group_account_manager",1,1,1,1
+"access_account_analytic_journal_manager","account.analytic.journal","model_account_analytic_journal","account.group_account_manager",1,1,1,1
+"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_account_manager",1,1,1,1
+"access_account_fiscalyear_user","account.fiscalyear.user","model_account_fiscalyear","account.group_account_user",1,0,0,0
+"access_account_fiscalyear_invoice","account.fiscalyear.invoice","model_account_fiscalyear","account.group_account_invoice",1,0,0,0
diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py
index fa227de1cd0..6ecd2040756 100644
--- a/addons/account/wizard/__init__.py
+++ b/addons/account/wizard/__init__.py
@@ -39,11 +39,9 @@ import wizard_pay_invoice
import wizard_journal
import wizard_journal_select
import wizard_bank_reconcile
-import wizard_budget_spread
import wizard_subscription_generate
import wizard_aged_trial_balance
-import wizard_budget_report
import wizard_general_ledger_report
import wizard_third_party_ledger
import wizard_account_balance_report
diff --git a/addons/account/wizard/wizard_budget_report.py b/addons/account/wizard/wizard_budget_report.py
deleted file mode 100644
index 93ee44850c0..00000000000
--- a/addons/account/wizard/wizard_budget_report.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
-#
-# $Id$
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import time
-import wizard
-
-dates_form = '''
-
'''
-
-dates_fields = {
- 'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')},
- 'date2': {'string':'End of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
-}
-
-class wizard_report(wizard.interface):
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('report','Print')]}
- },
- 'report': {
- 'actions': [],
- 'result': {'type':'print', 'report':'account.budget', 'state':'end'}
- }
- }
-wizard_report('account.budget.report')
-
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/account/wizard/wizard_budget_spread.py b/addons/account/wizard/wizard_budget_spread.py
deleted file mode 100644
index e93c13a2ed2..00000000000
--- a/addons/account/wizard/wizard_budget_spread.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
-#
-# $Id$
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import wizard
-import netsvc
-
-_spread_form = '''
-'''
-
-_spread_fields = {
- 'fiscalyear': {'string':'Fiscal Year', 'type':'many2one', 'relation':'account.fiscalyear', 'required':True},
- 'amount': {'string':'Amount', 'type':'float', 'digits':(16,2)},
-}
-
-class wizard_budget_spread(wizard.interface):
- def _spread(self, cr, uid, data, context):
- service = netsvc.LocalService("object_proxy")
- form = data['form']
- res = service.execute(cr.dbname, uid, 'account.budget.post', 'spread', data['ids'], form['fiscalyear'], form['amount'])
- return {}
-
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type':'form', 'arch':_spread_form, 'fields':_spread_fields, 'state':[('end','Cancel'),('spread','Spread')]}
- },
- 'spread': {
- 'actions': [_spread],
- 'result': {'type':'state', 'state':'end'}
- }
- }
-wizard_budget_spread('account.budget.spread')
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/account_budget_crossover/crossovered_budget.py b/addons/account_budget_crossover/crossovered_budget.py
index 461bab436a5..7d26908750a 100644
--- a/addons/account_budget_crossover/crossovered_budget.py
+++ b/addons/account_budget_crossover/crossovered_budget.py
@@ -191,6 +191,94 @@ class account_analytic_account(osv.osv):
account_analytic_account()
+#moved from account modules
+# ---------------------------------------------------------
+# Budgets (project)
+# ---------------------------------------------------------
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+#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()
diff --git a/addons/account_budget_crossover/crossovered_budget_report.xml b/addons/account_budget_crossover/crossovered_budget_report.xml
index 5fd907d03b1..a0ff720d52d 100644
--- a/addons/account_budget_crossover/crossovered_budget_report.xml
+++ b/addons/account_budget_crossover/crossovered_budget_report.xml
@@ -40,5 +40,9 @@
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 613d9edf960..cf03edf2075 100644
--- a/addons/account_budget_crossover/crossovered_budget_view.xml
+++ b/addons/account_budget_crossover/crossovered_budget_view.xml
@@ -250,6 +250,96 @@
+
+
+
+
+
+
+
+ Budgets
+ account.budget.post
+ tree
+
+
+
+
+
+ account.budget.post.form
+ account.budget.post
+ form
+
+
+
+
+
+ account.budget.post.tree
+ account.budget.post
+ tree
+
+
+
+
+
+
+
+
+ account.budget.post.dotation.form
+ account.budget.post.dotation
+ form
+
+
+
+
+
+ account.budget.post.dotation.tree
+ account.budget.post.dotation
+ tree
+
+
+
+
+
+
+
+
+
+ Master Budgets
+ account.budget.post
+ form
+
+
+
+
+
+
+
diff --git a/addons/account_budget_crossover/report/__init__.py b/addons/account_budget_crossover/report/__init__.py
index 29e13bf6c0e..eb78b345391 100644
--- a/addons/account_budget_crossover/report/__init__.py
+++ b/addons/account_budget_crossover/report/__init__.py
@@ -1,5 +1,7 @@
# -*- encoding: utf-8 -*-
import crossovered_budget_report
import analytic_account_budget_report
+
+import budget_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_budget_crossover/security/ir.model.access.csv b/addons/account_budget_crossover/security/ir.model.access.csv
index a87fc1c28ce..682a2ea3783 100644
--- a/addons/account_budget_crossover/security/ir.model.access.csv
+++ b/addons/account_budget_crossover/security/ir.model.access.csv
@@ -1,3 +1,5 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_crossovered_budget,crossovered.budget,model_crossovered_budget,account.group_account_manager,1,1,1,1
-access_crossovered_budget_lines,crossovered.budget.lines,model_crossovered_budget_lines,account.group_account_manager,1,1,1,1
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_crossovered_budget","crossovered.budget","model_crossovered_budget","account.group_account_manager",1,1,1,1
+"access_crossovered_budget_lines","crossovered.budget.lines","model_crossovered_budget_lines","account.group_account_manager",1,1,1,1
+"access_account_budget_post","account.budget.post","model_account_budget_post","account.group_account_manager",1,1,1,1
+"access_account_budget_post_dotation","account.budget.post.dotation","model_account_budget_post_dotation","account.group_account_manager",1,1,1,1
diff --git a/addons/account_budget_crossover/wizard/__init__.py b/addons/account_budget_crossover/wizard/__init__.py
index 63a94c33df4..696e4de7fef 100644
--- a/addons/account_budget_crossover/wizard/__init__.py
+++ b/addons/account_budget_crossover/wizard/__init__.py
@@ -2,5 +2,7 @@
import wizard_crossovered_budget_report
import wizard_analytic_account_budget
import wizard_crossovered_budget_summary_report
+import wizard_budget_report
+import wizard_budget_spread
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: