Merge pull request #879 from expsa/dev_odex25_transactions

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

View File

@ -65,15 +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
print('transaction._name = ',transaction._name)
transaction.attachment_rule_ids.create({
'file_save': [(4, attachment.id)], # ربط المرفق الذي تم إنشاؤه
# 'name': transaction.id,
'description': self.att_description,
'attachment_': self.filename,
})
# Create trace record
transaction.trace_ids.create({
'action': 'forward',