summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-02-10 10:35:55 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-02-10 10:35:55 +0700
commitb0de64ae769148a009d0a08a957c5c35dee174a9 (patch)
tree9df917ff06a9be467bcdcffe8f0a2f3cdb4fd0b5 /indoteknik_custom/models
parentd51c653d99a6133807e789c7b22b23e28e5abb87 (diff)
add notification in dunning run
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/dunning_run.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/dunning_run.py b/indoteknik_custom/models/dunning_run.py
index ee0669ca..98689550 100644
--- a/indoteknik_custom/models/dunning_run.py
+++ b/indoteknik_custom/models/dunning_run.py
@@ -23,6 +23,7 @@ class DunningRun(models.Model):
date_terima_tukar_faktur = fields.Date(string='Terima Faktur')
shipper_faktur_id = fields.Many2one('delivery.carrier', string='Shipper Faktur')
is_validated = fields.Boolean(string='Validated')
+ notification = fields.Char(string='Notification')
def copy_date_faktur(self):
if not self.is_validated:
@@ -51,12 +52,14 @@ class DunningRun(models.Model):
invoice.invoice_date_due = due_date
if not invoice.shipper_faktur_id:
invoice.shipper_faktur_id = self.shipper_faktur_id
+ self.notification = 'Berhasil copy tanggal terima faktur ke setiap invoice %s' % self.date_terima_tukar_faktur
def validate_dunning(self):
if not self.dunning_line:
raise UserError('Dunning Line masih kosong, generate dulu')
else:
self.is_validated = True
+ self.notification = 'Jangan lupa klik Copy Date jika sudah ada tanggal kirim / tanggal terima faktur'
def generate_dunning_line(self):
if self.is_validated: