diff options
| -rw-r--r-- | indoteknik_custom/models/letter_receivable.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/views/letter_receivable.xml | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/indoteknik_custom/models/letter_receivable.py b/indoteknik_custom/models/letter_receivable.py index b1c82b12..1445800f 100644 --- a/indoteknik_custom/models/letter_receivable.py +++ b/indoteknik_custom/models/letter_receivable.py @@ -124,13 +124,13 @@ class SuratPiutang(models.Model): } new_letter = self.create(new_vals) self.env.user.notify_info( - message=f"Surat lanjutan {dict(self._fields['perihal'].selection).get(next_perihal)} berhasil dibuat ({new_letter.name}).", + message=f"{dict(self._fields['perihal'].selection).get(next_perihal)} berhasil dibuat ({new_letter.name}).", title="Informasi", sticky=False ) new_letter.message_post( body= - f"Surat lanjutan dengan perihal <b>{dict(self._fields['perihal'].selection).get(next_perihal)}</b> " + f"<b>{dict(self._fields['perihal'].selection).get(next_perihal)}</b> " f"berhasil dibuat berdasarkan surat sebelumnya.<br/>" f"Nomor Surat: <b>{new_letter.name}</b>" ) diff --git a/indoteknik_custom/views/letter_receivable.xml b/indoteknik_custom/views/letter_receivable.xml index 86c28765..98ea7768 100644 --- a/indoteknik_custom/views/letter_receivable.xml +++ b/indoteknik_custom/views/letter_receivable.xml @@ -35,8 +35,7 @@ string="Buat Surat Lanjutan" type="object" class="btn-primary" - - /> + attrs="{'invisible': ['|', ('state', '!=', 'sent'), ('perihal', '=', 'sp3')]}"/> <!-- <button name="action_send_letter" type="object" string="Email Send" class="btn-primary"/> --> </header> <div class="alert alert-info" |
