Merge branch 'development' of http://103.74.223.20:8085/prakash.jain/cor-odoo into pawan_branch
This commit is contained in:
commit
6630f990f9
|
@ -85,8 +85,8 @@ class ProjectConsultantHrs(models.Model):
|
|||
domain = [
|
||||
('project_id','=',val.project_id.id),
|
||||
('employee_id', '=', val.employee_id.id),
|
||||
('date', '>=', val.start_date),
|
||||
('date', '<=', val.end_date)
|
||||
('start_datetime', '>=', val.start_date),
|
||||
('end_datetime', '<=', val.end_date)
|
||||
]
|
||||
timesheets = Timesheet.search(domain)
|
||||
val.actual_hours = sum(timesheet.unit_amount for timesheet in timesheets)
|
||||
|
|
|
@ -21,7 +21,7 @@ class BudgetHrsAnalysis(models.Model):
|
|||
partner_id = fields.Many2one('res.partner', string='Client', readonly=True)
|
||||
employee_id = fields.Many2one('hr.employee', string='Consultant', readonly=True)
|
||||
hours_type = fields.Char(string="Hours Type", readonly=True)
|
||||
hours = fields.Float("Hours", digits=(16, 2), readonly=True, group_operator="sum")
|
||||
hours = fields.Float("Timeline", digits=(16, 2), readonly=True, group_operator="sum")
|
||||
pricing_type = fields.Selection([
|
||||
('fixed_rate', 'Fixed rate'),
|
||||
('employee_rate', 'Consultant rate')
|
||||
|
@ -50,10 +50,12 @@ class BudgetHrsAnalysis(models.Model):
|
|||
ROW_NUMBER() OVER() as id,
|
||||
project_id,
|
||||
parent_project,
|
||||
startdate as start_date,
|
||||
enddate as end_date,
|
||||
--is_sub_project,
|
||||
--sub_project,
|
||||
date_start AS start_date,
|
||||
date AS end_date,
|
||||
--date_start AS start_date,
|
||||
--date AS end_date,
|
||||
timesheet_date,
|
||||
pricing_type as pricing_type,
|
||||
project_type as project_type,
|
||||
|
@ -65,6 +67,8 @@ class BudgetHrsAnalysis(models.Model):
|
|||
pro.id AS project_id,
|
||||
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
|
||||
pro_emp.employee_id AS employee_id,
|
||||
date_start AS startdate,
|
||||
date AS enddate,
|
||||
'Budgeted Hours' as hours_type,
|
||||
null::date AS timesheet_date,
|
||||
pro_emp.budgeted_qty as hours,
|
||||
|
@ -80,6 +84,8 @@ class BudgetHrsAnalysis(models.Model):
|
|||
pro.id AS project_id,
|
||||
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
|
||||
null::int AS employee_id,
|
||||
date_start AS startdate,
|
||||
date AS enddate,
|
||||
'Budgeted Hours' as hours_type,
|
||||
null::date AS timesheet_date,
|
||||
pro.budgeted_hours2 as hours,
|
||||
|
@ -95,6 +101,8 @@ class BudgetHrsAnalysis(models.Model):
|
|||
pro.id AS project_id,
|
||||
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
|
||||
AAL.employee_id AS employee_id,
|
||||
start_datetime AS startdate,
|
||||
end_datetime AS enddate,
|
||||
'Actual Hours' as hours_type,
|
||||
AAL.date AS timesheet_date,
|
||||
unit_amount as hours,
|
||||
|
@ -111,6 +119,8 @@ class BudgetHrsAnalysis(models.Model):
|
|||
pro.id AS project_id,
|
||||
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
|
||||
AAL.employee_id AS employee_id,
|
||||
start_datetime::DATE AS startdate,
|
||||
end_datetime::DATE AS enddate,
|
||||
'Actual Hours' as hours_type,
|
||||
AAL.date AS timesheet_date,
|
||||
unit_amount as hours,
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
<filter string="Project" name="group_by_project" context="{'group_by':'project_id'}"/>
|
||||
<filter string="Client" name="group_by_partner_id" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Consultant" name="group_by_employee_id" context="{'group_by':'employee_id'}"/>
|
||||
<filter string="Start Date" name="sdate" domain="[]" context="{'group_by':'start_date'}"/>
|
||||
<filter string="End Date" name="edate" domain="[]" context="{'group_by':'end_date'}"/>
|
||||
<filter string="Timesheet Date" name="tdate" domain="[]" context="{'group_by':'timesheet_date'}"/>
|
||||
<filter string="Start Date" name="sdate" domain="[]" context="{'group_by':'start_date:day'}"/>
|
||||
<filter string="End Date" name="edate" domain="[]" context="{'group_by':'end_date:day'}"/>
|
||||
<filter string="Timesheet Date" name="tdate" domain="[]" context="{'group_by':'timesheet_date:day'}"/>
|
||||
<filter string="Hours type" name="group_by_hours_type" context="{'group_by':'hours_type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<field name="res_model">project.budget.hrs.report</field>
|
||||
<field name="view_mode">graph,tree,pivot</field>
|
||||
<field name="search_view_id" ref="project_budget_hrs_report_view_search"/>
|
||||
<field name="context">{'search_default_group_by_project': 1,'search_default_group_by_hours_type': 1, 'default_res_model': 'project.budget.hrs.report'}</field>
|
||||
<field name="context">{'search_default_group_by_project': 1,'search_default_sdate': 1,'search_default_edate': 1,'search_default_group_by_hours_type': 1, 'default_res_model': 'project.budget.hrs.report'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_project_budget_report_hrs_analysis"
|
||||
|
|
|
@ -436,6 +436,7 @@ var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
|
|||
labelString: this.fields[this.state.measure].string,
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
callback: this._formatValue.bind(this),
|
||||
suggestedMax: 0,
|
||||
suggestedMin: 0,
|
||||
|
|
Loading…
Reference in New Issue