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

129 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Cutting Plan List View -->
<record id="view_garment_cutting_plan_list" model="ir.ui.view">
<field name="name">garment.cutting.plan.list</field>
<field name="model">garment.cutting.plan</field>
<field name="arch" type="xml">
<list string="Cutting Orders" sample="1"
decoration-info="state == 'planned'"
decoration-warning="state == 'cutting'"
decoration-success="state == 'completed'">
<field name="name"/>
<field name="production_plan_id"/>
<field name="style_id"/>
<field name="color_id"/>
<field name="plies_count"/>
<field name="planned_cut_qty" sum="Total Planned Pcs"/>
<field name="actual_cut_qty" sum="Total Actual Pcs"/>
<field name="total_fabric_used_kg" sum="Total Fabric Kg"/>
<field name="cutting_wastage_pct"/>
<field name="bundle_count" string="Bundles"/>
<field name="state" widget="badge"
decoration-info="state == 'planned'"
decoration-warning="state == 'cutting'"
decoration-success="state == 'completed'"/>
</list>
</field>
</record>
<!-- Cutting Plan Form View -->
<record id="view_garment_cutting_plan_form" model="ir.ui.view">
<field name="name">garment.cutting.plan.form</field>
<field name="model">garment.cutting.plan</field>
<field name="arch" type="xml">
<form string="Cutting Order &amp; Lay Plan">
<header>
<button name="action_start_cutting" string="Start Lay &amp; Cutting" type="object" class="btn-primary" invisible="state != 'draft'"/>
<button name="action_generate_bundles" string="Generate Production Bundles" type="object" class="btn-success" icon="fa-tags" invisible="state not in ['draft', 'planned', 'cutting']"/>
<field name="state" widget="statusbar" statusbar_visible="draft,planned,cutting,completed"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_bundles" type="object" class="oe_stat_button" icon="fa-tags">
<field name="bundle_count" widget="statinfo" string="Bundles"/>
</button>
</div>
<div class="oe_title">
<label for="name" string="Cutting Order Number"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Order Details">
<field name="production_plan_id"/>
<field name="style_id"/>
<field name="color_id"/>
</group>
<group string="Marker &amp; Lay Parameters">
<field name="marker_no"/>
<field name="marker_length"/>
<field name="marker_width"/>
<field name="plies_count"/>
<field name="bundle_size"/>
</group>
</group>
<group string="Cutting Output &amp; Fabric Wastage">
<group>
<field name="planned_cut_qty" class="fw-bold"/>
<field name="actual_cut_qty" class="fw-bold fs-4 text-success"/>
</group>
<group>
<field name="total_fabric_used_kg"/>
<field name="end_bit_scrap_kg"/>
<field name="cutting_wastage_pct" widget="percentage" class="fw-bold text-danger"/>
</group>
</group>
<notebook>
<page string="1. Size Cut Ratios (Per Ply)" name="ratios_tab">
<field name="ratio_line_ids">
<list editable="bottom">
<field name="size_id"/>
<field name="ratio" sum="Total Ratio per Ply"/>
<field name="expected_cut_qty" sum="Total Expected Cut Pieces"/>
</list>
</field>
</page>
<page string="2. Fabric Rolls Allocated" name="rolls_tab">
<field name="roll_line_ids">
<list editable="bottom">
<field name="roll_id"/>
<field name="shade_lot"/>
<field name="weight_issued" sum="Total Issued Kg"/>
<field name="weight_used" sum="Total Consumed Kg"/>
<field name="end_bit_scrap" sum="Total Scrap Kg"/>
</list>
</field>
</page>
<page string="3. Generated Production Bundles" name="bundles_tab">
<field name="bundle_ids" readonly="1">
<list>
<field name="name"/>
<field name="barcode"/>
<field name="size_id"/>
<field name="quantity" sum="Total Pieces"/>
<field name="ply_start"/>
<field name="ply_end"/>
<field name="stage"/>
<field name="status"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Action & Menu -->
<record id="action_garment_cutting_plan" model="ir.actions.act_window">
<field name="name">Cutting Orders</field>
<field name="res_model">garment.cutting.plan</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_garment_cutting_plan" name="Cutting Orders" parent="menu_garment_cutting_root" action="action_garment_cutting_plan" sequence="10"/>
</odoo>