feat(shopfloor): rebuild bake/gate kanban templates with .o_fp_kcard

Companion to commit 4843146 / f7f500f which added the shared
SCSS. This commit wires the views to use it: the manifest now
loads fp_kanbans.scss and the two kanban templates render with
the new .o_fp_kcard structure (state stripe, title, subtitle,
big metric, meta line, chip footer).
This commit is contained in:
gsinghpal
2026-04-18 23:41:27 -04:00
parent f7f500f87a
commit cad2f937cf
3 changed files with 100 additions and 24 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Plating — Shop Floor',
'version': '19.0.11.0.0',
'version': '19.0.12.0.0',
'category': 'Manufacturing/Plating',
'summary': 'Shop-floor tablet stations, QR scanning, bake window enforcer, '
'first-piece inspection gates.',
@@ -65,6 +65,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
'fusion_plating_shopfloor/static/src/scss/plant_overview.scss',
'fusion_plating_shopfloor/static/src/scss/process_tree.scss',
'fusion_plating_shopfloor/static/src/scss/manager_dashboard.scss',
'fusion_plating_shopfloor/static/src/scss/fp_kanbans.scss',
'fusion_plating_shopfloor/static/src/xml/shopfloor_tablet.xml',
'fusion_plating_shopfloor/static/src/xml/plant_overview.xml',
'fusion_plating_shopfloor/static/src/xml/process_tree.xml',

View File

@@ -111,34 +111,70 @@
</field>
</record>
<!--
Kanban rebuilt 2026-04 to match the Plant Overview card design.
Shared base styles live in fp_kanbans.scss (.o_fp_kcard); the
wrapping .o_fp_bw_kanban class scopes per-state stripe colours.
-->
<record id="view_fp_bake_window_kanban" model="ir.ui.view">
<field name="name">fp.bake.window.kanban</field>
<field name="model">fusion.plating.bake.window</field>
<field name="arch" type="xml">
<kanban default_group_by="state" class="o_fp_bake_window_kanban">
<kanban default_group_by="state" class="o_fp_bw_kanban">
<field name="id"/>
<field name="name"/>
<field name="part_ref"/>
<field name="lot_ref"/>
<field name="customer_ref"/>
<field name="quantity"/>
<field name="bake_required_by"/>
<field name="time_remaining_display"/>
<field name="oven_id"/>
<field name="state"/>
<field name="status_color"/>
<templates>
<t t-name="card">
<div class="o_fp_card o_fp_bake_window_card"
t-att-data-status="record.state.raw_value">
<div class="d-flex align-items-start justify-content-between">
<div>
<strong class="o_fp_card_title"><field name="name"/></strong>
<div class="small text-muted"><field name="part_ref"/></div>
</div>
<span class="o_fp_health_dot" t-att-data-status="record.state.raw_value"/>
<div class="o_fp_kcard"
t-att-data-state="record.state.raw_value">
<div class="o_fp_kcard_title">
<field name="name"/>
</div>
<div class="mt-2 small">
<div><i class="fa fa-clock-o me-1 text-muted"/><field name="time_remaining_display"/></div>
<div class="text-muted">Lot <field name="lot_ref"/></div>
<div class="o_fp_kcard_sub" t-if="record.part_ref.raw_value">
<field name="part_ref"/>
</div>
<div class="o_fp_kcard_metric">
<i class="fa fa-clock-o me-1 text-muted"/>
<span class="o_fp_kcard_metric_value">
<field name="time_remaining_display"/>
</span>
<span class="o_fp_kcard_metric_label">remaining</span>
</div>
<div class="o_fp_kcard_meta">
<span t-if="record.lot_ref.raw_value">
Lot <field name="lot_ref"/>
</span>
<span class="o_fp_kcard_meta_sep"
t-if="record.lot_ref.raw_value and record.customer_ref.raw_value">·</span>
<span t-if="record.customer_ref.raw_value">
<field name="customer_ref"/>
</span>
<span class="o_fp_kcard_meta_sep"
t-if="record.quantity.raw_value">·</span>
<span t-if="record.quantity.raw_value">
Qty <field name="quantity"/>
</span>
</div>
<div class="o_fp_kcard_footer">
<span class="text-muted small" t-if="record.oven_id.raw_value">
<i class="fa fa-fire me-1"/><field name="oven_id"/>
</span>
<span t-att-class="'o_fp_kcard_chip ' + (
record.state.raw_value === 'baked' ? 'tone-success'
: record.state.raw_value === 'bake_in_progress' ? 'tone-info'
: record.state.raw_value === 'awaiting_bake' ? 'tone-warning'
: record.state.raw_value === 'missed_window' ? 'tone-danger'
: 'tone-muted')">
<field name="state"/>
</span>
</div>
</div>
</t>

View File

@@ -76,29 +76,68 @@
</field>
</record>
<!--
Kanban rebuilt 2026-04 to match the Plant Overview card design.
Shared base styles in fp_kanbans.scss (.o_fp_kcard); the
wrapping .o_fp_fpg_kanban scopes per-result stripe colours.
-->
<record id="view_fp_first_piece_gate_kanban" model="ir.ui.view">
<field name="name">fp.first.piece.gate.kanban</field>
<field name="model">fusion.plating.first.piece.gate</field>
<field name="arch" type="xml">
<kanban default_group_by="result">
<kanban default_group_by="result" class="o_fp_fpg_kanban">
<field name="id"/>
<field name="name"/>
<field name="part_ref"/>
<field name="customer_ref"/>
<field name="bath_id"/>
<field name="first_piece_produced"/>
<field name="inspector_id"/>
<field name="result"/>
<field name="rest_of_lot_released"/>
<field name="status_color"/>
<templates>
<t t-name="card">
<div class="o_fp_card">
<div class="d-flex align-items-start justify-content-between">
<div>
<strong class="o_fp_card_title"><field name="name"/></strong>
<div class="small text-muted"><field name="part_ref"/></div>
</div>
<div class="o_fp_kcard"
t-att-data-result="record.result.raw_value">
<div class="o_fp_kcard_title">
<field name="name"/>
</div>
<div class="mt-2 small text-muted">
<field name="customer_ref"/>
<div class="o_fp_kcard_sub" t-if="record.part_ref.raw_value">
<field name="part_ref"/>
</div>
<div class="o_fp_kcard_meta">
<span t-if="record.bath_id.raw_value">
<i class="fa fa-flask me-1"/><field name="bath_id"/>
</span>
<span class="o_fp_kcard_meta_sep"
t-if="record.bath_id.raw_value and record.customer_ref.raw_value">·</span>
<span t-if="record.customer_ref.raw_value">
<field name="customer_ref"/>
</span>
</div>
<div class="o_fp_kcard_meta"
t-if="record.inspector_id.raw_value or record.first_piece_produced.raw_value">
<span t-if="record.inspector_id.raw_value">
<i class="fa fa-user me-1"/><field name="inspector_id"/>
</span>
<span class="o_fp_kcard_meta_sep"
t-if="record.inspector_id.raw_value and record.first_piece_produced.raw_value">·</span>
<span t-if="record.first_piece_produced.raw_value">
<field name="first_piece_produced"/>
</span>
</div>
<div class="o_fp_kcard_footer">
<span t-att-class="'o_fp_kcard_chip ' + (
record.result.raw_value === 'pass' ? 'tone-success'
: record.result.raw_value === 'fail' ? 'tone-danger'
: record.result.raw_value === 'pending' ? 'tone-warning'
: 'tone-muted')">
<field name="result"/>
</span>
<span class="o_fp_fpg_released"
t-if="record.rest_of_lot_released.raw_value">
<i class="fa fa-check"/> Released
</span>
</div>
</div>
</t>