Update forward_trasaction.py

This commit is contained in:
zainab2097 2024-08-25 13:30:03 +03:00 committed by GitHub
parent bfb903ae8e
commit 8ad31b8f12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -62,13 +62,12 @@ class ForwardTransactionWizard(models.TransientModel):
'name': 'Forward Attachment',
'datas': self.forward_attachment_id,
'type': 'binary',
'res_model': transaction._name, # ضع هنا اسم النموذج الذي تقوم بحفظ المرفق له
'res_id': transaction.id, # المعرف المرتبط بالسجل الأساسي الذي تريد ربط المرفق به
'res_model': transaction._name,
'res_id': transaction.id,
})
print('transaction._name = ',transaction._name)
transaction.attachment_rule_ids.create({
'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
# 'name': transaction.id,
'file_save': [(4, attachment.id)],
'description': self.att_description,
'attachment_filename': self.filename,
})