Garment_ERP/addons/garment_erp/views/dispatch_views.xml
2026-09-21 16:43:23 +05:30

107 lines
5.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Dispatch List View -->
<record id="view_garment_dispatch_list" model="ir.ui.view">
<field name="name">garment.dispatch.list</field>
<field name="model">garment.dispatch</field>
<field name="arch" type="xml">
<list string="Dispatch Orders" sample="1"
decoration-info="state == 'packed'"
decoration-warning="state == 'dispatched'"
decoration-success="state == 'delivered'">
<field name="name"/>
<field name="customer_id"/>
<field name="sale_order_id"/>
<field name="date_dispatch"/>
<field name="carrier_name"/>
<field name="bl_awb_no"/>
<field name="total_cartons" sum="Total Cartons"/>
<field name="total_pieces" sum="Total Pieces"/>
<field name="total_cbm" sum="Total CBM"/>
<field name="state" widget="badge"
decoration-info="state == 'packed'"
decoration-warning="state == 'dispatched'"
decoration-success="state == 'delivered'"/>
</list>
</field>
</record>
<!-- Dispatch Form View -->
<record id="view_garment_dispatch_form" model="ir.ui.view">
<field name="name">garment.dispatch.form</field>
<field name="model">garment.dispatch</field>
<field name="arch" type="xml">
<form string="Dispatch &amp; Delivery Note">
<header>
<button name="action_dispatch" string="Confirm Dispatch (Deduct FG Stock)" type="object" class="btn-primary" invisible="state not in ['draft', 'packed']"/>
<button name="action_mark_delivered" string="Mark Delivered to Customer" type="object" class="btn-success" invisible="state != 'dispatched'"/>
<field name="state" widget="statusbar" statusbar_visible="draft,packed,dispatched,delivered"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" string="Dispatch Order Number"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Buyer &amp; Sales Order">
<field name="customer_id"/>
<field name="sale_order_id"/>
<field name="production_plan_id"/>
<field name="date_dispatch"/>
</group>
<group string="Carrier &amp; Shipping Details">
<field name="carrier_name"/>
<field name="bl_awb_no"/>
<field name="container_no"/>
<field name="seal_no"/>
<field name="vehicle_no"/>
<field name="port_of_loading"/>
<field name="port_of_discharge"/>
</group>
</group>
<group string="Shipment Cargo Metrics">
<group>
<field name="total_cartons" class="fw-bold"/>
<field name="total_pieces" class="fw-bold fs-4 text-success"/>
</group>
<group>
<field name="total_gross_weight"/>
<field name="total_cbm"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page string="Loaded Cartons" name="cartons_tab">
<field name="carton_ids">
<list>
<field name="carton_no"/>
<field name="name"/>
<field name="barcode"/>
<field name="total_pieces" sum="Total Pieces"/>
<field name="gross_weight_kg"/>
<field name="cbm"/>
</list>
</field>
</page>
<page string="Shipping Marks &amp; Instructions" name="notes_tab">
<field name="notes" placeholder="Enter side marks, port marks, consignee notify party details..."/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Action & Menu -->
<record id="action_garment_dispatch" model="ir.actions.act_window">
<field name="name">Dispatch &amp; Delivery Orders</field>
<field name="res_model">garment.dispatch</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_garment_dispatch" name="Dispatch &amp; Shipments" parent="menu_garment_packing_root" action="action_garment_dispatch" sequence="30"/>
</odoo>