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

115 lines
5.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- BOM List View -->
<record id="view_garment_bom_list" model="ir.ui.view">
<field name="name">garment.bom.list</field>
<field name="model">garment.bom</field>
<field name="arch" type="xml">
<list string="Garment BOMs" sample="1">
<field name="name"/>
<field name="style_id"/>
<field name="base_qty"/>
<field name="total_fabric_cost" widget="monetary"/>
<field name="total_trim_cost" widget="monetary"/>
<field name="total_operation_cost" widget="monetary"/>
<field name="total_unit_cost" widget="monetary" class="fw-bold text-success"/>
<field name="active"/>
</list>
</field>
</record>
<!-- BOM Form View -->
<record id="view_garment_bom_form" model="ir.ui.view">
<field name="name">garment.bom.form</field>
<field name="model">garment.bom</field>
<field name="arch" type="xml">
<form string="Garment Bill of Materials">
<sheet>
<div class="oe_title">
<label for="name" string="BOM Reference"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Style &amp; Quantity">
<field name="style_id"/>
<label for="base_qty"/>
<div class="o_row">
<field name="base_qty"/>
<field name="uom_id"/>
</div>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group string="Cost Summary (per piece)">
<field name="total_fabric_cost" widget="monetary"/>
<field name="total_trim_cost" widget="monetary"/>
<field name="total_operation_cost" widget="monetary"/>
<field name="total_unit_cost" widget="monetary" class="fw-bold fs-4 text-primary"/>
</group>
</group>
<notebook>
<page string="1. Fabric Components" name="fabric_page">
<field name="fabric_line_ids">
<list editable="bottom">
<field name="component_type"/>
<field name="fabric_type_id"/>
<field name="product_id"/>
<field name="gsm"/>
<field name="width"/>
<field name="consumption_kg"/>
<field name="wastage_pct"/>
<field name="gross_consumption_kg"/>
<field name="cost_per_kg"/>
<field name="subtotal_cost" sum="Total Fabric Cost"/>
</list>
</field>
</page>
<page string="2. Trims &amp; Accessories" name="trims_page">
<field name="trim_line_ids">
<list editable="bottom">
<field name="trim_type"/>
<field name="item_name"/>
<field name="product_id"/>
<field name="consumption_qty"/>
<field name="wastage_pct"/>
<field name="gross_qty"/>
<field name="uom_id"/>
<field name="unit_cost"/>
<field name="subtotal_cost" sum="Total Trims Cost"/>
</list>
</field>
</page>
<page string="3. Operations &amp; Routing (CM)" name="operations_page">
<field name="operation_line_ids">
<list editable="bottom">
<field name="sequence" widget="handle"/>
<field name="operation_name"/>
<field name="department"/>
<field name="machine_type"/>
<field name="sam" sum="Total SAM"/>
<field name="minute_rate"/>
<field name="subtotal_cost" sum="Total CM Cost"/>
</list>
</field>
</page>
<page string="Technical Notes" name="notes_page">
<field name="notes" placeholder="Fabric shrinkage allowance, thread type recommendations, stitching parameters..."/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Action & Menu -->
<record id="action_garment_bom" model="ir.actions.act_window">
<field name="name">Garment BOMs</field>
<field name="res_model">garment.bom</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_garment_bom" name="Garment BOMs" parent="menu_garment_planning_root" action="action_garment_bom" sequence="10"/>
</odoo>