mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_credit_control: too many attachements in sent emails. closes #559.
This commit is contained in:
committed by
Pedro M. Baeza
parent
a8eb266c1d
commit
1b7f033bca
@@ -5,7 +5,7 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
'name': 'Account Credit Control',
|
||||
'version': '9.0.1.0.1',
|
||||
'version': '9.0.1.0.2',
|
||||
'author': "Camptocamp, "
|
||||
"Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
|
||||
@@ -162,7 +162,6 @@ class CreditCommunication(models.TransientModel):
|
||||
def _generate_emails(self):
|
||||
""" Generate email message using template related to level """
|
||||
emails = self.env['mail.mail']
|
||||
attachments = self.env['ir.attachment']
|
||||
required_fields = ['subject',
|
||||
'body_html',
|
||||
'email_from',
|
||||
@@ -187,7 +186,7 @@ class CreditCommunication(models.TransientModel):
|
||||
|
||||
comm.credit_control_line_ids.write({'mail_message_id': email.id,
|
||||
'state': state})
|
||||
|
||||
attachments = self.env['ir.attachment']
|
||||
for att in email_values.get('attachments', []):
|
||||
attach_fname = att[0]
|
||||
attach_datas = att[1]
|
||||
|
||||
Reference in New Issue
Block a user