summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-07-26 11:58:32 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-07-26 11:58:32 +0700
commite09e59db22d65fa144c2a43cd8f6959fada49484 (patch)
tree0567b1a8f0c8c57efb2d0d38ae489da26a55c245 /indoteknik_custom/views
parentfff5507cf7c0f360a5c68068e77fa84b1d6340c5 (diff)
parent77e76f376b78733cad58aa196e3ead3c6a04ff42 (diff)
(andri) fix conflict
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/account_move.xml6
-rw-r--r--indoteknik_custom/views/ir_sequence.xml18
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml7
-rw-r--r--indoteknik_custom/views/refund_sale_order.xml199
-rwxr-xr-xindoteknik_custom/views/sale_order.xml25
-rw-r--r--indoteknik_custom/views/stock_picking.xml10
-rw-r--r--indoteknik_custom/views/tukar_guling.xml129
-rw-r--r--indoteknik_custom/views/tukar_guling_po.xml127
-rw-r--r--indoteknik_custom/views/tukar_guling_return_views.xml20
9 files changed, 323 insertions, 218 deletions
diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml
index ae944a4a..9b1c791b 100644
--- a/indoteknik_custom/views/account_move.xml
+++ b/indoteknik_custom/views/account_move.xml
@@ -36,9 +36,9 @@
<!-- <field name="purchase_order_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/> -->
</field>
<field name="ref" position="after">
- <field name="sale_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('has_refund_so', '=', True)]}"/>
- <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 name="sale_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'entry')]}"/>
+ <!-- <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>
<field name="reklas_misc_id" position="after">
<field name="purchase_order_id" context="{'form_view_ref': 'purchase.purchase_order_form'}" options="{'no_create': True}"/>
diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml
index 8c054fed..5fa3d2dd 100644
--- a/indoteknik_custom/views/ir_sequence.xml
+++ b/indoteknik_custom/views/ir_sequence.xml
@@ -200,6 +200,24 @@
<field name="number_next">1</field>
<field name="number_increment">1</field>
</record>
+ <record id="seq_tukar_guling" model="ir.sequence">
+ <field name="name">Pengajuan Return SO</field>
+ <field name="code">tukar.guling</field>
+ <field name="active">TRUE</field>
+ <field name="prefix">CCM/%(year)s/%(month)s/</field>
+ <field name="padding">4</field>
+ <field name="number_next">1</field>
+ <field name="number_increment">1</field>
+ </record>
+ <record id="seq_tukar_guling_po" model="ir.sequence">
+ <field name="name">Pengajuan Return PO</field>
+ <field name="code">tukar.guling.po</field>
+ <field name="active">TRUE</field>
+ <field name="prefix">VCM/%(year)s/%(month)s/</field>
+ <field name="padding">4</field>
+ <field name="number_next">1</field>
+ <field name="number_increment">1</field>
+ </record>
<record id="sequence_down_payment" model="ir.sequence">
<field name="name">Down Payment Sequence</field>
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index dae23eed..ff223125 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -189,6 +189,13 @@
<field name="order_sales_match_line"/>
</page>
</xpath>
+ <xpath expr="//form/sheet/notebook/page[@name='purchase_delivery_invoice']" position="after">
+ <page string="Other Info" name="purchase_order_sales_matches_lines">
+ <group string="Return Doc">
+ <field name="vcm_id"/>
+ </group>
+ </page>
+ </xpath>
</field>
</record>
</data>
diff --git a/indoteknik_custom/views/refund_sale_order.xml b/indoteknik_custom/views/refund_sale_order.xml
deleted file mode 100644
index 3b348730..00000000
--- a/indoteknik_custom/views/refund_sale_order.xml
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<odoo>
- <!-- Tree View -->
- <record id="view_refund_sale_order_tree" model="ir.ui.view">
- <field name="name">refund.sale.order.tree</field>
- <field name="model">refund.sale.order</field>
- <field name="arch" type="xml">
- <tree string="Refund Sales Orders">
- <field name="name" readonly="1"/>
- <field name="created_date" readonly="1"/>
- <field name="partner_id" readonly="1"/>
- <field name="sale_order_ids" widget="many2many_tags" readonly="1"/>
- <field name="uang_masuk" readonly="1"/>
- <field name="ongkir" readonly="1"/>
- <field name="total_invoice" readonly="1"/>
- <field name="amount_refund" readonly="1"/>
- <field name="status"
- decoration-info="status == 'draft'"
- decoration-danger="status == 'reject'"
- decoration-success="status == 'refund'"
- decoration-warning="status == 'pengajuan1' or status == 'pengajuan2' or status == 'pengajuan3'"
- widget="badge"
- readonly="1"/>
- <field name="status_payment"
- decoration-info="status_payment == 'pending'"
- decoration-danger="status_payment == 'reject'"
- decoration-success="status_payment == 'done'"
- widget="badge"
- readonly="1"/>
- <field name="refund_date" readonly="1"/>
- <field name="amount_refund_text" readonly="1" optional="hide"/>
- <field name="invoice_ids" readonly="1" optional="hide"/>
- <field name="refund_type" readonly="1" optional="hide"/>
- <field name="user_ids" readonly="1" optional="hide"/>
- </tree>
- </field>
- </record>
-
- <!-- Form View -->
- <record id="view_refund_sale_order_form" model="ir.ui.view">
- <field name="name">refund.sale.order.form</field>
- <field name="model">refund.sale.order</field>
- <field name="arch" type="xml">
- <form string="Refund Sales Order">
- <header>
- <button name="action_ask_approval"
- type="object"
- string="Ask Approval"
- attrs="{'invisible': [('status', '!=', 'draft')]}"/>
-
- <button name="action_approve_flow"
- type="object"
- string="Approve"
- class="oe_highlight"
- attrs="{'invisible': [('status', 'in', ['refund', 'reject', 'draft'])]}"/>
- <button name="action_trigger_cancel"
- type="object"
- string="Cancel"
- attrs="{'invisible': ['|', ('status_payment', '!=', 'pending'), ('status', '=', 'reject')]}" />
- <button name="action_confirm_refund"
- type="object"
- string="Confirm Refund"
- class="btn-primary"
- attrs="{'invisible': ['|', ('status', 'not in', ['pengajuan3','refund']), ('status_payment', '!=', 'pending')]}"/>
- <button name="action_create_journal_refund"
- string="Journal Refund"
- type="object"
- class="oe_highlight"
- attrs="{'invisible': ['|', ('status', 'not in', ['pengajuan3','refund']), ('journal_refund_state', '=', 'posted')]}"/>
-
- <field name="status"
- widget="statusbar"
- statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,reject"
- attrs="{'invisible': [('status', '!=', 'reject')]}" />
-
- <field name="status"
- widget="statusbar"
- statusbar_visible="draft,pengajuan1,pengajuan2,pengajuan3,refund"
- attrs="{'invisible': [('status', '=', 'reject')]}" />
- </header>
- <sheet>
- <div class="oe_button_box" name="button_box">
- <button name="action_open_journal_refund"
- type="object"
- class="oe_stat_button"
- icon="fa-book"
- width="250px"
- attrs="{'invisible': ['|', ('journal_refund_move_id', '=', False), ('journal_refund_state', '!=', 'posted')]}">
- <field name="journal_refund_move_id" string="Journal Refund" widget="statinfo"/>
- </button>
- </div>
- <widget name="web_ribbon"
- title="PAID"
- bg_color="bg-success"
- attrs="{'invisible': [('status_payment', '!=', 'done')]}"/>
-
- <widget name="web_ribbon"
- title="CANCEL"
- bg_color="bg-danger"
- attrs="{'invisible': [('status_payment', '!=', 'reject')]}"/>
- <h1>
- <field name="name" readonly="1"/>
- </h1>
- <group col="2">
- <group>
- <field name="is_locked" invisible="1"/>
- <field name="status_payment" invisible="1"/>
- <field name="journal_refund_state" invisible="1"/>
-
- <field name="partner_id" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="sale_order_ids" widget="many2many_tags" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="invoice_ids" widget="many2many_tags" readonly="1"/>
- <field name="invoice_names" widget="html" readonly="1"/>
- <field name="so_names" widget="html" readonly="1"/>
- <field name="advance_move_names" widget="html" readonly="1"/>
- <field name="refund_type" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="note_refund" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- </group>
- <group>
- <field name="uang_masuk" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="total_invoice" readonly="1"/>
- <field name="ongkir" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="amount_refund" readonly="1"/>
- <field name="amount_refund_text" readonly="1"/>
- <field name="uang_masuk_type" required="1" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="bukti_uang_masuk_image" widget="image"
- attrs="{'invisible': [('uang_masuk_type', '=', 'pdf')], 'readonly': [('is_locked', '=', True)]}"/>
- <field name="bukti_uang_masuk_pdf" widget="pdf_viewer"
- attrs="{'invisible': [('uang_masuk_type', '=', 'image')], 'readonly': [('is_locked', '=', True)]}"/>
- </group>
- </group>
-
- <notebook>
- <page string="Produk Line">
- <field name="line_ids" attrs="{'readonly': [('is_locked', '=', True)]}">
- <tree editable="bottom">
- <field name="product_id"/>
- <field name="quantity"/>
- <field name="reason"/>
- </tree>
- </field>
- </page>
-
- <page string="Other Info">
- <group col="2">
- <group>
- <field name="user_ids" widget="many2many_tags" readonly="1"/>
- <field name="created_date" readonly="1"/>
- <field name="refund_date" attrs="{'readonly': [('status', 'not in', ['pengajuan3','refund'])]}"/>
- </group>
- <group>
- <field name="bank" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="account_name" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- <field name="account_no" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- </group>
- </group>
- </page>
-
- <page string="Finance Note">
- <group col="2">
- <group>
- <field name="finance_note" attrs="{'readonly': [('is_locked', '=', True)]}"/>
- </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')]}"/>
- <field name="bukti_transfer_refund_image" widget="image" attrs="{'invisible': [('bukti_refund_type', '=', 'pdf')]}"/>
- </group>
- </group>
- </page>
-
- <page string="Cancel Reason" attrs="{'invisible': [('status', '=', 'refund')]}">
- <group>
- <field name="reason_reject"/>
- </group>
- </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>
- <!-- Action -->
- <record id="action_refund_sale_order" model="ir.actions.act_window">
- <field name="name">Refund Sales Order</field>
- <field name="res_model">refund.sale.order</field>
- <field name="view_mode">tree,form</field>
- </record>
-
- <!-- Menu -->
- <menuitem id="menu_refund_sale_order"
- name="Refund"
- parent="sale.sale_order_menu"
- sequence="10"
- action="action_refund_sale_order"/>
-</odoo>
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index bb8bdc08..c1f1fe61 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -35,30 +35,30 @@
string="UangMuka"
type="action" attrs="{'invisible': [('approval_status', '!=', 'approved')]}"/>
</button>
- <xpath expr="//header" position="inside">
+ <!-- <xpath expr="//header" position="inside">
<button name="button_refund"
type="object"
string="Refund"
class="btn-primary"
attrs="{'invisible': ['|', ('state', 'not in', ['sale', 'done']), ('has_refund', '=', True)]}" />
- </xpath>
+ </xpath> -->
<div class="oe_button_box" name="button_box">
- <button name="action_open_advance_payment_move"
+ <field name="advance_payment_move_ids" invisible="1"/>
+ <button name="action_open_advance_payment_moves"
type="object"
class="oe_stat_button"
icon="fa-book"
- width="250px"
- attrs="{'invisible': [('advance_payment_move_id','=',False)]}">
- <field name="advance_payment_move_id" string="Journal Uang Muka" widget="statinfo"/>
+ attrs="{'invisible': [('advance_payment_move_ids', '=', [])]}">
+ <field name="advance_payment_move_count" widget="statinfo" string="Journals"/>
</button>
- <button type="object"
+ <!-- <button type="object"
name="action_view_related_refunds"
class="oe_stat_button"
icon="fa-refresh"
attrs="{'invisible': [('refund_count', '=', 0)]}">
<field name="refund_count" widget="statinfo" string="Refund"/>
- </button>
+ </button> -->
</div>
<field name="payment_term_id" position="after">
<field name="create_uid" invisible="1"/>
@@ -176,7 +176,10 @@
<field name="expected_ready_to_ship"/>
<field name="eta_date_start"/>
<field name="eta_date" readonly="1"/>
- <field name="has_refund" readonly="1"/>
+ <!-- <field name="has_refund" readonly="1"/> -->
+ </group>
+ <group string="Return Doc">
+ <field name="ccm_id" readonly="1"/>
</group>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']"
@@ -658,7 +661,7 @@
</record>
</data>
- <data>
+ <!-- <data>
<record id="sale_order_multi_create_refund_ir_actions_server" model="ir.actions.server">
<field name="name">Refund</field>
<field name="model_id" ref="sale.model_sale_order"/>
@@ -666,7 +669,7 @@
<field name="state">code</field>
<field name="code">action = records.open_form_multi_create_refund()</field>
</record>
- </data>
+ </data> -->
<data>
<record id="mail_template_sale_order_notification_to_salesperson" model="mail.template">
diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml
index 5e33e4c7..f9200dfa 100644
--- a/indoteknik_custom/views/stock_picking.xml
+++ b/indoteknik_custom/views/stock_picking.xml
@@ -50,11 +50,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"
diff --git a/indoteknik_custom/views/tukar_guling.xml b/indoteknik_custom/views/tukar_guling.xml
new file mode 100644
index 00000000..fa3db0d2
--- /dev/null
+++ b/indoteknik_custom/views/tukar_guling.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <data>
+ <!-- Action -->
+ <record id="action_pengajuan_tukar_guling" model="ir.actions.act_window">
+ <field name="name">Pengajuan Return SO</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">tukar.guling</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+ <!-- Menu -->
+ <menuitem
+ id="menu_pengajuan_tukar_guling"
+ name="Pengajuan Return SO"
+ parent="sale.sale_order_menu"
+ sequence="7"
+ action="action_pengajuan_tukar_guling"
+ />
+ <!-- Tree View -->
+ <record id="pengajuan_tukar_guling_tree" model="ir.ui.view">
+ <field name="name">pengajuan.tukar.guling.tree</field>
+ <field name="model">tukar.guling</field>
+ <field name="arch" type="xml">
+ <tree create="1" delete="1" default_order="create_date desc">
+ <field name="name"/>
+ <field name="partner_id" string="Customer"/>
+ <field name="origin" string="SO Number"/>
+ <field name="operations" string="Operations"/>
+ <field name="return_type" string="Return Type"/>
+ <field name="state" widget="badge"
+ decoration-info="state in ('draft', 'approval_sales', 'approval_finance','approval_logistic')"
+ decoration-success="state == 'done'"
+ decoration-muted="state == 'cancel'"
+ />
+ <field name="ba_num" string="Nomor BA"/>
+ <field name="date"/>
+ <field name="date_logistic" string="Approved Date"/>
+ </tree>
+ </field>
+ </record>
+ <!-- Form View -->
+ <record id="pengajuan_tukar_guling_form" model="ir.ui.view">
+ <field name="name">pengajuan.tukar.guling.form</field>
+ <field name="model">tukar.guling</field>
+ <field name="arch" type="xml">
+ <form>
+ <header>
+ <button name="action_submit" string="Submit" type="object"
+ class="btn-primary"
+ attrs="{'invisible': [('state', '!=', 'draft')]}"/>
+ <button name="action_approve" string="Approve" type="object"
+ class="btn-primary"
+ attrs="{'invisible': [('state', 'not in', ['approval_sales', 'approval_finance', 'approval_logistic'])]}"/>
+ <button name="action_cancel" string="Cancel" type="object"
+ class="btn-secondary"
+ attrs="{'invisible': [('state', '=', 'cancel')]}"/>
+ <button name="action_draft" string="Set to Draft" type="object"
+ class="btn-secondary"
+ attrs="{'invisible': [('state', '!=', 'cancel')]}"/>
+ <field name="state" widget="statusbar" readonly="1"
+ statusbar_visible="draft,approval_sales,approval_logistic,approval_finance,done"/>
+ </header>
+ <sheet>
+ <div class="oe_button_box">
+ <button name="action_view_picking"
+ type="object"
+ class="oe_stat_button"
+ icon="fa-truck"
+ attrs="{'invisible': [('picking_ids', '=', False), ('state', 'in', ['draft', 'approval_sales', 'approval_logistic', 'approval_finance'])]}">
+ <field name="picking_ids" widget="statinfo" string="Delivery"/>
+ </button>
+ </div>
+ <div class="oe_title">
+ <h1>
+ <field name="name" readonly="1" class="oe_inline"/>
+ </h1>
+ </div>
+ <group>
+ <group>
+ <field name="date" string="Date" readonly="1"/>
+ <field name="partner_id" readonly="1"/>
+ <field name="return_type" attrs="{'readonly': [('state', 'not in', 'draft')]}"/>
+ <field name="operations"
+ attrs="{'readonly': [('state', 'not in', 'draft')]}"/>
+ <field name="origin" readonly="1"/>
+ </group>
+ <group>
+ <field name="ba_num" string="Nomor BA"/>
+ <field name="notes"/>
+ <field name="date_sales" readonly="1"/>
+ <field name="date_finance" readonly="1"/>
+ <field name="date_logistic" readonly="1"/>
+ </group>
+ </group>
+ <notebook>
+ <page string="Product Lines" name="product_lines">
+ <field name="line_ids">
+ <tree string="Product Lines" editable="top" create="0" delete="1">
+ <field name="sequence" widget="handle"/>
+ <field name="product_id" required="0"
+ options="{'no_create': True, 'no_create_edit': True}" readonly="0"/>
+ <field name="name" force_save="0" readonly="1"/>
+ <field name="product_uom_qty" string="Quantity"/>
+ <field name="product_uom" string="UoM"
+ options="{'no_create': True, 'no_create_edit': True}"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Mapping Koli" name="mapping_koli">
+ <field name="mapping_koli_ids">
+ <tree editable="top" create="0" delete="1">
+ <field name="pick_id" readonly="1" force_save="1"/>
+ <field name="product_id" readonly="1" force_save="1"/>
+ <field name="qty_done" force_save="1" readonly="1"/>
+ <field name="qty_return"/>
+ </tree>
+ </field>
+ </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>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/tukar_guling_po.xml b/indoteknik_custom/views/tukar_guling_po.xml
new file mode 100644
index 00000000..26c0a0d4
--- /dev/null
+++ b/indoteknik_custom/views/tukar_guling_po.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <data>
+ <!-- Action -->
+ <record id="action_pengajuan_tukar_guling_po" model="ir.actions.act_window">
+ <field name="name">Pengajuan Return PO</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">tukar.guling.po</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+ <!-- Menu -->
+ <menuitem
+ id="menu_pengajuan_tukar_guling_po"
+ name="Pengajuan Return PO"
+ parent="purchase.menu_procurement_management"
+ sequence="3"
+ action="action_pengajuan_tukar_guling_po"
+ />
+ <!-- Tree View -->
+ <record id="pengajuan_tukar_guling_po_tree" model="ir.ui.view">
+ <field name="name">pengajuan.tukar.guling.po.tree</field>
+ <field name="model">tukar.guling.po</field>
+ <field name="arch" type="xml">
+ <tree create="1" delete="1" default_order="create_date desc">
+ <field name="name"/>
+ <field name="vendor_id" string="Customer"/>
+ <field name="origin" string="SO Number"/>
+ <field name="operations" string="Operations"/>
+ <field name="return_type" string="Return Type"/>
+ <field name="state" widget="badge"
+ decoration-info="state in ('draft', 'approval_purchase', 'approval_finance','approval_logistic')"
+ decoration-success="state == 'done'"
+ decoration-muted="state == 'cancel'"
+ />
+ <field name="ba_num" string="Nomor BA"/>
+ <field name="date"/>
+ <field name="date_logistic" string="Approved Date"/>
+ </tree>
+ </field>
+ </record>
+ <!-- Form View -->
+ <record id="pengajuan_tukar_guling_po_form" model="ir.ui.view">
+ <field name="name">pengajuan.tukar.guling.po.form</field>
+ <field name="model">tukar.guling.po</field>
+ <field name="arch" type="xml">
+ <form>
+ <header>
+ <button name="action_submit" string="Submit" type="object"
+ class="btn-primary"
+ attrs="{'invisible': [('state', '!=', 'draft')]}"/>
+ <button name="action_approve" string="Approve" type="object"
+ class="btn-primary"
+ attrs="{'invisible': [('state', 'not in', ['approval_purchase', 'approval_finance', 'approval_logistic'])]}"/>
+ <button name="action_cancel" string="Cancel" type="object"
+ class="btn-secondary"
+ attrs="{'invisible': [('state', '=', 'cancel')]}"
+ confirm="Are you sure you want to cancel this record?"/>
+ <button name="action_draft" string="Set to Draft" type="object"
+ class="btn-secondary"
+ attrs="{'invisible': [('state', '!=', 'cancel')]}"
+ confirm="Are you sure you want to reset this record to draft?"/>
+ <field name="state" widget="statusbar" readonly="1"
+ statusbar_visible="draft,approval_purchase,approval_logistic,approval_finance,done"/>
+ </header>
+ <sheet>
+ <div class="oe_button_box">
+ <button name="action_view_picking"
+ type="object"
+ class="oe_stat_button"
+ icon="fa-truck"
+ attrs="{'invisible': [('po_picking_ids', '=', False)]}">
+ <field name="po_picking_ids" widget="statinfo" string="Delivery"/>
+ </button>
+ </div>
+ <div class="oe_title">
+ <h1>
+ <field name="name" readonly="1" class="oe_inline"/>
+ </h1>
+ </div>
+ <group>
+ <group>
+ <field name="vendor_id" readonly="1"/>
+ <field name="date" string="Date" readonly="1"/>
+ <field name="return_type"/>
+ <!-- <field name="ort_num" readonly="1"/>-->
+ <!-- <field name="srt_num" readonly="1"/>-->
+ <field name="operations" string="Operations"
+ attrs="{
+ 'required': [('return_type', 'in', ['revisi_po', 'tukar_guling'])]
+ }"/>
+ <field name="origin" readonly="1"/>
+ <!-- <field name="origin_so" readonly="1"/>-->
+ </group>
+ <group>
+ <field name="ba_num" string="Nomor BA"/>
+ <field name="notes"/>
+ <field name="date_purchase" readonly="1"/>
+ <field name="date_finance" readonly="1"/>
+ <field name="date_logistic" readonly="1"/>
+ </group>
+ </group>
+ <!-- Product Lines -->
+ <notebook>
+ <page string="Product Lines" name="product_lines" create="0" edit="0">
+ <field name="line_ids" delete="1" readonly="1">
+ <tree string="Product Lines">
+ <field name="sequence" widget="handle"/>
+ <field name="product_id" required="1"
+ options="{'no_create': True, 'no_create_edit': True}"/>
+ <field name="name" force_save="1"/>
+ <field name="product_uom_qty" string="Quantity"/>
+ <field name="product_uom" string="UoM"
+ options="{'no_create': True, 'no_create_edit': True}"/>
+ </tree>
+ </field>
+ </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>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/tukar_guling_return_views.xml b/indoteknik_custom/views/tukar_guling_return_views.xml
new file mode 100644
index 00000000..9312005a
--- /dev/null
+++ b/indoteknik_custom/views/tukar_guling_return_views.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <!-- Inherit the return picking form view -->
+ <record id="view_stock_return_picking_form_inherit" model="ir.ui.view">
+ <field name="name">stock.return.picking.form.inherit.tukar.guling</field>
+ <field name="model">stock.return.picking</field>
+ <field name="inherit_id" ref="stock.view_stock_return_picking_form"/>
+ <field name="priority" eval="20"/> <!-- Higher than stock_account -->
+ <field name="arch" type="xml">
+ <!-- Add fields above the product moves table -->
+ <xpath expr="//field[@name='product_return_moves']" position="before">
+ <div class="row mb-3">
+ <div class="col-12">
+ <field name="return_type" class="oe_inline"/>
+ </div>
+ </div>
+ </xpath>
+ </field>
+ </record>
+</odoo> \ No newline at end of file