Merge pull request #873 from expsa/dev_odex25_transactions

Dev odex25 transactions
This commit is contained in:
zainab2097 2024-08-22 14:06:33 +03:00 committed by GitHub
commit 7173707988
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -59,8 +59,8 @@ class ForwardTransactionWizard(models.TransientModel):
# 'res_id': transaction.id,
# })
attachment = self.env['ir.attachment'].create({
'name': self.filename,
'datas': self.attachment_id,
'name': 'Forward Attachment',
'datas': self.forward_attachment_id,
'type': 'binary',
'res_model': 'cm.attachment.rule', # ضع هنا اسم النموذج الذي تقوم بحفظ المرفق له
'res_id': transaction.id, # المعرف المرتبط بالسجل الأساسي الذي تريد ربط المرفق به
@ -69,7 +69,7 @@ class ForwardTransactionWizard(models.TransientModel):
'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
# 'name': transaction.id,
'description': self.att_description,
'attachment_filename': self.filename,
'attachment_': self.filename,
})
# transaction.file_save = [(4, attachment.id)] # Link the created attachment