diff options
| author | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-11 09:34:25 +0700 |
|---|---|---|
| committer | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-11 09:34:25 +0700 |
| commit | 5ac20ba02d1791864ced47482c8b95920bfed31b (patch) | |
| tree | 94d5415842237ca76850b110656fb6f275bbe562 /indoteknik_custom | |
| parent | ac13214fcab7a580b7c9b80faec8cfef684c09aa (diff) | |
| parent | 142f1a37b0d73ea847345428acc4224ff6e49419 (diff) | |
(andri) fix merge
Diffstat (limited to 'indoteknik_custom')
| -rwxr-xr-x | indoteknik_custom/__manifest__.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 5 | ||||
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/purchase_order_sales_match.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 3 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 21 | ||||
| -rw-r--r-- | indoteknik_custom/models/stock_move.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/report/purchase_report.xml | 162 | ||||
| -rw-r--r-- | indoteknik_custom/report/report_surat_piutang copy.xml | 149 | ||||
| -rw-r--r-- | indoteknik_custom/report/report_surat_piutang.xml | 27 | ||||
| -rw-r--r-- | indoteknik_custom/views/refund_sale_order.xml | 8 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_move_line.xml | 9 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 105 |
14 files changed, 430 insertions, 72 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index b751b64e..f2145d0c 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -167,6 +167,7 @@ 'report/report_picking.xml', 'report/report_sale_order.xml', 'report/report_surat_piutang.xml', + 'report/purchase_report.xml', 'views/vendor_sla.xml', 'views/coretax_faktur.xml', 'views/public_holiday.xml', @@ -181,6 +182,7 @@ 'views/unpaid_invoice_view.xml', 'views/letter_receivable.xml', 'views/letter_receivable_mail_template.xml' + # 'views/reimburse.xml', ], 'demo': [], 'css': [], diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index c44cad78..c93cfb76 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -179,9 +179,8 @@ class AccountMove(models.Model): ('state', '=', 'posted'), ('payment_state', 'not in', ['paid', 'in_payment', 'reversed']), ('invoice_date_due', 'in', target_dates), - ('date_terima_tukar_faktur', '!=', False), - ('partner_id', 'in' , [94603]) - ], limit=5) + ('date_terima_tukar_faktur', '!=', False) + ]) _logger.info(f"Invoices: {invoices}") invoices = invoices.filtered( diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 50913a80..18811b85 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -66,7 +66,7 @@ class PurchaseOrder(models.Model): sale_order = fields.Char(string='Sale Order') matches_so = fields.Many2many('sale.order', string='Matches SO', compute='_compute_matches_so') is_create_uangmuka = fields.Boolean(string='Uang Muka?') - move_id = fields.Many2one('account.move', string='Journal Entries Uang Muka', domain=[('move_type', '=', 'entry')]) + move_id = fields.Many2one('account.move', string='Journal Entries Uang Muka', domain=[('move_type', '=', 'entry')], copy=False) logbook_bill_id = fields.Many2one('report.logbook.bill', string='Logbook Bill') status_printed = fields.Selection([ ('not_printed', 'Belum Print'), diff --git a/indoteknik_custom/models/purchase_order_sales_match.py b/indoteknik_custom/models/purchase_order_sales_match.py index b18864f3..084b93f7 100644 --- a/indoteknik_custom/models/purchase_order_sales_match.py +++ b/indoteknik_custom/models/purchase_order_sales_match.py @@ -39,7 +39,7 @@ class PurchaseOrderSalesMatch(models.Model): ('sale_line_id', '=', rec.sale_line_id.id), ]) if stock_move: - rec.bu_pick = stock_move.picking_id.id + rec.bu_pick = stock_move[0].picking_id.id else: rec.bu_pick = None diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index 737419e7..9ab18f27 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -76,6 +76,7 @@ class RefundSaleOrder(models.Model): transfer_move_id = fields.Many2one( 'account.move', string="Journal Payment", + copy=False, help="Pilih transaksi salah transfer dari jurnal Uang Muka (journal_id=11) yang tidak terkait SO." ) @@ -408,6 +409,8 @@ class RefundSaleOrder(models.Model): else: remaining = uang_masuk - amount_refund + if remaining < 0: + raise ValidationError("Semua dana sudah dikembalikan, tidak bisa mengajukan refund") vals['remaining_refundable'] = remaining diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 903f834b..9952af9a 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -1899,26 +1899,30 @@ class SaleOrder(models.Model): # raise UserError('Kelurahan Real Delivery Address harus diisi') def generate_payment_link_midtrans_sales_order(self): - # midtrans_url = 'https://app.sandbox.midtrans.com/snap/v1/transactions' # dev - sandbox - # midtrans_auth = 'Basic U0ItTWlkLXNlcnZlci1uLVY3ZDJjMlpCMFNWRUQyOU95Q1dWWXA6' # dev - sandbox - midtrans_url = 'https://app.midtrans.com/snap/v1/transactions' # production - midtrans_auth = 'Basic TWlkLXNlcnZlci1SbGMxZ2gzWGpSVW5scl9JblZzTV9OTnU6' # production + # midtrans_url = 'https://app.sandbox.midtrans.com/snap/v1/transactions' # dev - sandbox + # midtrans_auth = 'Basic U0ItTWlkLXNlcnZlci1uLVY3ZDJjMlpCMFNWRUQyOU95Q1dWWXA6' # dev - sandbox + midtrans_url = 'https://app.midtrans.com/snap/v1/transactions' # production + midtrans_auth = 'Basic TWlkLXNlcnZlci1SbGMxZ2gzWGpSVW5scl9JblZzTV9OTnU6' # production + so_number = self.name so_number = so_number.replace('/', '-') so_grandtotal = math.floor(self.grand_total) + headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': midtrans_auth, } - check_url = f'https://api.midtrans.com/v2/{so_number}/status' - check_response = requests.get(check_url, headers=headers) + # ==== ENV ==== + # check_url = f'https://api.sandbox.midtrans.com/v2/{so_number}/status' # dev - sandbox + check_url = f'https://api.midtrans.com/v2/{so_number}/status' # production + # ============================================= + check_response = requests.get(check_url, headers=headers) if check_response.status_code == 200: status_response = check_response.json() - if status_response.get('transaction_status') == 'expire' or status_response.get( - 'transaction_status') == 'cancel': + if status_response.get('transaction_status') in ('expire', 'cancel'): so_number = so_number + '-cpl' json_data = { @@ -1950,7 +1954,6 @@ class SaleOrder(models.Model): buffer = BytesIO() img.save(buffer, format="PNG") qr_code_img = base64.b64encode(buffer.getvalue()).decode() - self.payment_qr_code = qr_code_img @api.model diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index 90ab30a4..24d405a6 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -1,6 +1,9 @@ from odoo import fields, models, api from odoo.tools.misc import format_date, OrderedSet from odoo.exceptions import UserError +import logging + +_logger = logging.getLogger(__name__) class StockMove(models.Model): _inherit = 'stock.move' @@ -15,7 +18,7 @@ class StockMove(models.Model): barcode = fields.Char(string='Barcode', related='product_id.barcode') vendor_id = fields.Many2one('res.partner' ,string='Vendor') hold_outgoingg = fields.Boolean('Hold Outgoing', default=False) - + product_image = fields.Binary(related="product_id.image_128", string="Product Image", readonly = True) # @api.model_create_multi # def create(self, vals_list): # moves = super(StockMove, self).create(vals_list) diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index d2e00781..6e839bf0 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -134,7 +134,7 @@ class TukarGuling(models.Model): if not self.val_inv_opt and self.is_has_invoice == True: raise UserError("Kalau sudah ada invoice Return Invoice Option harus diisi!") for rec in self: - if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True: + if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True and rec.invoice_id.state != 'cancel': raise UserError("Tidak bisa mengubah Return karena sudah ada invoice dan belum di cancel.") elif rec.val_inv_opt == 'tanpa_cancel' and self.is_has_invoice == True: continue diff --git a/indoteknik_custom/report/purchase_report.xml b/indoteknik_custom/report/purchase_report.xml new file mode 100644 index 00000000..9d7f4028 --- /dev/null +++ b/indoteknik_custom/report/purchase_report.xml @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + <!-- Report Action --> + <record id="action_report_purchaseorder_website" model="ir.actions.report"> + <field name="name">Purchase Order (Website)</field> + <field name="model">purchase.order</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">indoteknik_custom.report_purchaseorder_website</field> + <field name="report_file">indoteknik_custom.report_purchaseorder_website</field> + <field name="print_report_name"> + ('PO - %s - %s' % (object.partner_id.name, object.name)) + </field> + <field name="binding_model_id" ref="purchase.model_purchase_order"/> + <field name="binding_type">report</field> + </record> + </data> + + <!-- Wrapper Template --> + <template id="report_purchaseorder_website"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="doc"> + <t t-call="indoteknik_custom.report_purchaseorder_website_document" t-lang="doc.partner_id.lang"/> + </t> + </t> + </template> + + <!-- Document Template --> +<template id="report_purchaseorder_website_document"> + <t t-call="web.external_layout"> + <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" /> + + <div class="page"> + <!-- Header Image --> + <div class="mb16"> + <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2498521" + style="width:100%; max-height:100px; object-fit:contain;"/> + </div> + + <!-- Title --> + <h2 class="text-center mb4" style="color:#d32f2f; font-weight:bold;"> + PURCHASE ORDER + </h2> + <h4 class="text-center mb32"> + No. <span t-field="doc.name"/> + </h4> + + <!-- Top Info sejajar --> + <div class="row mb16" style="font-size:12px;"> + <div class="col-4"> + <strong>Term Of Payment:</strong> + <span t-field="doc.payment_term_id.name"/> + </div> + <div class="col-4"> + <strong>Order Date:</strong> + <span t-field="doc.date_order" t-options='{"widget": "date"}'/> + </div> + <div class="col-4"> + <strong>Responsible:</strong> + <span t-field="doc.user_id"/> + </div> + </div> + + <!-- Vendor & Shipping Info sejajar --> + <div class="row mb32" style="font-size:12px;"> + <div class="col-6" style="border:1px solid #ccc; padding:8px;"> + <strong>Alamat Pengiriman:</strong><br/> + PT Indoteknik (Bandengan 1 Depan)<br/> + Jl. Bandengan Utara Komp A 8 B<br/> + RT. Penjaringan, Kec. Penjaringan, Jakarta (BELAKANG INDOMARET)<br/> + JK 14440<br/> + Indonesia + </div> + <div class="col-6" style="border:1px solid #ccc; padding:8px;"> + <strong>Nama Vendor:</strong><br/> + <div t-field="doc.partner_id" + t-options='{"widget": "contact", "fields": ["address", "name", "phone"], + "no_marker": True, "phone_icons": True}'/> + </div> + </div> + + <!-- Order Lines --> + <table class="table table-sm o_main_table" style="font-size:11px; border:1px solid #000; border-collapse: collapse; width:100%;"> + <thead style="display: table-row-group; background:#f5f5f5;"> + <tr> + <th style="border:1px solid #000; padding:4px;">Description</th> + <th class="text-right" style="border:1px solid #000; padding:4px;">Quantity</th> + <th class="text-right" style="border:1px solid #000; padding:4px;">Unit Price</th> + <th class="text-right" style="border:1px solid #000; padding:4px;">Taxes</th> + <th class="text-right" style="border:1px solid #000; padding:4px;">Subtotal</th> + </tr> + </thead> + <tbody> + <t t-foreach="doc.order_line" t-as="line"> + <!-- Main row --> + <tr> + <td style="border:1px solid #000; padding:4px;"> + <span t-field="line.name"/> + </td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="line.product_qty"/> + <span t-field="line.product_uom"/> + </td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="line.price_unit"/> + </td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.taxes_id))"/> + </td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="line.price_subtotal"/> + </td> + </tr> + <!-- Website Description row --> + <t t-if="line.product_id.website_description"> + <tr> + <td colspan="5" style="border:1px solid #000; padding:6px; font-size:10px; color:#555;"> + <div t-raw="line.product_id.website_description"/> + </td> + </tr> + </t> + </t> + </tbody> + </table> + + <!-- Totals --> + <div class="clearfix"> + <div class="row"> + <div class="col-4 ml-auto"> + <table class="table table-sm" style="border:1px solid #000; border-collapse: collapse; width:100%;"> + <tr> + <td style="border:1px solid #000; padding:4px;"><strong>Subtotal</strong></td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="doc.amount_untaxed"/> + </td> + </tr> + <tr> + <td style="border:1px solid #000; padding:4px;">Taxes</td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="doc.amount_tax"/> + </td> + </tr> + <tr class="o_total"> + <td style="border:1px solid #000; padding:4px;"><strong>Total</strong></td> + <td class="text-right" style="border:1px solid #000; padding:4px;"> + <span t-field="doc.amount_total"/> + </td> + </tr> + </table> + </div> + </div> + </div> + + <!-- Notes --> + <div class="mt32" style="font-size:11px;"> + <p t-field="doc.notes"/> + </div> + </div> + </t> + </template> + +</odoo> diff --git a/indoteknik_custom/report/report_surat_piutang copy.xml b/indoteknik_custom/report/report_surat_piutang copy.xml new file mode 100644 index 00000000..cb5762f3 --- /dev/null +++ b/indoteknik_custom/report/report_surat_piutang copy.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <!-- External Layout tanpa company --> + <template id="external_layout_no_company"> + <!-- HEADER --> + <div class="header"> + <img t-att-src="'https://erp.indoteknik.com/api/image/ir.attachment/datas/2498521'" + class="img img-fluid w-100"/> + </div> + + <!-- CONTENT --> + <div class="content mt-5 mb-5 ml-3 mr-3"> + <t t-raw="0"/> + </div> + + <!-- FOOTER --> + <div class="footer"> + <img t-att-src="'https://erp.indoteknik.com/api/image/ir.attachment/datas/2498529'" + style="height:60px;"/> + </div> + </template> + + <!-- Report Action --> + <record id="action_report_surat_piutang" model="ir.actions.report"> + <field name="name">Surat Peringatan Piutang</field> + <field name="model">surat.piutang</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">indoteknik_custom.report_surat_piutang_formal_custom</field> + <field name="report_file">indoteknik_custom.report_surat_piutang_formal_custom</field> + <field name="binding_model_id" ref="model_surat_piutang"/> + <field name="binding_type">report</field> + </record> + + <!-- QWeb Template Surat --> + <template id="report_surat_piutang_formal_custom"> + <t t-call="indoteknik_custom.external_layout_no_company"> + <t t-set="doc" t-value="docs[0] if docs else None"/> + + <!-- SURAT CONTENT --> + <main class="o_report_layout_standard" style="font-size:12pt; font-family: Arial, sans-serif;"> + + <!-- Header Surat --> + <div class="row mb-3"> + <div class="col-6"> + Ref. No: <t t-esc="doc.name or '-'"/> + </div> + <div class="col-6 text-right"> + Jakarta, <t t-esc="doc.send_date and doc.send_date.strftime('%d %B %Y') or '-'"/> + </div> + </div> + + <!-- Tujuan --> + <div class="mb-3"> + <strong>Kepada Yth.</strong><br/> + <t t-esc="doc.partner_id.name if doc and doc.partner_id else '-'"/><br/> + <t t-esc="doc.partner_id.street if doc and doc.partner_id else '-'"/><br/> + <t t-esc="doc.partner_id.country_id.name if doc and doc.partner_id and doc.partner_id.country_id else '-'"/> + </div> + + <!-- UP & Perihal --> + <div class="mb-4"> + U.P. : <t t-esc="doc.tujuan_nama or '-'"/><br/> + <strong>Perihal:</strong> <t t-esc="doc.perihal or '-'"/> + </div> + + <!-- Isi Surat --> + <div class="mb-3">Dengan Hormat,</div> + <div class="mb-3">Yang bertanda tangan di bawah ini menyampaikan sebagai berikut:</div> + + <div class="mb-3 text-justify"> + Namun, bersama surat ini kami ingin mengingatkan bahwa hingga tanggal surat ini dibuat, masih terdapat tagihan yang belum diselesaikan oleh pihak + <t t-esc="doc.partner_id.name if doc and doc.partner_id else '-'"/> periode bulan <t t-esc="doc.periode_invoices_terpilih or '-'"/>, berdasarkan data korespondensi dan laporan keuangan yang kami kelola, + <t t-esc="doc.partner_id.name if doc and doc.partner_id else '-'"/> (“Saudara”) masih mempunyai tagihan yang telah jatuh tempo dan belum dibayarkan sejumlah + <t t-esc="doc.grand_total_text or '-'"/> (“Tagihan”). + </div> + + <div class="mb-3">Berikut kami lampirkan Rincian Tagihan yang telah Jatuh Tempo:</div> + + <!-- Tabel Invoice --> + <table class="table table-sm table-bordered mb-4"> + <thead class="thead-light"> + <tr> + <th>Invoice Number</th> + <th>Invoice Date</th> + <th>Due Date</th> + <th class="text-center">Day to Due</th> + <th>Reference</th> + <th class="text-right">Amount Due</th> + <th>Payment Terms</th> + </tr> + </thead> + <tbody> + <t t-foreach="doc.line_ids.filtered(lambda l: l.selected)" t-as="line"> + <tr> + <td><t t-esc="line.invoice_number or '-'"/></td> + <td><t t-esc="line.invoice_date and line.invoice_date.strftime('%d-%m-%Y') or '-'"/></td> + <td><t t-esc="line.invoice_date_due and line.invoice_date_due.strftime('%d-%m-%Y') or '-'"/></td> + <td class="text-center"><t t-esc="line.new_invoice_day_to_due or '-'"/></td> + <td><t t-esc="line.ref or '-'"/></td> + <td class="text-right"><t t-esc="line.amount_residual or '-'"/></td> + <td><t t-esc="line.payment_term_id.name or '-'"/></td> + </tr> + </t> + </tbody> + <tfoot> + <tr class="font-weight-bold"> + <td colspan="6" class="text-right"> + GRAND TOTAL INVOICE YANG BELUM DIBAYAR DAN TELAH JATUH TEMPO + </td> + <td class="text-right"> + <t t-esc="doc.grand_total or '-'"/> (<t t-esc="doc.grand_total_text or '-'"/>) + </td> + </tr> + </tfoot> + </table> + + <!-- Isi Penutup --> + <div class="mb-3"> + Kami belum menerima konfirmasi pelunasan ataupun pembayaran sebagian dari total kewajiban tersebut. Kami sangat terbuka untuk berdiskusi serta mencari solusi terbaik agar kerja sama tetap berjalan baik. + </div> + + <div class="mb-3"> + Oleh karena itu, kami mohon perhatian dan itikad baik dari pihak <t t-esc="doc.partner_id.name if doc and doc.partner_id else '-'"/> untuk segera melakukan pelunasan atau memberikan informasi terkait rencana pembayaran paling lambat dalam waktu 7 (tujuh) hari kerja sejak surat ini diterima. + </div> + + <div class="mb-3"> + Jika dalam waktu yang telah ditentukan belum ada penyelesaian atau tanggapan, kami akan mempertimbangkan untuk melanjutkan proses sesuai ketentuan yang berlaku. + </div> + + <div class="mb-4"> + Demikian kami sampaikan. Atas perhatian dan kerja samanya, kami ucapkan terima kasih. + </div> + + <div class="mb-2">Hormat kami,</div> + + <!-- TTD --> + <div class="mt-5"> + <img t-att-src="'https://erp.indoteknik.com/api/image/ir.attachment/datas/2851919'" style="width:200px; height:auto;"/><br/> + <div>Nama: Akbar Prabawa<br/>Jabatan: General Manager</div> + </div> + + </main> + </t> + </template> + + </data> +</odoo> diff --git a/indoteknik_custom/report/report_surat_piutang.xml b/indoteknik_custom/report/report_surat_piutang.xml index cb5762f3..5cad81e6 100644 --- a/indoteknik_custom/report/report_surat_piutang.xml +++ b/indoteknik_custom/report/report_surat_piutang.xml @@ -1,6 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <data> + <!-- Report Action --> + <record id="action_report_surat_piutang" model="ir.actions.report"> + <field name="name">Surat Peringatan Piutang</field> + <field name="model">surat.piutang</field> + <field name="report_type">qweb-pdf</field> + <field name="report_name">indoteknik_custom.report_surat_piutang_formal_custom</field> + <field name="report_file">indoteknik_custom.report_surat_piutang_formal_custom</field> + <field name="binding_model_id" ref="model_surat_piutang"/> + <field name="binding_type">report</field> + </record> <!-- External Layout tanpa company --> <template id="external_layout_no_company"> @@ -22,16 +32,13 @@ </div> </template> - <!-- Report Action --> - <record id="action_report_surat_piutang" model="ir.actions.report"> - <field name="name">Surat Peringatan Piutang</field> - <field name="model">surat.piutang</field> - <field name="report_type">qweb-pdf</field> - <field name="report_name">indoteknik_custom.report_surat_piutang_formal_custom</field> - <field name="report_file">indoteknik_custom.report_surat_piutang_formal_custom</field> - <field name="binding_model_id" ref="model_surat_piutang"/> - <field name="binding_type">report</field> - </record> + <template id="report_surat_piutang_formal_custom"> + <t t-call="web.html_container"> + <t t-foreach="docs" t-as="doc"> + <t t-call="indoteknik_custom.report_purchaseorder_website_document" t-lang="doc.partner_id.lang"/> + </t> + </t> + </template> <!-- QWeb Template Surat --> <template id="report_surat_piutang_formal_custom"> diff --git a/indoteknik_custom/views/refund_sale_order.xml b/indoteknik_custom/views/refund_sale_order.xml index ae0861e2..0c6cd371 100644 --- a/indoteknik_custom/views/refund_sale_order.xml +++ b/indoteknik_custom/views/refund_sale_order.xml @@ -214,12 +214,12 @@ <page string="Finance Note"> <group col="2"> <group> - <field name="finance_note" attrs="{'readonly': [('is_locked', '=', True)]}"/> + <field name="finance_note"/> </group> <group> - <field name="bukti_refund_type" reqiured="1" attrs="{'readonly': [('is_locked', '=', True)]}"/> - <field name="bukti_transfer_refund_pdf" widget="pdf_viewer" attrs="{'invisible': [('bukti_refund_type', '=', 'image')], 'readonly': [('is_locked', '=', True)]}"/> - <field name="bukti_transfer_refund_image" widget="image" attrs="{'invisible': [('bukti_refund_type', '=', 'pdf')], 'readonly': [('is_locked', '=', True)]}"/> + <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')]}"/> </group> </group> </page> diff --git a/indoteknik_custom/views/stock_move_line.xml b/indoteknik_custom/views/stock_move_line.xml index 757d2522..94c0bf53 100644 --- a/indoteknik_custom/views/stock_move_line.xml +++ b/indoteknik_custom/views/stock_move_line.xml @@ -3,18 +3,19 @@ <record id="stock_move_line_form_view_inherited" model="ir.ui.view"> <field name="name">Stock Move Line</field> <field name="model">stock.move.line</field> - <field name="inherit_id" ref="stock.view_move_line_form" /> + <field name="inherit_id" ref="stock.view_move_line_form"/> + <field name="priority" eval="100"/> <field name="arch" type="xml"> - <field name="qty_done" position="after"> + <xpath expr="(//form//group[.//field[@name='qty_done']])[last()]" position="inside"> <field name="manufacture"/> - </field> + </xpath> </field> </record> <record id="stock_move_line_tree_view_inherited" model="ir.ui.view"> <field name="name">Stock Move Line</field> <field name="model">stock.move.line</field> - <field name="inherit_id" ref="stock.view_move_line_tree" /> + <field name="inherit_id" ref="stock.view_move_line_tree"/> <field name="arch" type="xml"> <field name="product_id" position="after"> <field name="manufacture"/> diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index b3f0ce9f..fc8be790 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -8,7 +8,7 @@ <field name="arch" type="xml"> <tree position="attributes"> <attribute name="default_order">final_seq asc</attribute> - <!-- <attribute name="default_order">create_date desc</attribute> --> + <!-- <attribute name="default_order">create_date desc</attribute> --> </tree> <field name="json_popover" position="after"> <field name="date_done" optional="hide"/> @@ -20,9 +20,11 @@ <field name="sj_return_date" optional="hide"/> <field name="date_reserved" optional="hide"/> <field name="state_reserve" optional="hide"/> - <field name="state_packing" widget="badge" decoration-success="state_packing == 'packing_done'" decoration-danger="state_packing == 'not_packing'" optional="hide"/> + <field name="state_packing" widget="badge" decoration-success="state_packing == 'packing_done'" + decoration-danger="state_packing == 'not_packing'" optional="hide"/> <field name="final_seq"/> - <field name="state_approve_md" widget="badge" decoration-success="state_approve_md == 'done'" decoration-warning="state_approve_md == 'pending'" optional="hide"/> + <field name="state_approve_md" widget="badge" decoration-success="state_approve_md == 'done'" + decoration-warning="state_approve_md == 'pending'" optional="hide"/> <!-- <field name="countdown_hours" optional="hide"/> <field name="countdown_ready_to_ship" /> --> </field> @@ -50,11 +52,11 @@ type="object" attrs="{'invisible': ['|', ('state', 'in', ['done']), ('approval_receipt_status', '=', 'pengajuan1')]}" /> -<!-- <button name="ask_return_approval"--> -<!-- string="Ask Return/Acc"--> -<!-- type="object"--> -<!-- attrs="{'invisible': [('state', 'in', ['draft', 'cancel', 'assigned'])]}"--> -<!-- />--> + <!-- <button name="ask_return_approval"--> + <!-- string="Ask Return/Acc"--> + <!-- type="object"--> + <!-- attrs="{'invisible': [('state', 'in', ['draft', 'cancel', 'assigned'])]}"--> + <!-- />--> <button name="action_create_invoice_from_mr" string="Create Bill" type="object" @@ -64,12 +66,12 @@ string="Biteship" type="object" /> - <!-- <button name="action_sync_biteship_tracking" - type="object" - string="Lacak dari Biteship" - class="btn-primary" - attrs="{'invisible': [('biteship_id', '=', False)]}" - /> --> + <!-- <button name="action_sync_biteship_tracking" + type="object" + string="Lacak dari Biteship" + class="btn-primary" + attrs="{'invisible': [('biteship_id', '=', False)]}" + /> --> <button name="track_envio_shipment" string="Tracking Envio" type="object" @@ -97,6 +99,11 @@ attrs="{'invisible': [('state_approve_md', 'not in', ['waiting'])]}" /> </button> + <!-- <xpath expr="//field[@name='move_ids_without_package']//tree//field[@name='product_uom']" + position="after"> + <field name="product_image" widget="image" + style="height:128px;width:128px;" readonly="1"/> + </xpath> --> <field name="backorder_id" position="after"> <field name="select_shipping_option_so"/> <field name="shipping_method_so_id"/> @@ -105,7 +112,8 @@ <field name="count_line_detail"/> <field name="dokumen_tanda_terima"/> <field name="dokumen_pengiriman"/> - <field name="quantity_koli" attrs="{'invisible': [('location_dest_id', '!=', 60)], 'required': [('location_dest_id', '=', 60)]}"/> + <field name="quantity_koli" + attrs="{'invisible': [('location_dest_id', '!=', 60)], 'required': [('location_dest_id', '=', 60)]}"/> <field name="total_mapping_koli" attrs="{'invisible': [('location_id', '!=', 60)]}"/> <field name="total_koli_display" readonly="1" attrs="{'invisible': [('location_id', '!=', 60)]}"/> <field name="linked_out_picking_id" readonly="1" attrs="{'invisible': [('location_id', '=', 60)]}"/> @@ -132,8 +140,13 @@ <field name="scheduled_date" position="attributes"> <attribute name="readonly">1</attribute> </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"/> + </xpath> + <field name="origin" position="after"> -<!-- <field name="show_state_approve_md" invisible="1" optional="hide"/>--> + <!-- <field name="show_state_approve_md" invisible="1" optional="hide"/>--> <field name="state_approve_md" widget="badge"/> <field name="purchase_id"/> <field name="sale_order"/> @@ -141,7 +154,8 @@ <field name="date_doc_kirim" attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/> <field name="summary_qty_operation"/> <field name="count_line_operation"/> - <field name="linked_manual_bu_out" attrs="{'invisible': [('location_id', '=', 60)]}" domain="[('picking_type_code', '=', 'outgoing'),('state', 'not in', ['done','cancel']), ('group_id', '=', group_id)]"/> + <field name="linked_manual_bu_out" attrs="{'invisible': [('location_id', '=', 60)]}" + domain="[('picking_type_code', '=', 'outgoing'),('state', 'not in', ['done','cancel']), ('group_id', '=', group_id)]"/> <field name="account_id" attrs="{ 'readonly': [['state', 'in', ['done', 'cancel']]], @@ -189,29 +203,35 @@ </group> </group> </page> - <page string="Delivery" name="delivery_order" attrs="{'invisible': [('location_dest_id', '=', 60)]}"> + <page string="Delivery" name="delivery_order" + attrs="{'invisible': [('location_dest_id', '=', 60)]}"> <group> <group> <field name="notee"/> <field name="note_logistic"/> <field name="note_info"/> - <field name="responsible" /> - <field name="carrier_id" attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}" /> + <field name="responsible"/> + <field name="carrier_id" + attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/> <field name="biteship_id" invisible="1"/> <field name="out_code" attrs="{'invisible': [['out_code', '=', False]]}"/> <field name="picking_code" attrs="{'invisible': [['picking_code', '=', False]]}"/> - <field name="picking_code" string="Picking code (akan digenerate ketika sudah di-validate)" attrs="{'invisible': [['picking_code', '!=', False]]}"/> - <field name="driver_departure_date" attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/> + <field name="picking_code" + string="Picking code (akan digenerate ketika sudah di-validate)" + attrs="{'invisible': [['picking_code', '!=', False]]}"/> + <field name="driver_departure_date" + attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/> <field name="driver_arrival_date"/> - <field name="delivery_tracking_no" attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/> + <field name="delivery_tracking_no" + attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/> <field name="driver_id"/> <field name='sj_return_date'/> - <field name="sj_documentation" widget="image" /> - <field name="paket_documentation" widget="image" /> + <field name="sj_documentation" widget="image"/> + <field name="paket_documentation" widget="image"/> </group> <!-- Biteship Group --> <group attrs="{'invisible': [('select_shipping_option_so', '!=', 'biteship')]}"> - <field name="delivery_tracking_no" /> + <field name="delivery_tracking_no"/> <field name="shipping_method_so_id"/> <field name="shipping_option_so_id"/> <field name="biteship_shipping_price" readonly="1"/> @@ -220,7 +240,8 @@ <field name="biteship_driver_name" readonly="1"/> <field name="biteship_driver_phone" readonly="1"/> <field name="biteship_driver_plate_number" readonly="1"/> - <button name="action_open_biteship_tracking" string="Visit Biteship Tracking" type="object"/> + <button name="action_open_biteship_tracking" string="Visit Biteship Tracking" + type="object"/> </group> <group attrs="{'invisible': [('carrier_id', '!=', 151)]}"> @@ -261,23 +282,27 @@ </group> </group> </page> - <page string="Check Product" name="check_product" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"> + <page string="Check Product" name="check_product" + attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"> <field name="check_product_lines"/> </page> - <page string="Barcode Product" name="barcode_product" attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"> + <page string="Barcode Product" name="barcode_product" + attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"> <field name="barcode_product_lines"/> </page> <page string="Check Koli" name="check_koli" attrs="{'invisible': [('location_dest_id', '!=', 60)]}"> <field name="check_koli_lines"/> </page> - <page string="Mapping Koli" name="konfirm_koli" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"> + <page string="Mapping Koli" name="konfirm_koli" + attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"> <field name="konfirm_koli_lines"/> </page> - <page string="Konfirm Koli" name="scan_koli" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"> + <page string="Konfirm Koli" name="scan_koli" + attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"> <field name="scan_koli_lines"/> </page> </page> - + </field> </record> @@ -287,18 +312,20 @@ <field name="arch" type="xml"> <tree editable="bottom"> <field name="code_koli"/> - <field name="koli_id" options="{'no_create': True}" domain="[('state', '=', 'not_delivered')]"/> + <field name="koli_id" options="{'no_create': True}" domain="[('state', '=', 'not_delivered')]"/> <field name="scan_koli_progress"/> </tree> </field> </record> + <record id="konfirm_koli_tree" model="ir.ui.view"> <field name="name">konfirm.koli.tree</field> <field name="model">konfirm.koli</field> <field name="arch" type="xml"> <tree editable="bottom"> - <field name="pick_id" options="{'no_create': True}" required="1" domain="[('picking_type_code', '=', 'internal'), ('group_id', '=', parent.group_id), ('linked_manual_bu_out', '=', parent.id)]"/> + <field name="pick_id" options="{'no_create': True}" required="1" + domain="[('picking_type_code', '=', 'internal'), ('group_id', '=', parent.group_id), ('linked_manual_bu_out', '=', parent.id)]"/> </tree> </field> </record> @@ -307,7 +334,7 @@ <field name="name">check.koli.tree</field> <field name="model">check.koli</field> <field name="arch" type="xml"> - <tree editable="bottom"> + <tree editable="bottom"> <field name="koli"/> <field name="reserved_id"/> <field name="check_koli_progress"/> @@ -344,12 +371,14 @@ <field name="model">stock.move.line</field> <field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/> <field name="arch" type="xml"> - <tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)" decoration-danger="qty_done>product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'" decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id"> + <tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)" + decoration-danger="qty_done>product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'" + decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id"> <field name="note" placeholder="Add a note here"/> </tree> </field> </record> - + <record id="view_picking_internal_search_inherit" model="ir.ui.view"> <field name="name">stock.picking.internal.search.inherit</field> @@ -382,7 +411,7 @@ </form> </field> </record> - + <record id="action_warning_modal_wizard" model="ir.actions.act_window"> <field name="name">Peringatan Koli</field> <field name="res_model">warning.modal.wizard</field> |
