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

133 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Costing List View -->
<record id="view_garment_costing_list" model="ir.ui.view">
<field name="name">garment.costing.list</field>
<field name="model">garment.costing</field>
<field name="arch" type="xml">
<list string="Garment Cost Sheets" sample="1">
<field name="name"/>
<field name="style_id"/>
<field name="buyer_id"/>
<field name="order_qty" sum="Total Pcs"/>
<field name="costing_type"/>
<field name="total_cost_per_pc" widget="monetary"/>
<field name="target_selling_price" widget="monetary"/>
<field name="gross_margin_amount" widget="monetary"/>
<field name="gross_margin_pct" widget="percentage" class="fw-bold text-success"/>
<field name="total_expected_profit" widget="monetary" sum="Total Profit"/>
</list>
</field>
</record>
<!-- Costing Form View -->
<record id="view_garment_costing_form" model="ir.ui.view">
<field name="name">garment.costing.form</field>
<field name="model">garment.costing</field>
<field name="arch" type="xml">
<form string="Garment Cost Sheet">
<header>
<button name="action_load_from_bom" string="Load Costs from Active BOM" type="object" class="btn-secondary" icon="fa-download"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" string="Cost Sheet Reference"/>
<h1><field name="name"/></h1>
</div>
<group>
<group string="Commercial Reference">
<field name="style_id"/>
<field name="buyer_id"/>
<field name="order_qty"/>
<field name="costing_type" widget="radio"/>
</group>
<group string="Currency &amp; Company">
<field name="currency_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<!-- Profitability KPI Highlight Banner -->
<div class="row my-3 p-3 bg-light rounded text-center">
<div class="col-3">
<span class="text-muted small text-uppercase">Total Cost / Pc</span>
<div class="fs-4 fw-bold text-dark"><field name="total_cost_per_pc" widget="monetary"/></div>
<span class="small text-muted">(<field name="total_cost_per_dozen" widget="monetary"/> / Dozen)</span>
</div>
<div class="col-3">
<span class="text-muted small text-uppercase">Selling Price / Pc</span>
<div class="fs-4 fw-bold text-primary"><field name="target_selling_price" widget="monetary"/></div>
</div>
<div class="col-3">
<span class="text-muted small text-uppercase">Gross Margin %</span>
<div class="fs-4 fw-bold text-success"><field name="gross_margin_pct"/>%</div>
<span class="small text-muted">(<field name="gross_margin_amount" widget="monetary"/> / Pc)</span>
</div>
<div class="col-3">
<span class="text-muted small text-uppercase">Total Expected Profit</span>
<div class="fs-4 fw-bold text-success"><field name="total_expected_profit" widget="monetary"/></div>
</div>
</div>
<group string="1. Raw Materials &amp; Processing (Per Piece)">
<group>
<field name="fabric_cost_per_pc" widget="monetary"/>
</group>
<group>
<field name="dyeing_finishing_cost_per_pc" widget="monetary"/>
</group>
</group>
<group string="2. Trims &amp; Value Addition (Per Piece)">
<group>
<field name="trims_accessories_cost_per_pc" widget="monetary"/>
<field name="printing_embroidery_cost_per_pc" widget="monetary"/>
</group>
<group>
<field name="washing_cost_per_pc" widget="monetary"/>
</group>
</group>
<group string="3. Manufacturing Labor &amp; Packaging (Per Piece)">
<group>
<field name="cutting_cost_per_pc" widget="monetary"/>
<field name="sewing_cm_cost_per_pc" widget="monetary"/>
</group>
<group>
<field name="packing_carton_cost_per_pc" widget="monetary"/>
<field name="commercial_freight_cost_per_pc" widget="monetary"/>
</group>
</group>
<group string="4. Overheads &amp; Administration">
<group>
<field name="factory_overhead_pct"/>
</group>
<group>
<field name="factory_overhead_cost" widget="monetary"/>
</group>
</group>
<notebook>
<page string="Costing Notes &amp; Assumptions" name="notes_tab">
<field name="notes" placeholder="Specify exchange rate, buyer commission, payment terms (L/C 60 days, TT), minimum order quantity..."/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Action & Menu -->
<record id="action_garment_costing" model="ir.actions.act_window">
<field name="name">Garment Costing Sheets</field>
<field name="res_model">garment.costing</field>
<field name="view_mode">list,form</field>
</record>
<menuitem id="menu_garment_costing" name="Garment Pre &amp; Post Costing" parent="menu_garment_merchandising_root" action="action_garment_costing" sequence="30"/>
</odoo>