summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-09-22 11:19:17 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-09-22 11:19:17 +0700
commita68f3c46bb02d7205ed1209e2b30b786bf4c7a3c (patch)
tree81692e2e20083315a46371a206dd2ce3600d72fd
parent7f97c16e662903d42b405c618c2e26a0b7ba5146 (diff)
(andri) payment difficulty pada inv
-rw-r--r--indoteknik_custom/models/account_move.py2
-rw-r--r--indoteknik_custom/views/account_move.xml9
2 files changed, 11 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 96f791c5..79bf5581 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -99,6 +99,8 @@ class AccountMove(models.Model):
reminder_sent_date = fields.Date(string="Tanggal Reminder Terkirim")
+ payment_difficulty = fields.Selection(string="Payment Difficulty", related='partner_id.payment_difficulty', readonly=True)
+
customer_promise_date = fields.Date(
string="Janji Bayar",
help="Tanggal janji bayar dari customer setelah reminder dikirim.",
diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml
index c88effd5..ba86277a 100644
--- a/indoteknik_custom/views/account_move.xml
+++ b/indoteknik_custom/views/account_move.xml
@@ -59,6 +59,10 @@
<attribute name="widget">pdf_viewer</attribute>
</field>
<field name="invoice_user_id" position="after">
+ <field name="payment_difficulty" widget="badge"
+ decoration-info="payment_difficulty == 'normal'"
+ decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
+ decoration-danger="payment_difficulty == 'bermasalah'"/>
<field name="invoice_origin"/>
<field name="date_kirim_tukar_faktur"/>
<field name="shipper_faktur_id"/>
@@ -122,6 +126,11 @@
decoration-danger="mark_upload_efaktur == 'belum_upload'"
decoration-success="mark_upload_efaktur == 'sudah_upload'" />
<field name="due_extension" optional="hide"/>
+ <field name="payment_difficulty" widget="badge"
+ decoration-info="payment_difficulty == 'normal'"
+ decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
+ decoration-danger="payment_difficulty == 'bermasalah'"
+ optional="hide"/>
</field>
<field name="payment_state" position="after">
<field name="invoice_payment_term_id" optional="hide"/>