diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-09-25 09:04:32 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-09-25 09:04:32 +0700 |
| commit | 65c0ccd8b6befa65e912e9a0126cf2ef8bdd78d7 (patch) | |
| tree | 3ce6d9106c644f84f2a908f1642846a689075fe1 /indoteknik_custom/models/letter_receivable.py | |
| parent | 8b179c22149366ecf4dd9de6e5e7b5be612e355b (diff) | |
| parent | cd0592f7b7248d25d1b7de728af87117ae0b5876 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into closing-apt
Diffstat (limited to 'indoteknik_custom/models/letter_receivable.py')
| -rw-r--r-- | indoteknik_custom/models/letter_receivable.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/letter_receivable.py b/indoteknik_custom/models/letter_receivable.py index 1445800f..16034938 100644 --- a/indoteknik_custom/models/letter_receivable.py +++ b/indoteknik_custom/models/letter_receivable.py @@ -323,11 +323,23 @@ class SuratPiutang(models.Model): 'mimetype': 'application/pdf', }) + cc_list = [ + 'finance@indoteknik.co.id', + 'akbar@indoteknik.co.id', + 'stephan@indoteknik.co.id', + 'darren@indoteknik.co.id' + ] + + sales_email = self.sales_person_id.email if self.sales_person_id else None + if sales_email and sales_email not in cc_list: + cc_list.append(sales_email) + values = { # 'subject': template.subject.replace('${object.name}', self.name or ''), 'subject': perihal_map.get(self.perihal, self.perihal or '') + " - " + (self.partner_id.name or ''), 'email_to': self.tujuan_email, 'email_from': 'finance@indoteknik.co.id', + 'email_cc': ",".join(sorted(set(cc_list))), 'body_html': body_html, 'attachments': [(attachment.name, attachment.datas)], 'reply_to': 'finance@indoteknik.co.id', |
