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

151 lines
7.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Fabric Roll List View -->
<record id="view_garment_fabric_roll_list" model="ir.ui.view">
<field name="name">garment.fabric.roll.list</field>
<field name="model">garment.fabric.roll</field>
<field name="arch" type="xml">
<list string="Fabric Rolls" sample="1"
decoration-success="status == 'approved'"
decoration-danger="status == 'rejected'"
decoration-info="status == 'received'"
decoration-warning="status == 'issued'"
decoration-muted="status == 'exhausted'">
<field name="name"/>
<field name="product_id"/>
<field name="color_id"/>
<field name="shade_lot"/>
<field name="gsm"/>
<field name="width"/>
<field name="net_weight" sum="Total Net Kg"/>
<field name="issued_weight" sum="Total Issued Kg"/>
<field name="remaining_weight" sum="Total Remaining Kg" class="fw-bold"/>
<field name="supplier_id"/>
<field name="date_received"/>
<field name="status" widget="badge"
decoration-success="status == 'approved'"
decoration-danger="status == 'rejected'"
decoration-info="status == 'received'"
decoration-warning="status == 'issued'"/>
</list>
</field>
</record>
<!-- Fabric Roll Form View -->
<record id="view_garment_fabric_roll_form" model="ir.ui.view">
<field name="name">garment.fabric.roll.form</field>
<field name="model">garment.fabric.roll</field>
<field name="arch" type="xml">
<form string="Fabric Roll">
<header>
<button name="action_create_inspection" string="Conduct 4-Point Inspection" type="object" class="btn-primary" invisible="status not in ['received', 'inspected']"/>
<field name="status" widget="statusbar" statusbar_visible="received,inspected,approved,issued,exhausted"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_create_inspection" type="object" class="oe_stat_button" icon="fa-check-square-o">
<field name="inspection_count" widget="statinfo" string="Inspections"/>
</button>
</div>
<div class="oe_title">
<label for="name" string="Roll Number"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Fabric Specification">
<field name="product_id"/>
<field name="fabric_type_id"/>
<field name="color_id"/>
<field name="shade_lot"/>
<field name="barcode"/>
</group>
<group string="Physical Dimensions">
<field name="gsm"/>
<label for="width"/>
<div class="o_row">
<field name="width"/> Inches (<field name="width_type"/>)
</div>
<field name="length_meters"/>
<field name="yarn_count"/>
</group>
</group>
<group string="Weight &amp; Balance (Kg)">
<group>
<field name="gross_weight"/>
<field name="tare_weight"/>
<field name="net_weight" class="fw-bold"/>
</group>
<group>
<field name="issued_weight"/>
<field name="scrap_weight"/>
<field name="remaining_weight" class="fw-bold fs-4 text-success"/>
</group>
</group>
<group string="Receipt &amp; Storage">
<group>
<field name="supplier_id"/>
<field name="purchase_order_id"/>
</group>
<group>
<field name="date_received"/>
<field name="location_id"/>
</group>
</group>
<notebook>
<page string="4-Point Inspections" name="inspections_tab">
<field name="inspection_ids" readonly="1">
<list>
<field name="name"/>
<field name="date_inspected"/>
<field name="inspector_id"/>
<field name="score_per_100_sqm"/>
<field name="shade_grade"/>
<field name="state" widget="badge" decoration-success="state == 'passed'" decoration-danger="state == 'failed'"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Search View -->
<record id="view_garment_fabric_roll_search" model="ir.ui.view">
<field name="name">garment.fabric.roll.search</field>
<field name="model">garment.fabric.roll</field>
<field name="arch" type="xml">
<search string="Search Fabric Rolls">
<field name="name"/>
<field name="shade_lot"/>
<field name="product_id"/>
<field name="supplier_id"/>
<separator/>
<filter string="Ready to Cut (Approved)" name="approved" domain="[('status', '=', 'approved')]"/>
<filter string="Uninspected" name="received" domain="[('status', '=', 'received')]"/>
<filter string="Rejected (Quarantine)" name="rejected" domain="[('status', '=', 'rejected')]"/>
<filter string="In Stock (>0 Kg)" name="in_stock" domain="[('remaining_weight', '>', 0)]"/>
<group>
<filter string="Fabric Product" name="group_product" context="{'group_by': 'product_id'}"/>
<filter string="Shade / Dyeing Lot" name="group_lot" context="{'group_by': 'shade_lot'}"/>
<filter string="Supplier" name="group_supplier" context="{'group_by': 'supplier_id'}"/>
<filter string="Status" name="group_status" context="{'group_by': 'status'}"/>
</group>
</search>
</field>
</record>
<!-- Action & Menu -->
<record id="action_garment_fabric_roll" model="ir.actions.act_window">
<field name="name">Fabric Rolls Inventory</field>
<field name="res_model">garment.fabric.roll</field>
<field name="view_mode">list,form</field>
<field name="context">{'search_default_in_stock': 1}</field>
</record>
<menuitem id="menu_garment_fabric_roll" name="Fabric Rolls" parent="menu_garment_inventory_root" action="action_garment_fabric_roll" sequence="10"/>
</odoo>