summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/dunning_run.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-02-10 10:36:16 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-02-10 10:36:16 +0700
commitbbf176b0ce51ade22b74d0df2023025a4cef3efa (patch)
tree24d2d3c7e3fed5c0672a9063a09e3c4d33ba3dac /indoteknik_custom/models/dunning_run.py
parentbd01d7a842c8b6e4aea6a2fc3615a9d57fbcd470 (diff)
parentb0de64ae769148a009d0a08a957c5c35dee174a9 (diff)
Merge branch 'release' into line_no_sales_order
Diffstat (limited to 'indoteknik_custom/models/dunning_run.py')
-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: