Merge pull request #889 from expsa/dev_odex25_transactions

Dev odex25 transactions
This commit is contained in:
zainab2097 2024-08-25 13:39:12 +03:00 committed by GitHub
commit b7cda4a316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 9 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,

View File

@ -62,15 +62,14 @@ 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_': self.filename,
'attachment_filename': self.filename,
})
# Create trace record