Files
Odoo-Modules/fusion_plating/fusion_plating/views/fp_tank_views.xml
gsinghpal b85642816f feat(configurator): menu reorder, currency/unit display polish, line description templates
Three UX improvements:

1. Sales menu reordered — New Quote (seq 1) is now the first entry,
   followed by New Direct Order (5), Quotations (10), Sale Orders (20).
   "New Quote" moved out of Configurator submenu into Sales so both
   quote-creation paths live side-by-side.

2. Currency + unit display audit:
   - fp.customer.price.list.unit_price flipped from Float to Monetary
     with currency_field='currency_id' — list view now shows $ symbol
     and a Total sum row
   - fp.direct.order.wizard.unit_price flipped to Monetary, added
     currency_id field and computed line_subtotal ($)
   - % suffix appended to deposit_percent and progress_initial_percent
     in the wizard
   - Unit suffixes added where missing: bake_window.quantity (pcs),
     window_hours (h), bake_temp (°F), bake_duration_hours (h);
     bath.volume (L), bath.mto_count (turnovers); tank.volume shows
     volume_uom inline

3. Saved line descriptions (new feature):
   - New model fp.sale.description.template with name, description,
     tag (standard/masking/rework/aerospace/nuclear/packaging/other),
     optional coating_config_id and partner_id, usage_count bumped
     on each use
   - List + form + search views; new "Line Descriptions" menu under
     Configurator
   - 8 starter templates seeded (noupdate=1): ENP Standard/Aerospace/
     Nuclear, masking variants, rework, packaging, delicate handling
   - Direct Order Wizard gets a template picker (searchable Many2one)
     + editable paragraph; picking a template copies text to the
     editable field, user tweaks freely, tweaked text lands on the
     SO line as "<header>\n\n<description>"
   - Auto-suggests template on coating+partner match if nothing
     picked yet

Smoke-tested end-to-end: picked aerospace template, tweaked text,
confirmed wizard → SO S00030 has full description on line, usage
counter bumped from 0 to 1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 18:43:58 -04:00

172 lines
8.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_tank_list" model="ir.ui.view">
<field name="name">fp.tank.list</field>
<field name="model">fusion.plating.tank</field>
<field name="arch" type="xml">
<list string="Tanks">
<field name="facility_id"/>
<field name="work_center_id"/>
<field name="code"/>
<field name="name"/>
<field name="current_process_id"/>
<field name="state" widget="badge"
decoration-success="state == 'in_use'"
decoration-info="state == 'filled'"
decoration-warning="state in ('draining', 'maintenance')"
decoration-muted="state in ('empty', 'out_of_service')"/>
<field name="material" optional="hide"/>
<field name="volume" optional="show"/>
<field name="volume_uom" optional="show"/>
<field name="active" widget="boolean_toggle" optional="hide"/>
</list>
</field>
</record>
<record id="view_fp_tank_form" model="ir.ui.view">
<field name="name">fp.tank.form</field>
<field name="model">fusion.plating.tank</field>
<field name="arch" type="xml">
<form string="Tank">
<header>
<field name="state" widget="statusbar"
statusbar_visible="empty,filled,in_use,draining,maintenance"/>
</header>
<sheet>
<widget name="web_ribbon" title="Out of Service" bg_color="text-bg-danger"
invisible="state != 'out_of_service'"/>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" placeholder="e.g. EN Plating Tank A1"/></h1>
<div class="text-muted">
<field name="code" placeholder="T-01"/>
</div>
</div>
<group>
<group string="Location">
<field name="facility_id"/>
<field name="work_center_id"/>
<field name="sequence"/>
</group>
<group string="Current Bath">
<field name="current_bath_id" readonly="1"/>
<field name="current_process_id" readonly="1"/>
<field name="qr_code"/>
</group>
</group>
<notebook>
<page string="Physical">
<group>
<group>
<label for="volume"/>
<div class="o_row">
<field name="volume" nolabel="1" class="oe_inline"/>
<field name="volume_uom" nolabel="1" class="oe_inline"/>
</div>
<field name="material"/>
</group>
<group>
<field name="heating_type"/>
<field name="has_filtration"/>
<field name="has_rectifier"/>
</group>
</group>
</page>
<page string="Bath History">
<field name="bath_ids">
<list decoration-muted="state == 'dumped'">
<field name="name"/>
<field name="process_type_id"/>
<field name="state"/>
<field name="makeup_date"/>
<field name="mto_count"/>
<field name="last_log_date"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_tank_kanban" model="ir.ui.view">
<field name="name">fp.tank.kanban</field>
<field name="model">fusion.plating.tank</field>
<field name="arch" type="xml">
<kanban class="o_fp_tank_kanban">
<field name="id"/>
<field name="code"/>
<field name="name"/>
<field name="state"/>
<field name="current_bath_id"/>
<field name="current_process_id"/>
<field name="facility_id"/>
<field name="work_center_id"/>
<templates>
<t t-name="card">
<div class="o_fp_card o_fp_tank_card" t-att-data-state="record.state.raw_value">
<div class="d-flex align-items-start justify-content-between">
<div>
<strong class="o_fp_card_title"><field name="code"/></strong>
<div class="small text-muted"><field name="name"/></div>
</div>
<span class="badge o_fp_badge" t-att-data-state="record.state.raw_value">
<field name="state"/>
</span>
</div>
<div class="mt-2 small">
<div><i class="fa fa-flask me-1 text-muted"/><field name="current_process_id"/></div>
<div class="text-muted"><field name="work_center_id"/></div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_fp_tank_search" model="ir.ui.view">
<field name="name">fp.tank.search</field>
<field name="model">fusion.plating.tank</field>
<field name="arch" type="xml">
<search string="Tanks">
<field name="name"/>
<field name="code"/>
<field name="qr_code"/>
<field name="facility_id"/>
<field name="work_center_id"/>
<field name="current_process_id"/>
<separator/>
<filter string="In Use" name="in_use" domain="[('state','=','in_use')]"/>
<filter string="Filled" name="filled" domain="[('state','=','filled')]"/>
<filter string="Maintenance" name="maintenance" domain="[('state','=','maintenance')]"/>
<filter string="Out of Service" name="out" domain="[('state','=','out_of_service')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Facility" name="group_facility" context="{'group_by':'facility_id'}"/>
<filter string="Work Center" name="group_wc" context="{'group_by':'work_center_id'}"/>
<filter string="Process" name="group_process" context="{'group_by':'current_process_id'}"/>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_tank" model="ir.actions.act_window">
<field name="name">Tanks</field>
<field name="res_model">fusion.plating.tank</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_fp_tank_search"/>
</record>
</odoo>