mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX][account_credit_control] Do not link e-mails to Transient records
Transient records are deleted periodically so res_id will point to ID which does not exists. And when reading email records system would also check if res_id can be read by user which would cause an exception because res_id might not exist at that point.
This commit is contained in:
@@ -194,7 +194,10 @@ class CreditCommunication(models.TransientModel):
|
||||
comm.id,
|
||||
context=context)
|
||||
email_values['type'] = 'email'
|
||||
|
||||
# model is Transient record (self) removed periodically so no point
|
||||
# of storing res_id
|
||||
email_values.pop('model', None)
|
||||
email_values.pop('res_id', None)
|
||||
email = email_message_obj.create(email_values)
|
||||
|
||||
state = 'sent'
|
||||
|
||||
Reference in New Issue
Block a user