fix it transaction
This commit is contained in:
parent
26c633f277
commit
b1e80919a4
|
|
@ -162,7 +162,7 @@ class InternalTransaction(models.Model):
|
|||
|
||||
if record.to_user_have_leave:
|
||||
record.forward_user_id = record.receive_id.user_id.id
|
||||
record.state='send'
|
||||
record.state='to_approve'
|
||||
record.send_message(template=template)
|
||||
subj = _('Message Has been sent!')
|
||||
msg = _(u'{} ← {}').format(record.employee_id.name, record.to_ids.name)
|
||||
|
|
|
|||
|
|
@ -323,8 +323,8 @@ class Transaction(models.Model):
|
|||
to_id = transaction.to_ids[0].id
|
||||
if transaction.to_ids[0].type != 'employee':
|
||||
to_id = transaction.to_ids.manager_id.id
|
||||
# if transaction.subject_type_id.transaction_need_approve or transaction.preparation_id.need_approve and transaction.state == 'to_approve':
|
||||
# to_id = transaction.preparation_id.manager_id.id
|
||||
if transaction.subject_type_id.transaction_need_approve or transaction.preparation_id.need_approve and transaction.state == 'to_approve':
|
||||
to_id = transaction.preparation_id.manager_id.id
|
||||
transaction.trace_ids.create({
|
||||
'action': action,
|
||||
'to_id': to_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue