client reported issue reported
This commit is contained in:
parent
a2418f282d
commit
060551f72e
|
@ -86,7 +86,8 @@ class Project(models.Model):
|
|||
|
||||
def write(self, vals):
|
||||
res = super(Project, self).write(vals)
|
||||
self.add_allowed_internal_users()
|
||||
if 'allowed_internal_user_ids' in vals:
|
||||
self.add_allowed_internal_users()
|
||||
return res
|
||||
#############
|
||||
|
||||
|
@ -103,7 +104,7 @@ class Project(models.Model):
|
|||
consultant_list.append(consultant.employee_id.user_id.id)
|
||||
users = (set(user_list)) - (set(consultant_list))
|
||||
for record in list(users):
|
||||
emp_obj = self.env['hr.employee'].search([('user_id', '=', record)]).id
|
||||
emp_obj = self.env['hr.employee'].search([('user_id', '=', record)])
|
||||
if emp_obj:
|
||||
employee_obj.append(emp_obj)
|
||||
if employee_obj:
|
||||
|
@ -111,8 +112,9 @@ class Project(models.Model):
|
|||
if self._origin.id:
|
||||
if self.pricing_type == 'employee_rate':
|
||||
self.sale_line_employee_ids.create({'project_id': self._origin.id,
|
||||
'employee_id': employee,
|
||||
'start_date': self.date_start})
|
||||
'employee_id': employee.id,
|
||||
'start_date': self.date_start,
|
||||
'employee_price': employee.timesheet_cost})
|
||||
|
||||
def _onchange_calculate_timesheet_hours(self):
|
||||
self.consultant_timesheet_hrs = [(6, 0, False)]
|
||||
|
|
Loading…
Reference in New Issue