summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-02 14:04:56 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-02 14:04:56 +0700
commit7d89516ce05d0ea67733c04436cc2de544189efe (patch)
tree2521fbf09f4695253fd7db1ff7613b7f003f20ea /indoteknik_custom/views
parent10da5e27e658030f171f694d6696f93e4a472447 (diff)
parent875b20796c7fa64abebe430b2707df597e29836b (diff)
Merge branch 'pum-v2' of https://bitbucket.org/altafixco/indoteknik-addons into pum-v2
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/account_move.xml10
-rw-r--r--indoteknik_custom/views/account_move_line.xml3
-rw-r--r--indoteknik_custom/views/account_move_views.xml3
-rw-r--r--indoteknik_custom/views/approval_payment_term.xml2
-rw-r--r--indoteknik_custom/views/dunning_run.xml5
-rw-r--r--indoteknik_custom/views/ir_sequence.xml9
-rw-r--r--indoteknik_custom/views/letter_receivable.xml190
-rw-r--r--indoteknik_custom/views/letter_receivable_mail_template.xml77
-rw-r--r--indoteknik_custom/views/mail_template_invoice_reminder.xml1
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml11
-rw-r--r--indoteknik_custom/views/refund_sale_order.xml3
-rw-r--r--indoteknik_custom/views/report_logbook_sj.xml92
-rw-r--r--indoteknik_custom/views/res_partner.xml14
-rwxr-xr-xindoteknik_custom/views/sale_order.xml21
-rw-r--r--indoteknik_custom/views/sj_tele.xml15
-rw-r--r--indoteknik_custom/views/stock_picking.xml10
-rw-r--r--indoteknik_custom/views/tukar_guling_po.xml2
-rw-r--r--indoteknik_custom/views/unpaid_invoice_view.xml100
18 files changed, 504 insertions, 64 deletions
diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml
index 1b477c6d..ba86277a 100644
--- a/indoteknik_custom/views/account_move.xml
+++ b/indoteknik_custom/views/account_move.xml
@@ -39,6 +39,7 @@
</field>
<field name="ref" position="after">
<field name="sale_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', True)]}"/>
+ <field name="refund_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', False)]}"/>
<field name="refund_so_links" readonly="1" widget="html" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', False)]}"/>
<field name="has_refund_so" invisible="1"/>
</field>
@@ -58,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"/>
@@ -121,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"/>
diff --git a/indoteknik_custom/views/account_move_line.xml b/indoteknik_custom/views/account_move_line.xml
index 02b936f1..017a9eda 100644
--- a/indoteknik_custom/views/account_move_line.xml
+++ b/indoteknik_custom/views/account_move_line.xml
@@ -6,6 +6,9 @@
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
+ <xpath expr="//page[@id='aml_tab']/field[@name='line_ids']" position="attributes">
+ <attribute name="attrs">{'readonly': [('refund_id','!=',False)]}</attribute>
+ </xpath>
<xpath expr="//page[@id='aml_tab']/field[@name='line_ids']/tree/field[@name='currency_id']" position="before">
<field name="is_required" invisible="1"/>
</xpath>
diff --git a/indoteknik_custom/views/account_move_views.xml b/indoteknik_custom/views/account_move_views.xml
index 7c1f8913..08b93f1f 100644
--- a/indoteknik_custom/views/account_move_views.xml
+++ b/indoteknik_custom/views/account_move_views.xml
@@ -66,7 +66,8 @@
<group>
<group>
<field name="partner_id" readonly="1"/>
- <field name="day_extension" attrs="{'readonly': [('is_approve', '=', True)]}"/>
+ <field name="payment_term"/>
+ <field name="day_extension" attrs="{'readonly': [('is_approve', '=', True)]}"/>
<field name="order_id" readonly="1"/>
<field name="amount_total" readonly="1"/>
</group>
diff --git a/indoteknik_custom/views/approval_payment_term.xml b/indoteknik_custom/views/approval_payment_term.xml
index 5c130f3f..b0b99689 100644
--- a/indoteknik_custom/views/approval_payment_term.xml
+++ b/indoteknik_custom/views/approval_payment_term.xml
@@ -7,7 +7,7 @@
<tree default_order="create_date desc">
<field name="number"/>
<field name="partner_id"/>
- <field name="parent_id"/>
+ <field name="parent_id" optional="hide"/>
<field name="property_payment_term_id"/>
<field name="create_date" optional="hide"/>
<field name="approve_date" optional="hide"/>
diff --git a/indoteknik_custom/views/dunning_run.xml b/indoteknik_custom/views/dunning_run.xml
index f624c42e..51377f78 100644
--- a/indoteknik_custom/views/dunning_run.xml
+++ b/indoteknik_custom/views/dunning_run.xml
@@ -25,13 +25,14 @@
<field name="arch" type="xml">
<tree>
<field name="partner_id"/>
+ <field name="reference"/>
<field name="invoice_id"/>
<field name="date_invoice"/>
- <field name="efaktur_id"/>
- <field name="reference"/>
+ <field name="efaktur_id" optional="hide"/>
<field name="total_amt" sum="Grand Total Amount"/>
<field name="open_amt"/>
<field name="due_date"/>
+ <field name="payment_term"/>
</tree>
</field>
</record>
diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml
index 07888036..9ab4dd22 100644
--- a/indoteknik_custom/views/ir_sequence.xml
+++ b/indoteknik_custom/views/ir_sequence.xml
@@ -238,5 +238,14 @@
<field name="number_increment">1</field>
<field name="active">True</field>
</record>
+
+ <record id="seq_surat_piutang" model="ir.sequence">
+ <field name="name">Surat Piutang</field>
+ <field name="code">surat.piutang</field>
+ <field name="prefix"></field> <!-- format manual di model -->
+ <field name="padding">3</field>
+ <field name="number_next">1</field>
+ <field name="number_increment">1</field>
+ </record>
</data>
</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/letter_receivable.xml b/indoteknik_custom/views/letter_receivable.xml
new file mode 100644
index 00000000..98ea7768
--- /dev/null
+++ b/indoteknik_custom/views/letter_receivable.xml
@@ -0,0 +1,190 @@
+<odoo>
+ <!-- Tree View -->
+ <record id="view_surat_piutang_tree" model="ir.ui.view">
+ <field name="name">surat.piutang.tree</field>
+ <field name="model">surat.piutang</field>
+ <field name="arch" type="xml">
+ <tree string="Surat Piutang">
+ <field name="name"/>
+ <field name="partner_id"/>
+ <field name="perihal"/>
+ <field name="state" widget="badge"
+ decoration-danger="state == 'draft'"
+ decoration-warning="state in ('waiting_approval_sales', 'waiting_approval_pimpinan')"
+ decoration-success="state == 'sent'"/>
+ <field name="send_date"/>
+ <!-- <field name="line_ids" widget="one2many_list"/> -->
+ </tree>
+ </field>
+ </record>
+
+ <!-- Form View -->
+ <record id="view_surat_piutang_form" model="ir.ui.view">
+ <field name="name">surat.piutang.form</field>
+ <field name="model">surat.piutang</field>
+ <field name="arch" type="xml">
+ <form string="Surat Piutang">
+ <header>
+ <field name="state" widget="statusbar" statusbar_visible="draft,waiting_approval_sales,waiting_approval_pimpinan,sent"/>
+ <button name="action_approve"
+ type="object"
+ string="Approve"
+ class="btn-primary"
+ attrs="{'invisible':[('state', '=', 'sent')]}"/>
+ <button name="action_create_next_letter"
+ 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"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;"
+ attrs="{'invisible':[('state', '!=', 'draft')]}">
+ Selamat Datang di form Pengajuan Surat Piutang, Pastikan data sudah benar sebelum mengajukan approval.
+ </div>
+ <div class="alert alert-info"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('perihal', '!=', 'penagihan'), ('state', '!=', 'waiting_approval_pimpinan')]}">
+ <strong>Info!</strong> Surat resmi penagihan telah diajukan &amp; surat otomatis terkirim bila telah di approve.
+ </div>
+ <div class="alert alert-info"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;"
+ attrs="{'invisible':[('state', '!=', 'waiting_approval_sales')]}">
+ <strong>Info!</strong> Surat peringatan piutang ini sedang menunggu persetujuan dari <b>Sales Manager</b>.
+ Silakan hubungi Sales Manager terkait untuk melakukan approval agar proses dapat dilanjutkan ke tahap berikutnya.
+ </div>
+ <div class="alert alert-info"
+ role="alert"
+ style="margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('perihal', '=', 'penagihan'), ('state', '!=', 'waiting_approval_pimpinan')]}">
+ <strong>Info!</strong> Surat peringatan piutang ini sedang menunggu persetujuan dari <b>Pimpinan</b>.
+ Silakan hubungi Pimpinan terkait untuk melakukan approval agar surat dapat terkirim otomatis ke customer.
+ </div>
+ <div class="alert alert-success"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;"
+ attrs="{'invisible': ['|', ('perihal', '!=', 'sp3'), ('state', 'not in', ['draft', 'sent'])]}">
+ Surat Piutang berhasil terkirim dan silahkan klik tombol 'Buat Surat Lanjutan' untuk membuat surat piutang lanjutan.
+ </div>
+ <sheet>
+ <div class="oe_title">
+ <h1>
+ <field name="name" readonly="1"/>
+ </h1>
+ </div>
+ <group colspan="2">
+ <group>
+ <field name="tujuan_nama" attrs="{'readonly':[('state','=','sent')]}"/>
+ <field name="tujuan_email" attrs="{'readonly':[('state','=','sent')]}"/>
+ <field name="perihal" attrs="{'readonly':[('state','=','sent')]}"/>
+ <field name="partner_id" options="{'no_create': True}" attrs="{'readonly':[('state','=','sent')]}"/>
+ </group>
+ <group>
+ <field name="payment_difficulty"/>
+ <field name="sales_person_id"/>
+ <field name="send_date" readonly="1"/>
+ </group>
+ </group>
+ <!-- <group>
+ <button name="action_refresh_lines"
+ string="Refresh Invoices"
+ type="object"
+ class="btn-primary"
+ help="Refresh Invoices agar data tetap update"/>
+ </group> -->
+ <notebook>
+ <page string="Invoice Lines">
+ <div class="alert alert-info"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;">
+ <strong>Info!</strong> Hanya invoice yang dipilih (tercentang) akan disertakan dalam dokumen surat piutang.
+ </div>
+ <!-- Flex container -->
+ <div style="display:flex; justify-content:space-between; align-items:center;">
+ <div>
+ <div>
+ <strong>Grand Total Invoice Terpilih:<br/>Rp.
+ <field name="grand_total"/> (
+ <field name="grand_total_text"/>
+ )
+ </strong>
+ </div>
+ <div>
+ <strong>Periode Invoices Terpilih:
+ <field name="periode_invoices_terpilih"/>
+ </strong>
+ </div>
+ </div>
+ <div>
+ <button name="action_refresh_lines"
+ string="Refresh Invoices"
+ type="object"
+ class="btn-primary"
+ style="margin-left:10px;"
+ help="Refresh Invoices agar data tetap update"/>
+ </div>
+ </div>
+ <field name="line_ids" attrs="{'readonly': [('state', '=', 'sent')]}">
+ <tree editable="bottom" create="false" delete="false">
+ <field name="selected"/>
+ <field name="invoice_id" readonly="1" optional="hide" force_save="1"/>
+ <field name="invoice_number" readonly="1" force_save="1"/>
+ <field name="ref" readonly="1" force_save="1"/>
+ <field name="invoice_date" readonly="1" force_save="1"/>
+ <field name="invoice_date_due" readonly="1" force_save="1"/>
+ <field name="invoice_day_to_due" readonly="1" force_save="1"/>
+ <field name="new_invoice_day_to_due" readonly="1" force_save="1"/>
+ <field name="amount_residual" readonly="1" force_save="1" sum="Grand Total"/>
+ <field name="currency_id" readonly="1" optional="hide" force_save="1"/>
+ <field name="payment_term_id" readonly="1" force_save="1"/>
+ <field name="date_kirim_tukar_faktur" readonly="1" optional="hide" force_save="1"/>
+ <field name="date_terima_tukar_faktur" readonly="1" optional="hide" force_save="1"/>
+ <field name="invoice_user_id" readonly="1" optional="hide" force_save="1"/>
+ <field name="sale_id" readonly="1" optional="hide" force_save="1"/>
+ </tree>
+ </field>
+ </page>
+ </notebook>
+ <div style="font-size:13px; color:#444; line-height:1.5;">
+ Surat piutang akan diterbitkan berdasarkan lama keterlambatan pembayaran.<br/>
+ Pilih invoice yang sesuai dengan kriteria berikut:
+ <ul style="margin:4px 0 0 18px;">
+ <li>Keterlambatan ≥ 45 hari → <em>Surat Resmi Penagihan (tanpa ttd digital &amp; cap stempel pimpinan)</em></li>
+ <li>Keterlambatan ≥ 60 hari → <em>Surat Peringatan Piutang ke-1 </em></li>
+ <li>Keterlambatan ≥ 70 hari → <em>Surat Peringatan Piutang ke-2 </em></li>
+ <li>Keterlambatan ≥ 80 hari → <em>Surat Peringatan Piutang ke-3 </em></li>
+ </ul>
+ </div>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
+ </div>
+ </form>
+ </field>
+ </record>
+
+ <!-- Menu -->
+ <record id="menu_surat_piutang_root" model="ir.ui.menu">
+ <field name="name">Surat Piutang</field>
+ <field name="parent_id" ref="account.menu_finance"/>
+ <field name="sequence" eval="10"/>
+ </record>
+
+ <record id="action_surat_piutang" model="ir.actions.act_window">
+ <field name="name">Surat Piutang</field>
+ <field name="res_model">surat.piutang</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_surat_piutang_tree"/>
+ </record>
+
+ <menuitem id="menu_surat_piutang"
+ name="Surat Piutang"
+ parent="account.menu_finance_receivables"
+ action="action_surat_piutang"
+ sequence="1"/>
+</odoo>
diff --git a/indoteknik_custom/views/letter_receivable_mail_template.xml b/indoteknik_custom/views/letter_receivable_mail_template.xml
new file mode 100644
index 00000000..fa0fbc86
--- /dev/null
+++ b/indoteknik_custom/views/letter_receivable_mail_template.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data noupdate="0">
+ <record id="letter_receivable_mail_template" model="mail.template">
+ <field name="name">Surat Piutang Invoices</field>
+ <field name="model_id" ref="indoteknik_custom.model_surat_piutang"/>
+ <field name="subject"></field>
+ <field name="email_from">finance@indoteknik.co.id</field>
+ <field name="email_to"></field>
+ <field name="body_html" type="html">
+ <div style="font-family:Arial, sans-serif; font-size:13px; color:#333;">
+ <div><b>Dengan hormat,</b></div>
+ <br/>
+ <div>Kepada Yth.</div>
+ <div><b>Manajemen ${object.partner_id.name}</b></div>
+ <br/>
+ <div>
+ Melalui email ini, kami ingin mengingatkan kembali terkait kewajiban pembayaran
+ ${object.partner_id.name} atas transaksi dengan rincian sebagai berikut:
+ </div>
+ <br/>
+
+ <table cellpadding="6" cellspacing="0" width="100%"
+ style="border-collapse:collapse; font-size:12px; border:1px solid #ddd;">
+ <thead>
+ <tr style="background-color:#f2f2f2; text-align:left;">
+ <th style="border:1px solid #ddd;">Invoice Number</th>
+ <th style="border:1px solid #ddd;">Customer</th>
+ <th style="border:1px solid #ddd;">Invoice Date</th>
+ <th style="border:1px solid #ddd;">Due Date</th>
+ <th style="border:1px solid #ddd;">Days To Due</th>
+ <th style="border:1px solid #ddd;">Reference</th>
+ <th style="border:1px solid #ddd;">Amount Due Signed</th>
+ <th style="border:1px solid #ddd;">Payment Terms</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- baris invoice akan diinject dari Python -->
+ </tbody>
+ </table>
+
+ <p>
+ Hingga saat ini, kami belum menerima pembayaran atas tagihan tersebut.
+ Mohon konfirmasi dan tindak lanjut dari pihak saudara paling lambat pada
+ tanggal <b>${object.seven_days_after_sent_date}</b> (7 hari setelah email ini dikirimkan).
+ </p>
+
+ <p>
+ Sebagai informasi, kami lampirkan <b>${object.perihal}</b> untuk menjadi perhatian.
+ Jika tidak ada tanggapan atau penyelesaian dalam batas waktu tersebut, kami akan
+ melanjutkan dengan pengiriman surat peringatan berikutnya dan mengambil langkah-langkah
+ penyelesaian sesuai ketentuan yang berlaku.
+ </p>
+
+ <p>
+ Demikian kami sampaikan. Atas perhatian dan kerja samanya, kami ucapkan terima kasih.
+ </p>
+
+ <br/><br/>
+ <p>
+ <b>
+ Best Regards,<br/><br/>
+ Widya R.<br/>
+ Dept. Finance<br/>
+ PT. INDOTEKNIK DOTCOM GEMILANG<br/>
+ <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2135765"
+ alt="Indoteknik" style="max-width:18%; height:auto;"/><br/>
+ <a href="https://wa.me/6285716970374" target="_blank">+62-857-1697-0374</a> |
+ <a href="mailto:finance@indoteknik.co.id">finance@indoteknik.co.id</a>
+ </b>
+ </p>
+ </div>
+ </field>
+ <field name="auto_delete" eval="True"/>
+ </record>
+ </data>
+</odoo>
diff --git a/indoteknik_custom/views/mail_template_invoice_reminder.xml b/indoteknik_custom/views/mail_template_invoice_reminder.xml
index 13c02a08..3534f7f6 100644
--- a/indoteknik_custom/views/mail_template_invoice_reminder.xml
+++ b/indoteknik_custom/views/mail_template_invoice_reminder.xml
@@ -17,6 +17,7 @@
style="border-collapse:collapse; font-size:12px; border:1px solid #ddd;">
<thead>
<tr style="background-color:#f2f2f2; text-align:left;">
+ <th style="border:1px solid #ddd;">No.</th>
<th style="border:1px solid #ddd;">Customer</th>
<th style="border:1px solid #ddd;">No. PO</th>
<th style="border:1px solid #ddd;">Invoice Number</th>
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 821f3295..7feec934 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -99,6 +99,7 @@
<field name="total_delivery_amt" attrs="{'required': [('partner_id', 'in', [9688, 29712])]}"/>
<field name="product_bom_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
<field name="manufacturing_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
+ <field name="show_description" attrs="{'invisible': [('partner_id', 'not in', [5571, 35475, 38198, 88261,37905, 9688, 20625, 1371, 37902, 12119])]}" widget="boolean_toggle"/>
<!-- <field name="move_id" domain="[('move_type','=','entry')]" context="{'form_view_ref': 'account.view_move_form'}" options="{'no_create': True}"/> -->
</field>
<field name="amount_total" position="after">
@@ -112,6 +113,7 @@
</field>
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
+ <field name="show_description" optional="hide" widget="boolean_toggle"/>
</field>
<field name="product_id" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
@@ -181,19 +183,20 @@
</field>
<field name="order_line" position="attributes">
- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute>
+ <!-- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute> -->
+ <attribute name="attrs">{'readonly': [('has_active_invoice', '=', True)]}</attribute>
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">
- <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes">
- <attribute name="attrs">{'readonly': []}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])]}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes">
- <attribute name="attrs">{'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page[@name='purchase_delivery_invoice']" position="before">
diff --git a/indoteknik_custom/views/refund_sale_order.xml b/indoteknik_custom/views/refund_sale_order.xml
index 0c6cd371..afa7c1cb 100644
--- a/indoteknik_custom/views/refund_sale_order.xml
+++ b/indoteknik_custom/views/refund_sale_order.xml
@@ -92,7 +92,7 @@
</div>
<field name="show_approval_alert" invisible="1"/>
<div class="alert alert-info" role="alert"
- attrs="{'invisible': ['|', ('show_approval_alert', '=', False), ('status', 'in', ['reject', 'refund'])]}">
+ attrs="{'invisible': ['|', ('show_approval_alert', '=', False), '|', ('status', 'in', ['reject', 'refund']), ('refund_type', 'not in', ['retur_full', 'retur_sebagian'])]}">
⚠️ SO sudah melakukan retur barang. Silakan lanjutkan refund.
</div>
</xpath>
@@ -217,6 +217,7 @@
<field name="finance_note"/>
</group>
<group>
+ <field name="biaya_admin"/>
<field name="bukti_refund_type" reqiured="1"/>
<field name="bukti_transfer_refund_pdf" widget="pdf_viewer" attrs="{'invisible': [('bukti_refund_type', '=', 'image')]}"/>
<field name="bukti_transfer_refund_image" widget="image" attrs="{'invisible': [('bukti_refund_type', '=', 'pdf')]}"/>
diff --git a/indoteknik_custom/views/report_logbook_sj.xml b/indoteknik_custom/views/report_logbook_sj.xml
index 94f6c2ab..46260cd5 100644
--- a/indoteknik_custom/views/report_logbook_sj.xml
+++ b/indoteknik_custom/views/report_logbook_sj.xml
@@ -12,15 +12,18 @@
<field name="date_approve"/>
<field name="approve_by_finance"/>
<field name="state"/>
+
</tree>
</field>
- </record>
+ </record>
<record id="report_logbook_sj_line_tree" model="ir.ui.view">
<field name="name">report.logbook.sj.line.tree</field>
<field name="model">report.logbook.sj.line</field>
<field name="arch" type="xml">
<tree editable="bottom">
+<!-- <field name="sequence" widget="handle"/>-->
+ <field name="line_num" string="No" readonly="1"/>
<field name="name"/>
<field name="driver_id"/>
<field name="departure_date"/>
@@ -42,50 +45,47 @@
<field name="arch" type="xml">
<form>
<header>
- <button name="approve"
- string="Validate"
- type="object"
- />
+ <button name="approve" string="Validate" type="object" />
</header>
<sheet string="Report logbook SJ">
- <div class="oe_button_box" name="button_box"/>
+ <div class="oe_button_box" name="button_box"/>
+ <group>
<group>
- <group>
- <field name="name" readonly="1"/>
- <field name="date" readonly="1"/>
- <field name="date_approve" readonly="1"/>
- </group>
- <group>
- <field name="approve_by_finance" readonly="1"/>
- <field name="state" readonly="1"/>
- <field name="created_by" readonly="1"/>
- <field name="approve_by" readonly="1"/>
- <field name="count_line" readonly="1"/>
- </group>
+ <field name="name" readonly="1"/>
+ <field name="date" readonly="1"/>
+ <field name="date_approve" readonly="1"/>
</group>
- <notebook>
- <page string="Line">
- <field name="report_logbook_sj_line"/>
- </page>
- </notebook>
- </sheet>
- <div class="oe_chatter">
- <field name="message_follower_ids" widget="mail_followers"/>
- <field name="message_ids" widget="mail_thread"/>
- </div>
+ <group>
+ <field name="approve_by_finance" readonly="1"/>
+ <field name="state" readonly="1"/>
+ <field name="created_by" readonly="1"/>
+ <field name="approve_by" readonly="1"/>
+ <field name="count_line" readonly="1"/>
+ </group>
+ </group>
+ <notebook>
+ <page string="Line">
+ <field name="report_logbook_sj_line"/>
+ </page>
+ </notebook>
+ </sheet>
+ <div class="oe_chatter">
+ <field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
+ </div>
</form>
</field>
</record>
<record id="report_logbook_sj_view_search" model="ir.ui.view">
- <field name="name">report.logbook.sj.search.view</field> <!-- Made the name more descriptive -->
- <field name="model">report.logbook.sj</field>
- <field name="arch" type="xml">
- <search string="Search Report">
- <field name="sj_number"/>
- </search>
- </field>
- </record>
+ <field name="name">report.logbook.sj.search.view</field> <!-- Made the name more descriptive -->
+ <field name="model">report.logbook.sj</field>
+ <field name="arch" type="xml">
+ <search string="Search Report">
+ <field name="sj_number"/>
+ </search>
+ </field>
+ </record>
<record id="report_logbook_sj_action" model="ir.actions.act_window">
<field name="name">Report Logbook SJ</field>
@@ -94,9 +94,19 @@
<field name="view_mode">tree,form</field>
</record>
- <menuitem id="menu_report_logbook_sj"
- name="Report Logbook SJ"
- action="report_logbook_sj_action"
- parent="account.menu_finance_reports"
- sequence="200"/>
+ <menuitem id="menu_report_logbook_sj" name="Report Logbook SJ" action="report_logbook_sj_action" parent="account.menu_finance_reports" sequence="200"/>
+
+ <data noupdate="1">
+ <record id="cron_daily_logbook_gap_to_telegram" model="ir.cron">
+ <field name="name">Daily Logbook SJ Gap → Telegram</field>
+ <field name="model_id" ref="model_report_logbook_sj"/>
+ <field name="state">code</field>
+ <field name="code">model.cron_daily_logbook_gap_to_telegram()</field>
+ <field name="interval_number">1</field>
+ <field name="interval_type">days</field>
+ <field name="numbercall">-1</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="active">False</field>
+ </record>
+ </data>
</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml
index ca1a36de..72751187 100644
--- a/indoteknik_custom/views/res_partner.xml
+++ b/indoteknik_custom/views/res_partner.xml
@@ -21,6 +21,8 @@
<field name="reference_number"/>
</field>
<field name="property_payment_term_id" position="after">
+ <field name="previous_payment_term_id" readonly="1"/>
+ <field name="is_cbd_locked" readonly="1"/>
<field name="user_payment_terms_sales" readonly="1"/>
<field name="date_payment_terms_sales" readonly="1"/>
</field>
@@ -35,9 +37,9 @@
<field name="pareto_status"/>
<field name="digital_invoice_tax"/>
</field>
- <field name="nama_wajib_pajak" position="attributes">
+ <!-- <field name="nama_wajib_pajak" position="attributes">
<attribute name="required">1</attribute>
- </field>
+ </field> -->
<field name="kota_id" position="attributes">
<attribute name="required">0</attribute>
</field>
@@ -47,14 +49,14 @@
<field name="kelurahan_id" position="attributes">
<attribute name="required">0</attribute>
</field>
- <field name="npwp" position="attributes">
+ <!-- <field name="npwp" position="attributes">
<attribute name="required">1</attribute>
</field>
<field name="alamat_lengkap_text" position="attributes">
<attribute name="required">1</attribute>
- </field>
+ </field> -->
<field name="npwp" position="before">
- <field name="customer_type" required="1"/>
+ <field name="customer_type"/>
</field>
<field name="alamat_lengkap_text" position="after">
<field name="nitku" />
@@ -107,7 +109,7 @@
<field name="reminder_invoices"/>
</xpath>
<xpath expr="//field[@name='property_payment_term_id']" position="attributes">
- <attribute name="readonly">0</attribute>
+ <attribute name="readonly">1</attribute>
</xpath>
<xpath expr="//field[@name='property_supplier_payment_term_id']" position="attributes">
<attribute name="readonly">1</attribute>
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 156c48d7..8d56bbbd 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -41,6 +41,15 @@
string="Refund"
class="btn-primary" />
</xpath>
+ <xpath expr="//sheet" position="before">
+ <field name="partner_is_cbd_locked" invisible="1"/>
+ <div class="alert alert-danger"
+ role="alert"
+ style="height: 40px; margin-bottom:0px;"
+ attrs="{'invisible':['|', ('partner_is_cbd_locked','=',False), ('state', 'not in', ['draft', 'cancel'])]}">
+ <strong>Warning!</strong> Payment Terms Customer terkunci menjadi <b>Cash Before Delivery (C.B.D.)</b> karena ada invoice telah jatuh tempo <b>30 hari</b>. Silakan ajukan <b>Approval Payment Term</b> untuk membuka kunci.
+ </div>
+ </xpath>
<div class="oe_button_box" name="button_box">
<field name="advance_payment_move_ids" invisible="1"/>
<button name="action_open_advance_payment_moves"
@@ -139,9 +148,9 @@
<field name="pareto_status"/>
</field>
<field name="analytic_account_id" position="after">
- <field name="customer_type" readonly="1"/>
- <field name="npwp" placeholder='99.999.999.9-999.999' readonly="1"/>
- <field name="sppkp" attrs="{'required': [('customer_type', '=', 'pkp')]}" readonly="1"/>
+ <field name="customer_type"/>
+ <field name="npwp" placeholder='99.999.999.9-999.999'/>
+ <field name="sppkp" attrs="{'required': [('customer_type', '=', 'pkp')]}"/>
<field name="email" required="1"/>
<field name="unreserve_id"/>
<field name="due_id" readonly="1"/>
@@ -288,9 +297,9 @@
<field name="note" optional="hide"/>
<field name="note_procurement" optional="hide"/>
<field name="vendor_subtotal" optional="hide"/>
- <field name="unreserved_percent" widget="percentpie" string="Unreserved"/>
- <field name="reserved_percent" widget="percentpie" string="Reserved"/>
- <field name="delivered_percent" widget="percentpie" string="Delivered"/>
+ <field name="unreserved_percent" widget="percentpie" string="Unreserved" optional="hide"/>
+ <field name="reserved_percent" widget="percentpie" string="Reserved" optional="hide"/>
+ <field name="delivered_percent" widget="percentpie" string="Delivered" optional="hide"/>
<field name="weight" optional="hide"/>
<field name="is_has_disc" string="Flash Sale Item?" readonly="1" optional="hide"/>
<field name="amount_voucher_disc" string="Voucher" readonly="1" optional="hide"/>
diff --git a/indoteknik_custom/views/sj_tele.xml b/indoteknik_custom/views/sj_tele.xml
new file mode 100644
index 00000000..cefcc968
--- /dev/null
+++ b/indoteknik_custom/views/sj_tele.xml
@@ -0,0 +1,15 @@
+<odoo>
+ <data noupdate="1">
+ <record id="woi" model="ir.cron">
+ <field name="name">SJ TELE</field>
+ <field name="model_id" ref="model_sj_tele"/>
+ <field name="state">code</field>
+ <field name="code">model.woi()</field>
+ <field name="interval_number">1</field>
+ <field name="interval_type">days</field>
+ <field name="numbercall">-1</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="active">False</field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml
index fc8be790..21762202 100644
--- a/indoteknik_custom/views/stock_picking.xml
+++ b/indoteknik_custom/views/stock_picking.xml
@@ -28,10 +28,14 @@
<!-- <field name="countdown_hours" optional="hide"/>
<field name="countdown_ready_to_ship" /> -->
</field>
+
+ <field name="scheduled_date" position="after">
+ <field name="delivery_date" widget="remaining_days" optional="hide"/>
+ </field>
<field name="partner_id" position="after">
<field name="area_name" optional="hide"/>
<field name="purchase_representative_id"/>
- <field name="status_printed"/>
+ <field name="status_printed" optional="hide"/>
</field>
</field>
</record>
@@ -140,6 +144,9 @@
<field name="scheduled_date" position="attributes">
<attribute name="readonly">1</attribute>
</field>
+ <field name="arrival_time" position="after">
+ <field name="delivery_date" attrs="{'invisible': [('location_id', '!=', 60)]}"/>
+ </field>
<xpath expr="//field[@name='move_ids_without_package']/form/group/field[@name='description_picking']"
position="after">
<field name="product_image" widget="image" string="Product Image"/>
@@ -228,6 +235,7 @@
<field name='sj_return_date'/>
<field name="sj_documentation" widget="image"/>
<field name="paket_documentation" widget="image"/>
+ <field name="dispatch_documentation" widget="image"/>
</group>
<!-- Biteship Group -->
<group attrs="{'invisible': [('select_shipping_option_so', '!=', 'biteship')]}">
diff --git a/indoteknik_custom/views/tukar_guling_po.xml b/indoteknik_custom/views/tukar_guling_po.xml
index 548a209f..4a9ab25d 100644
--- a/indoteknik_custom/views/tukar_guling_po.xml
+++ b/indoteknik_custom/views/tukar_guling_po.xml
@@ -87,7 +87,7 @@
<!-- <field name="srt_num" readonly="1"/>-->
<field name="operations" string="Operations"
attrs="{
- 'required': [('return_type', 'in', ['revisi_po', 'tukar_guling'])]
+ 'required': [('return_type', 'in', ['retur_po', 'tukar_guling'])]
}"/>
<!-- <field name="origin" readonly="1"/>-->
<field name="origin_po" readonly="1"/>
diff --git a/indoteknik_custom/views/unpaid_invoice_view.xml b/indoteknik_custom/views/unpaid_invoice_view.xml
new file mode 100644
index 00000000..ec6c749d
--- /dev/null
+++ b/indoteknik_custom/views/unpaid_invoice_view.xml
@@ -0,0 +1,100 @@
+<odoo>
+ <!-- Tree view -->
+ <record id="view_unpaid_invoice_tree" model="ir.ui.view">
+ <field name="name">unpaid.invoice.view.tree</field>
+ <field name="model">unpaid.invoice.view</field>
+ <field name="arch" type="xml">
+ <tree string="Unpaid Invoices Monitoring" create="false" delete="false" edit="false">
+ <field name="partner_id"/>
+ <field name="invoice_number"/>
+ <field name="ref"/>
+ <field name="invoice_date"/>
+ <field name="date_kirim_tukar_faktur"/>
+ <field name="date_terima_tukar_faktur"/>
+ <field name="payment_term_id"/>
+ <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0"/>
+ <field name="invoice_day_to_due" readonly="1"/>
+ <field name="new_invoice_day_to_due" readonly="1"/>
+ <field name="amount_total"/>
+ <field name="amount_residual"/>
+ <field name="payment_state" widget="badge"
+ decoration-danger="payment_state == 'not_paid'"
+ decoration-warning="payment_state == 'partial'"/>
+ <field name="invoice_user_id"/>
+ <field name="payment_difficulty" widget="badge"
+ decoration-info="payment_difficulty == 'normal'"
+ decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
+ decoration-danger="payment_difficulty == 'bermasalah'"/>
+ </tree>
+ </field>
+ </record>
+
+ <!-- Form view -->
+ <record id="view_unpaid_invoice_form" model="ir.ui.view">
+ <field name="name">unpaid.invoice.view.form</field>
+ <field name="model">unpaid.invoice.view</field>
+ <field name="arch" type="xml">
+ <form string="Unpaid Invoice Detail" create="false" edit="false" delete="false">
+ <sheet>
+ <group>
+ <group>
+ <field name="partner_id"/>
+ <field name="invoice_id"/>
+ <field name="ref"/>
+ <field name="invoice_date"/>
+ <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due &lt; 0"/>
+ <field name="date_kirim_tukar_faktur"/>
+ <field name="date_terima_tukar_faktur"/>
+ <field name="payment_term_id"/>
+ <button name="action_create_surat_piutang"
+ type="object"
+ string="Create Surat Piutang"
+ class="oe_highlight"/>
+ </group>
+ <group>
+ <field name="sale_id"/>
+ <field name="invoice_user_id"/>
+ <field name="invoice_day_to_due"/>
+ <field name="new_invoice_day_to_due"/>
+ <field name="payment_state" widget="badge"
+ decoration-danger="payment_state == 'not_paid'"
+ decoration-warning="payment_state == 'partial'"/>
+ <field name="amount_total"/>
+ <field name="amount_residual"/>
+ <field name="payment_difficulty" widget="badge"
+ decoration-info="payment_difficulty == 'normal'"
+ decoration-warning="payment_difficulty in ('agak_sulit', 'sulit')"
+ decoration-danger="payment_difficulty == 'bermasalah'"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_unpaid_invoice_search" model="ir.ui.view">
+ <field name="name">unpaid.invoice.view.search</field>
+ <field name="model">unpaid.invoice.view</field>
+ <field name="arch" type="xml">
+ <search string="Search Unpaid Invoices">
+ <field name="partner_id"/>
+ <field name="invoice_number"/>
+ </search>
+ </field>
+ </record>
+
+ <!-- Action -->
+ <record id="action_unpaid_invoice_view" model="ir.actions.act_window">
+ <field name="name">Unpaid Invoices Monitoring</field>
+ <field name="res_model">unpaid.invoice.view</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_unpaid_invoice_tree"/>
+ <field name="search_view_id" ref="view_unpaid_invoice_search"/>
+ </record>
+
+ <!-- Menu -->
+ <menuitem id="menu_unpaid_invoice_root"
+ name="Unpaid Invoices Monitoring"
+ parent="account.menu_finance_receivables"
+ action="action_unpaid_invoice_view"/>
+</odoo>