Update transaction_reply_wizard.py

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

View File

@ -44,11 +44,11 @@ class TransactionReturnWizard(models.TransientModel):
'name': self.filename,
'datas': self.attachment_id,
'type': 'binary',
'res_model': 'cm.attachment.rule', # ضع هنا اسم النموذج الذي تقوم بحفظ المرفق له
'res_id': transaction.id, # المعرف المرتبط بالسجل الأساسي الذي تريد ربط المرفق به
'res_model': 'cm.attachment.rule',
'res_id': transaction.id,
})
transaction.attachment_rule_ids.create({
'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
'file_save': [(4, attachment.id)],
# 'name': transaction.id,
'description': self.att_description,
'attachment_filename': self.filename,