diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index cc3f282e9fa..7f0c6cc09a6 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -45,7 +45,9 @@ class hr_expense_report(osv.osv):
'department_id':fields.many2one('hr.department','Department',readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
+ 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'state': fields.selection([
@@ -67,6 +69,7 @@ class hr_expense_report(osv.osv):
date_trunc('day',s.create_date) as date,
s.employee_id,
s.journal_id,
+ s.currency_id,
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_confirm,
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_valid,
s.invoice_id,
@@ -75,6 +78,7 @@ class hr_expense_report(osv.osv):
to_char(date_trunc('day',s.create_date), 'MM') as month,
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD') as day,
l.product_id as product_id,
+ l.analytic_account as analytic_account,
sum(l.unit_quantity * u.factor) as product_qty,
s.user_id as user_id,
s.company_id as company_id,
@@ -82,18 +86,20 @@ class hr_expense_report(osv.osv):
(sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.state
- from
- hr_expense_line l
- left join
- hr_expense_expense s on (s.id=l.expense_id)
- left join product_uom u on (u.id=l.uom_id)
+ from hr_expense_line l
+ left join hr_expense_expense s on (s.id=l.expense_id)
+ left join product_uom u on (u.id=l.uom_id)
group by
date_trunc('day',s.create_date),
+ to_char(date_trunc('day',s.create_date), 'YYYY'),
+ to_char(date_trunc('day',s.create_date), 'MM'),
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD'),
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY'),
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY'),
l.product_id,
+ l.analytic_account,
s.invoice_id,
+ s.currency_id,
s.department_id,
l.uom_id,
s.user_id,
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index ae111fa6796..e2dbe60ef4e 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -14,9 +14,11 @@
+
+
@@ -115,7 +117,10 @@
+
+
+