diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py
index 3e3266044b4..0b723b4c9e4 100644
--- a/addons/account/account_analytic_line.py
+++ b/addons/account/account_analytic_line.py
@@ -24,6 +24,7 @@ import time
from osv import fields
from osv import osv
from tools.translate import _
+import tools
class account_analytic_line(osv.osv):
_name = 'account.analytic.line'
@@ -113,20 +114,24 @@ class timesheet_invoice(osv.osv):
_description = "Analytic account costs and revenues"
_auto = False
_columns = {
- 'name': fields.date('Month', readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, select=True),
'journal_id': fields.many2one('account.analytic.journal', 'Journal', readonly=True),
'quantity': fields.float('Quantities', readonly=True),
'cost': fields.float('Credit', readonly=True),
- 'revenue': fields.float('Debit', readonly=True)
+ 'revenue': fields.float('Debit', 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),
}
_order = 'name desc, account_id'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_hr_timesheet_invoice_journal')
cr.execute("""
create or replace view report_hr_timesheet_invoice_journal as (
select
min(l.id) as id,
- date_trunc('month', l.date)::date as name,
+ to_char(l.date, 'YYYY') as name,
+ to_char(l.date,'MM') as month,
sum(
CASE WHEN l.amount>0 THEN 0 ELSE l.amount
END
@@ -141,7 +146,8 @@ class timesheet_invoice(osv.osv):
from account_analytic_line l
LEFT OUTER join product_uom u on (u.id=l.product_uom_id)
group by
- date_trunc('month', l.date),
+ to_char(l.date, 'YYYY'),
+ to_char(l.date,'MM'),
journal_id,
account_id
)""")
diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml
index 00dd4d821fc..8b5da45e965 100644
--- a/addons/account/project/project_view.xml
+++ b/addons/account/project/project_view.xml
@@ -362,29 +362,40 @@
+
+
+
+ report.hr.timesheet.invoice.journal.search
+ report.hr.timesheet.invoice.journal
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
Account cost and revenue by journal
report.hr.timesheet.invoice.journal
form
tree,graph
+
-
-
-
- Account cost and revenue by journal (This Month)
- report.hr.timesheet.invoice.journal
- form
- tree
- [('name','=',time.strftime('%Y-%m-01'))]
-
-
+
diff --git a/addons/report_analytic/report_analytic_view.xml b/addons/report_analytic/report_analytic_view.xml
index dc1a6fd1b71..50d861a10b6 100644
--- a/addons/report_analytic/report_analytic_view.xml
+++ b/addons/report_analytic/report_analytic_view.xml
@@ -57,7 +57,7 @@
tree,graph
[('state','=','open')]
-
+
diff --git a/addons/report_analytic_line/report_analytic_line_view.xml b/addons/report_analytic_line/report_analytic_line_view.xml
index e5c9a3d2c06..545021bccd4 100644
--- a/addons/report_analytic_line/report_analytic_line_view.xml
+++ b/addons/report_analytic_line/report_analytic_line_view.xml
@@ -57,7 +57,7 @@
form
tree,graph
-
+
diff --git a/addons/sale_journal/picking_journal_view.xml b/addons/sale_journal/picking_journal_view.xml
index 3a91aeb37b7..a8b2abb351d 100644
--- a/addons/sale_journal/picking_journal_view.xml
+++ b/addons/sale_journal/picking_journal_view.xml
@@ -70,17 +70,6 @@
-
- Picking by journal
- sale_journal.picking.journal
- form
- tree,form
- [('state','=','open')]
-
-
-
-
-
Picking by invoice_method
sale_journal.invoice.type.tree
diff --git a/addons/sale_journal/picking_journal_view_report.xml b/addons/sale_journal/picking_journal_view_report.xml
index 060b1fd1da6..79c795145f5 100644
--- a/addons/sale_journal/picking_journal_view_report.xml
+++ b/addons/sale_journal/picking_journal_view_report.xml
@@ -12,6 +12,7 @@
+
+ sale_journal.invoice.type.stats.search
+ sale_journal.invoice.type.stats
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Statistics on picking to invoice
sale_journal.invoice.type.stats
@@ -48,18 +68,7 @@
[('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
-
-
-
-
-
-
+
#
# Packing by journal
@@ -83,6 +92,7 @@
-
-
+
+
+ sale_journal.sale.journal.search
+ sale_journal.sale.journal
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
sale_journal.sale.journal
form
tree,form
+
@@ -104,32 +125,11 @@
form
tree,form
[]
+
-
- My open journals
- sale_journal.sale.journal
- form
- tree,form
- [('user_id','=',uid),('state','=','open')]
-
-
-
-
-
-
- Open journals
- sale_journal.sale.journal
- form
- tree,form
- [('state','=','open')]
-
-
-
-
-
sale.order.journal.view.form
form