From 570087805ec46b8af7651187cfcf0ecef2733912 Mon Sep 17 00:00:00 2001 From: AndriFP <113114423+andrifp@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:45:43 +0700 Subject: (andri) rev penamaan surat dan doc --- indoteknik_custom/models/letter_receivable.py | 5 +++-- indoteknik_custom/report/report_surat_piutang.xml | 1 + indoteknik_custom/views/letter_receivable.xml | 4 ++-- indoteknik_custom/views/letter_receivable_mail_template.xml | 2 +- 4 files changed, 7 insertions(+), 5 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, diff --git a/indoteknik_custom/report/report_surat_piutang.xml b/indoteknik_custom/report/report_surat_piutang.xml index 4685f5a6..770aa535 100644 --- a/indoteknik_custom/report/report_surat_piutang.xml +++ b/indoteknik_custom/report/report_surat_piutang.xml @@ -9,6 +9,7 @@ qweb-pdf indoteknik_custom.report_surat_piutang indoteknik_custom.report_surat_piutang + '%s - %s' % (object.perihal_label or '', object.partner_id.name or '') report diff --git a/indoteknik_custom/views/letter_receivable.xml b/indoteknik_custom/views/letter_receivable.xml index 334e83c4..ad1f6281 100644 --- a/indoteknik_custom/views/letter_receivable.xml +++ b/indoteknik_custom/views/letter_receivable.xml @@ -26,8 +26,8 @@
-