Merge pull request #876 from expsa/fix_att

Update forward_trasaction.py
This commit is contained in:
zainab2097 2024-08-22 14:28:52 +03:00 committed by GitHub
commit dd6bea6d5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 7 deletions

View File

@ -65,13 +65,14 @@ class ForwardTransactionWizard(models.TransientModel):
'res_model': transaction._name, # ضع هنا اسم النموذج الذي تقوم بحفظ المرفق له
'res_id': transaction.id, # المعرف المرتبط بالسجل الأساسي الذي تريد ربط المرفق به
})
transaction.attachment_rule_ids.create({
'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
# 'name': transaction.id,
'description': self.att_description,
'attachment_': self.filename,
})
# transaction.file_save = [(4, attachment.id)] # Link the created attachment
# transaction.attachment_rule_ids.create({
# 'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
# # 'name': transaction.id,
# 'description': self.att_description,
# 'attachment_': self.filename,
# })
transaction.file_save = [(4, attachment.id)] # Link the created attachment
print('transaction._name = ',transaction._name)
# Create trace record
transaction.trace_ids.create({