92 lines
4.7 KiB
XML
92 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- MRP List View -->
|
|
<record id="view_garment_mrp_requirement_list" model="ir.ui.view">
|
|
<field name="name">garment.mrp.requirement.list</field>
|
|
<field name="model">garment.mrp.requirement</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Material Requirements" sample="1">
|
|
<field name="name"/>
|
|
<field name="production_plan_id"/>
|
|
<field name="style_id"/>
|
|
<field name="order_qty"/>
|
|
<field name="total_shortage_cost" widget="monetary" sum="Total Shortage"/>
|
|
<field name="purchase_count" string="POs Created"/>
|
|
<field name="state" widget="badge"
|
|
decoration-info="state == 'calculated'"
|
|
decoration-success="state == 'rfq_created'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- MRP Form View -->
|
|
<record id="view_garment_mrp_requirement_form" model="ir.ui.view">
|
|
<field name="name">garment.mrp.requirement.form</field>
|
|
<field name="model">garment.mrp.requirement</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Material Requirement Planning">
|
|
<header>
|
|
<button name="action_compute_requirements" string="Re-Calculate Needs" type="object" class="btn-primary" icon="fa-calculator"/>
|
|
<button name="action_generate_purchase_rfqs" string="Generate Purchase RFQs for Shortages" type="object" class="btn-success" icon="fa-shopping-cart" invisible="state != 'calculated'"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="draft,calculated,rfq_created"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="action_generate_purchase_rfqs" type="object" class="oe_stat_button" icon="fa-shopping-cart">
|
|
<field name="purchase_count" widget="statinfo" string="Purchase Orders"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<label for="name" string="MRP Calculation No"/>
|
|
<h1><field name="name"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Order & BOM">
|
|
<field name="production_plan_id"/>
|
|
<field name="style_id"/>
|
|
<field name="bom_id"/>
|
|
</group>
|
|
<group string="Quantity & Shortage Budget">
|
|
<field name="order_qty"/>
|
|
<field name="total_shortage_cost" widget="monetary" class="fw-bold fs-4 text-danger"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Material Shortage & Requirement Breakdown" name="lines_page">
|
|
<field name="line_ids">
|
|
<list editable="bottom"
|
|
decoration-danger="shortage_qty > 0"
|
|
decoration-success="shortage_qty == 0">
|
|
<field name="material_type"/>
|
|
<field name="name"/>
|
|
<field name="product_id"/>
|
|
<field name="required_qty"/>
|
|
<field name="uom_name"/>
|
|
<field name="available_qty"/>
|
|
<field name="shortage_qty" class="fw-bold"/>
|
|
<field name="to_purchase_qty"/>
|
|
<field name="unit_price"/>
|
|
<field name="shortage_cost" sum="Total Estimated Shortage Cost"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Action & Menu -->
|
|
<record id="action_garment_mrp_requirement" model="ir.actions.act_window">
|
|
<field name="name">Material Requirements (MRP)</field>
|
|
<field name="res_model">garment.mrp.requirement</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_garment_mrp_requirement" name="Material Requirements (MRP)" parent="menu_garment_planning_root" action="action_garment_mrp_requirement" sequence="30"/>
|
|
|
|
</odoo>
|