change content from parent to sub-project

This commit is contained in:
Pawan Kumar 2021-01-28 12:53:18 +05:30
commit 9c1f081b2d
3 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,7 @@ class ProjectConsultantTimesheetHrs(models.Model):
_description = 'Project Consultant Timesheet Hrs'
project_id = fields.Many2one('project.project', "Project")
employee_id = fields.Many2one('hr.employee')
employee_id = fields.Many2one('hr.employee', string="Consultant")
employee_price = fields.Float(string="Consultant Price", default=0.0)
timesheet_hour = fields.Float("Timesheet Hour", default=0.0)
consultant_cost = fields.Float("Actual Cost", compute='_compute_consultant_timesheet_cost', default=0.0)

View File

@ -6,4 +6,4 @@ class SubProject(models.Model):
_description = "Sub Project"
is_sub_project = fields.Boolean("Is Sub Project")
parent_project = fields.Many2one('project.project', string='Parent Project')
sub_project = fields.Many2one('project.project', string='Sub Project')

View File

@ -14,7 +14,7 @@
<field name="is_sub_project"/>
</group>
<group>
<field name="parent_project" attrs="{'invisible': [('is_sub_project', '=', False)], 'required': [('is_sub_project', '=', True)]}"
<field name="sub_project" attrs="{'invisible': [('is_sub_project', '=', False)], 'required': [('is_sub_project', '=', True)]}"
options="{'no_open': True, 'no_create': True, 'no_create_edit': True}"/>
</group>
</page>