146 lines
6.6 KiB
XML
146 lines
6.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
|
|
<!-- ===== List ===== -->
|
|
<record id="view_fp_rack_list" model="ir.ui.view">
|
|
<field name="name">fusion.plating.rack.list</field>
|
|
<field name="model">fusion.plating.rack</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-danger="state == 'needs_strip'"
|
|
decoration-warning="state == 'stripping'"
|
|
decoration-muted="state == 'retired'">
|
|
<field name="name"/>
|
|
<field name="rack_type"/>
|
|
<field name="facility_id"/>
|
|
<field name="capacity"/>
|
|
<field name="mto_count"/>
|
|
<field name="strip_interval_mto"/>
|
|
<field name="last_stripped_date"/>
|
|
<field name="strips_count"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'active'"
|
|
decoration-danger="state == 'needs_strip'"
|
|
decoration-warning="state == 'stripping'"
|
|
decoration-muted="state == 'retired'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Form ===== -->
|
|
<record id="view_fp_rack_form" model="ir.ui.view">
|
|
<field name="name">fusion.plating.rack.form</field>
|
|
<field name="model">fusion.plating.rack</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_start_strip"
|
|
string="Start Strip"
|
|
type="object" class="btn-primary"
|
|
invisible="state != 'needs_strip'"/>
|
|
<button name="action_mark_stripped"
|
|
string="Mark Stripped"
|
|
type="object" class="btn-primary"
|
|
invisible="state != 'stripping'"/>
|
|
<button name="action_retire"
|
|
string="Retire"
|
|
type="object" class="btn-secondary"
|
|
invisible="state == 'retired'"
|
|
confirm="Retire this rack permanently?"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="active,needs_strip,stripping"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" placeholder="e.g. RACK-014"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Identity">
|
|
<field name="rack_type"/>
|
|
<field name="facility_id"/>
|
|
<field name="capacity"/>
|
|
<field name="contact_points"/>
|
|
</group>
|
|
<group string="Wear & Strip">
|
|
<field name="mto_count"/>
|
|
<field name="strip_interval_mto"/>
|
|
<field name="last_stripped_date"/>
|
|
<field name="last_stripped_by_id"/>
|
|
<field name="strips_count"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<group string="Tags + Capacity (Sub 12b)">
|
|
<field name="racking_state"/>
|
|
<field name="tag_ids" widget="many2many_tags"
|
|
options="{'color_field': 'color'}"/>
|
|
<field name="capacity_count"/>
|
|
</group>
|
|
<group string="Current Use"
|
|
invisible="racking_state in ('empty','out_of_service')">
|
|
<field name="current_job_step_id" readonly="1"/>
|
|
<field name="current_tank_id" readonly="1"/>
|
|
<field name="current_part_count" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<separator string="Notes"/>
|
|
<field name="notes" colspan="2"/>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Kanban ===== -->
|
|
<record id="view_fp_rack_kanban" model="ir.ui.view">
|
|
<field name="name">fusion.plating.rack.kanban</field>
|
|
<field name="model">fusion.plating.rack</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="state">
|
|
<field name="status_color"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_card oe_kanban_global_click oe_kanban_color_#{record.status_color.raw_value}">
|
|
<strong><field name="name"/></strong>
|
|
<div><field name="rack_type"/> — <field name="facility_id"/></div>
|
|
<div>MTO: <field name="mto_count"/> / <field name="strip_interval_mto"/></div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== Search ===== -->
|
|
<record id="view_fp_rack_search" model="ir.ui.view">
|
|
<field name="name">fusion.plating.rack.search</field>
|
|
<field name="model">fusion.plating.rack</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="facility_id"/>
|
|
<filter name="needs_strip" string="Needs Strip"
|
|
domain="[('state', '=', 'needs_strip')]"/>
|
|
<filter name="active" string="Active"
|
|
domain="[('state', '=', 'active')]"/>
|
|
<separator/>
|
|
<group>
|
|
<filter name="group_facility" string="Facility"
|
|
context="{'group_by': 'facility_id'}"/>
|
|
<filter name="group_type" string="Type"
|
|
context="{'group_by': 'rack_type'}"/>
|
|
<filter name="group_state" string="Status"
|
|
context="{'group_by': 'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fp_rack" model="ir.actions.act_window">
|
|
<field name="name">Racks & Fixtures</field>
|
|
<field name="res_model">fusion.plating.rack</field>
|
|
<field name="view_mode">list,kanban,form</field>
|
|
<field name="search_view_id" ref="view_fp_rack_search"/>
|
|
</record>
|
|
|
|
</odoo>
|