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

205 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Sewing Line Views -->
<record id="view_garment_sewing_line_list" model="ir.ui.view">
<field name="name">garment.sewing.line.list</field>
<field name="model">garment.sewing.line</field>
<field name="arch" type="xml">
<list string="Sewing Lines">
<field name="code"/>
<field name="name"/>
<field name="supervisor_id"/>
<field name="operator_count"/>
<field name="helper_count"/>
<field name="daily_capacity_pcs"/>
<field name="active"/>
</list>
</field>
</record>
<record id="view_garment_sewing_line_form" model="ir.ui.view">
<field name="name">garment.sewing.line.form</field>
<field name="model">garment.sewing.line</field>
<field name="arch" type="xml">
<form string="Sewing Line">
<sheet>
<div class="oe_title">
<label for="name" string="Line Name"/>
<h1><field name="name" placeholder="e.g. Line 01 - T-Shirt Specialist"/></h1>
</div>
<group>
<group>
<field name="code"/>
<field name="supervisor_id"/>
<field name="active"/>
</group>
<group>
<field name="operator_count"/>
<field name="helper_count"/>
<field name="daily_capacity_pcs"/>
</group>
</group>
<notebook>
<page string="Machine Layout &amp; Setup">
<field name="notes" placeholder="Specify workstation layout, machine types (Overlock 4T, Flatlock, SNLS), and maintenance notes..."/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="action_garment_sewing_line" model="ir.actions.act_window">
<field name="name">Sewing Lines</field>
<field name="res_model">garment.sewing.line</field>
<field name="view_mode">list,form</field>
</record>
<!-- Hourly Production Log Views -->
<record id="view_garment_sewing_hourly_list" model="ir.ui.view">
<field name="name">garment.sewing.hourly.list</field>
<field name="model">garment.sewing.hourly</field>
<field name="arch" type="xml">
<list string="Hourly Production Logs" sample="1"
decoration-success="efficiency_badge == 'excellent'"
decoration-warning="efficiency_badge == 'good'"
decoration-danger="efficiency_badge == 'needs_attention'">
<field name="date"/>
<field name="line_id"/>
<field name="style_id"/>
<field name="production_plan_id"/>
<field name="operators_present"/>
<field name="total_target" sum="Total Target"/>
<field name="total_actual" sum="Total Output"/>
<field name="total_defects" sum="Total Defects"/>
<field name="efficiency_pct" widget="progressbar"/>
<field name="efficiency_badge" widget="badge"
decoration-success="efficiency_badge == 'excellent'"
decoration-warning="efficiency_badge == 'good'"
decoration-danger="efficiency_badge == 'needs_attention'"/>
</list>
</field>
</record>
<record id="view_garment_sewing_hourly_form" model="ir.ui.view">
<field name="name">garment.sewing.hourly.form</field>
<field name="model">garment.sewing.hourly</field>
<field name="arch" type="xml">
<form string="Sewing Hourly Production Tracking">
<sheet>
<div class="oe_title">
<label for="name" string="Log Reference"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Line &amp; Running Style">
<field name="line_id"/>
<field name="date"/>
<field name="shift"/>
<field name="style_id"/>
<field name="production_plan_id"/>
</group>
<group string="Labor &amp; Line Efficiency Summary">
<field name="operators_present"/>
<field name="sam"/>
<field name="total_worked_hours"/>
<field name="efficiency_pct" class="fw-bold fs-3 text-primary" widget="percentage"/>
<field name="efficiency_badge" widget="badge"
decoration-success="efficiency_badge == 'excellent'"
decoration-warning="efficiency_badge == 'good'"
decoration-danger="efficiency_badge == 'needs_attention'"/>
</group>
</group>
<div class="row my-3 p-3 bg-light rounded text-center">
<div class="col-4">
<span class="text-muted text-uppercase small">Day Target</span>
<div class="fs-4 fw-bold text-dark"><field name="total_target"/> Pcs</div>
</div>
<div class="col-4">
<span class="text-muted text-uppercase small">Actual Produced</span>
<div class="fs-4 fw-bold text-success"><field name="total_actual"/> Pcs</div>
</div>
<div class="col-4">
<span class="text-muted text-uppercase small">Alterations / Defects</span>
<div class="fs-4 fw-bold text-danger"><field name="total_defects"/> Pcs</div>
</div>
</div>
<notebook>
<page string="Hourly Floor Tracker (Target / Actual / Defect)" name="hourly_grid">
<table class="table table-bordered text-center align-middle" style="font-size:13px;">
<thead class="table-dark">
<tr>
<th style="width:14%;">Metric</th>
<th>H1 (08:30-09:30)</th>
<th>H2 (09:30-10:30)</th>
<th>H3 (10:30-11:30)</th>
<th>H4 (11:30-12:30)</th>
<th>H5 (13:15-14:15)</th>
<th>H6 (14:15-15:15)</th>
<th>H7 (15:15-16:15)</th>
<th>H8 (16:15-17:15)</th>
<th class="table-secondary">OT (Overtime)</th>
</tr>
</thead>
<tbody>
<tr class="table-light">
<td class="fw-bold text-start">Target Pcs</td>
<td><field name="h1_target"/></td>
<td><field name="h2_target"/></td>
<td><field name="h3_target"/></td>
<td><field name="h4_target"/></td>
<td><field name="h5_target"/></td>
<td><field name="h6_target"/></td>
<td><field name="h7_target"/></td>
<td><field name="h8_target"/></td>
<td><field name="ot_target"/></td>
</tr>
<tr class="table-success">
<td class="fw-bold text-start text-success">Actual Output</td>
<td><field name="h1_actual"/></td>
<td><field name="h2_actual"/></td>
<td><field name="h3_actual"/></td>
<td><field name="h4_actual"/></td>
<td><field name="h5_actual"/></td>
<td><field name="h6_actual"/></td>
<td><field name="h7_actual"/></td>
<td><field name="h8_actual"/></td>
<td><field name="ot_actual"/></td>
</tr>
<tr class="table-warning">
<td class="fw-bold text-start text-danger">Defects / Alter</td>
<td><field name="h1_defect"/></td>
<td><field name="h2_defect"/></td>
<td><field name="h3_defect"/></td>
<td><field name="h4_defect"/></td>
<td><field name="h5_defect"/></td>
<td><field name="h6_defect"/></td>
<td><field name="h7_defect"/></td>
<td><field name="h8_defect"/></td>
<td><field name="ot_defect"/></td>
</tr>
</tbody>
</table>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Actions & Menus -->
<record id="action_garment_sewing_hourly" model="ir.actions.act_window">
<field name="name">Hourly Production Tracking</field>
<field name="res_model">garment.sewing.hourly</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_garment_sewing_hourly" name="Hourly Production Logs" parent="menu_garment_sewing_root" action="action_garment_sewing_hourly" sequence="10"/>
<menuitem id="menu_garment_sewing_line" name="Sewing Lines Configuration" parent="menu_garment_sewing_root" action="action_garment_sewing_line" sequence="20"/>
</odoo>