From aaa73b04e972020246f8ee764f4149fcc209b05b Mon Sep 17 00:00:00 2001 From: projectsodoo Date: Sun, 20 Dec 2020 17:46:32 +0530 Subject: [PATCH] Updated budgeted report --- project_report/report/project_budget_hrs_analysis.py | 5 ++++- project_report/views/project_view.xml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/project_report/report/project_budget_hrs_analysis.py b/project_report/report/project_budget_hrs_analysis.py index df7e2d5..6b62f34 100755 --- a/project_report/report/project_budget_hrs_analysis.py +++ b/project_report/report/project_budget_hrs_analysis.py @@ -27,9 +27,12 @@ class BudgetHrsAnalysis(models.Model): PRO.id AS project_id, PRO.partner_id AS partner_id, AAL.employee_id AS employee_id, - PRO.budgeted_hours AS budgeted_hours, + sum(SOL.product_uom_qty) As budgeted_hours, + --PRO.budgeted_hours AS budgeted_hours, sum(AAL.unit_amount) AS actual_hours FROM project_project PRO + LEFT JOIN sale_order_line SOL ON PRO.sale_line_id = SOL.id + LEFT JOIN sale_order SO ON PRO.sale_order_id = SO.id LEFT JOIN account_analytic_account AA ON PRO.analytic_account_id = AA.id LEFT JOIN account_analytic_line AAL ON AAL.account_id = AA.id WHERE AAL.amount < 0.0 AND AAL.project_id IS NOT NULL AND PRO.active = 't' AND PRO.allow_timesheets = 't' diff --git a/project_report/views/project_view.xml b/project_report/views/project_view.xml index 1ac1b86..603bde3 100755 --- a/project_report/views/project_view.xml +++ b/project_report/views/project_view.xml @@ -12,10 +12,10 @@ attrs="{'invisible': [('allow_billable','=',False)]}" string="Create Expense" widget="statinfo"> - +