Merge pull request #889 from expsa/dev_odex25_transactions
Dev odex25 transactions
This commit is contained in:
commit
b7cda4a316
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue