commit
ffdf8a181b
|
|
@ -130,6 +130,7 @@ class Transaction(models.Model):
|
|||
for rec in self:
|
||||
if rec.to_ids:
|
||||
employee_id = rec.to_ids[0].id
|
||||
rec.receive_id = False
|
||||
if rec.to_ids[0].type == 'unit':
|
||||
employee_id = rec.to_ids[0].secretary_id.id
|
||||
rec.receive_id = employee_id
|
||||
|
|
|
|||
|
|
@ -212,6 +212,9 @@ class Transaction(models.Model):
|
|||
|
||||
def compute_receive_id(self):
|
||||
for rec in self:
|
||||
rec.receive_id = False
|
||||
rec.to_user_have_leave = False
|
||||
rec.receive_user_id = False
|
||||
employee_id, unit_id = self.get_employee_id(rec)
|
||||
rec.receive_id = employee_id
|
||||
rec.receive_user_id = rec.receive_id.user_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue