diff --git a/odex25_transactions/exp_transaction_documents/models/transaction.py b/odex25_transactions/exp_transaction_documents/models/transaction.py index 5102e9db6..dc69937f7 100644 --- a/odex25_transactions/exp_transaction_documents/models/transaction.py +++ b/odex25_transactions/exp_transaction_documents/models/transaction.py @@ -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 diff --git a/odex25_transactions/exp_transaction_leave/models/leave.py b/odex25_transactions/exp_transaction_leave/models/leave.py index c2ccc76fc..4daf200b8 100644 --- a/odex25_transactions/exp_transaction_leave/models/leave.py +++ b/odex25_transactions/exp_transaction_leave/models/leave.py @@ -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