summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-11-02 09:56:24 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-11-02 09:56:24 +0700
commite68240fe7de4b327785f80ad629b34550c3d8554 (patch)
treebab24d178a426f829b098533fde7886bfb81d033
parentf1f514d8c2d2ef9e3203b4387794274e137de86b (diff)
fix error open journal entries
-rw-r--r--indoteknik_custom/models/account_move.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index aa4b0b1e..1e0c56cf 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -15,6 +15,8 @@ class AccountMove(models.Model):
@api.onchange('date_kirim_tukar_faktur')
def change_date_kirim_tukar_faktur(self):
for invoice in self:
+ if not invoice.date_kirim_tukar_faktur:
+ return
tukar_date = invoice.date_kirim_tukar_faktur
term = invoice.invoice_payment_term_id
add_days = 0
@@ -26,6 +28,8 @@ class AccountMove(models.Model):
@api.onchange('date_terima_tukar_faktur')
def change_date_terima_tukar_faktur(self):
for invoice in self:
+ if not invoice.date_terima_tukar_faktur:
+ return
tukar_date = invoice.date_terima_tukar_faktur
term = invoice.invoice_payment_term_id
add_days = 0