diff options
| author | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-15 14:45:43 +0700 |
|---|---|---|
| committer | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-15 14:45:43 +0700 |
| commit | 570087805ec46b8af7651187cfcf0ecef2733912 (patch) | |
| tree | dcdbe013de77cd696d9935d738f430641a911768 /indoteknik_custom/models | |
| parent | 2b61b810f5b12f32bf837ab34c12d832d0be12eb (diff) | |
(andri) rev penamaan surat dan doc
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/letter_receivable.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/letter_receivable.py b/indoteknik_custom/models/letter_receivable.py index fe598e50..18485f01 100644 --- a/indoteknik_custom/models/letter_receivable.py +++ b/indoteknik_custom/models/letter_receivable.py @@ -215,7 +215,7 @@ class SuratPiutang(models.Model): attachment_base64 = base64.b64encode(pdf_content) attachment = self.env['ir.attachment'].create({ - 'name': f"Surat Piutang {self.name}.pdf", + 'name': f"{self.perihal_label} - {self.partner_id.name}.pdf", 'type': 'binary', 'datas': attachment_base64, 'res_model': 'surat.piutang', @@ -224,7 +224,8 @@ class SuratPiutang(models.Model): }) values = { - 'subject': template.subject.replace('${object.name}', self.name or ''), + # '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', 'body_html': body_html, |
