diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index ef4e572770c..cea696f590f 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -110,7 +110,8 @@ module named account_voucherss
'report/account_entries_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
- 'report/account_account_report_view.xml'
+ 'report/account_account_report_view.xml',
+ 'report/account_analytic_entries_report_view.xml'
],
'demo_xml': [
#'demo/price_accuracy00.yml',
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 37d539a4b25..a2d18095618 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -22,6 +22,7 @@
groups="group_account_user"/>
+
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 51cb0810f43..b411e404cac 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -39,5 +39,6 @@ import account_report
import account_analytic_report
import account_account_report
import account_entries_report
+import account_analytic_entries_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
index 19731e390c2..e5dcd8551d1 100644
--- a/addons/account/report/account_account_report_view.xml
+++ b/addons/account/report/account_account_report_view.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py
new file mode 100644
index 00000000000..38a17a19ec2
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class analytic_entries_report(osv.osv):
+ _name = "analytic.entries.report"
+ _description = "Analytic Entries Statistics"
+ _auto = False
+ _columns = {
+ 'date': fields.date('Date', readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'user_id' : fields.many2one('res.users', 'User',readonly=True),
+ 'name': fields.char('Description', size=64, readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Account', required=True),
+ 'general_account_id': fields.many2one('account.account', 'General Account', required=True),
+ 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
+ 'move_id': fields.many2one('account.move.line', 'Move', required=True),
+ 'product_id': fields.many2one('product.product', 'Product', required=True),
+ 'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
+ 'amount': fields.float('Amount', readonly=True),
+ 'unit_amount': fields.float('Unit Amount', readonly=True),
+ 'amount_currency': fields.float('Amount Currency', readonly=True),
+ }
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'analytic_entries_report')
+ cr.execute("""
+ create or replace view analytic_entries_report as (
+ select
+ min(a.id) as id,
+ a.create_date as date,
+ to_char(a.create_date, 'YYYY') as year,
+ to_char(a.create_date, 'MM') as month,
+ to_char(a.create_date, 'YYYY-MM-DD') as day,
+ a.user_id as user_id,
+ a.name as name,
+ a.company_id as company_id,
+ a.currency_id as currency_id,
+ a.account_id as account_id,
+ a.general_account_id as general_account_id,
+ a.journal_id as journal_id,
+ a.move_id as move_id,
+ a.product_id as product_id,
+ a.product_uom_id as product_uom_id,
+ sum(a.amount) as amount,
+ sum(a.unit_amount) as unit_amount,
+ sum(a.amount_currency) as amount_currency
+ from
+ account_analytic_line a
+ group by
+ a.create_date, a.user_id,a.name,company_id,a.currency_id,
+ a.account_id,a.general_account_id,a.journal_id,
+ a.move_id,a.product_id,a.product_uom_id
+ )
+ """)
+analytic_entries_report()
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
new file mode 100644
index 00000000000..25433e607b8
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -0,0 +1,102 @@
+
+
+
+
+ analytic.entries.report.tree
+ analytic.entries.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ analytic.entries.report.search
+ analytic.entries.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Analytic Entries
+ analytic.entries.report
+ form
+ tree,graph
+ {'search_default_month':1,'search_default_Account':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
+
+
diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml
index de97bfcb798..1befff216bd 100644
--- a/addons/account/report/account_analytic_report_view.xml
+++ b/addons/account/report/account_analytic_report_view.xml
@@ -103,7 +103,7 @@
-
+
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index cc07f05c499..c6308ec9928 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -122,6 +122,6 @@
{'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}
-
+
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index c36e2313736..461347cbfbb 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -168,7 +168,7 @@
-
+