feat(fusion_plating): quote-to-cash infra, notifications, wizards, Tier 1 plating features
Quote-to-cash PDF reports (portrait + landscape variants, 16 new actions): - Quotation / Sales Order, Work Order Traveller, Packing Slip, Bill of Lading, Certificate of Conformance (portrait added), Invoice, Payment Receipt - Shared fp_portrait_styles + fp_landscape_styles base templates Workflow gap fixes (fusion_plating_bridge_mrp): - Auto-assign recipe from SO coating config in MrpProduction.action_confirm - Auto-create draft CoC (fp.certificate) on MrpProduction.button_mark_done Notifications overhaul (fusion_plating_notifications v2.0): - Expanded TRIGGER_EVENTS to 7 (added quote_sent, mo_complete, shipped, payment_received) - Shared _dispatch method replaces three duplicated send helpers - Auto-attach PDF reports per template config (quote, SO, CoC, invoice, receipt, BoL) - Rebuilt 7 email templates with fusion_claims accent-bar design (info/success color-coded, theme-safe, 600px max-width) - New hooks: MrpProduction done, FpDelivery mark_delivered, AccountPayment post, SaleOrder action_quotation_send Wizards (fusion_plating_configurator): - fp.direct.order.wizard — skip quotation for repeat customers with PO in hand; optional new-revision drawing upload bumps fp.part.catalog revision and links new rev to the SO; creates + confirms the SO in one step - fp.part.catalog.import.wizard — 3-step CSV import with dry-run preview, tolerant parsing (customer by name/email/xmlid, human-readable selections), duplicate detection, create-missing-customers option, single transaction commit - Partner form stat buttons: Direct Order, Import Parts - CSV template download button Tier 1 practical plating features: - T1.1 Hydrogen bake window enforcement (fp.coating.config.requires_bake_relief, auto-create fusion.plating.bake.window on plating WO finish, FpDelivery lockout when window is open) - T1.2 Bath replenishment rules + pending suggestion queue (fusion.plating.bath.replenishment.rule + .suggestion, hook on bath log line create, operator Apply / Dismiss actions) - T1.3 Rack/fixture library (fusion.plating.rack with MTO counter, strip schedule, lifecycle: active → needs_strip → stripping → retired) - T1.4 Rework / strip-and-replate MOs (x_fc_is_rework, x_fc_original_production_id, Create Rework stat button on completed MOs) - T1.5 Parts location (x_fc_current_location computed on mrp.production — "In progress: Alkaline Clean" / "Queued: Bake Oven" / "Ready to Ship") Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ===== Rule List ===== -->
|
||||
<record id="view_fp_replenishment_rule_list" model="ir.ui.view">
|
||||
<field name="name">fp.replenishment.rule.list</field>
|
||||
<field name="model">fusion.plating.bath.replenishment.rule</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="process_type_id"/>
|
||||
<field name="bath_id"/>
|
||||
<field name="parameter_id"/>
|
||||
<field name="trigger"/>
|
||||
<field name="product_name"/>
|
||||
<field name="dose_rate"/>
|
||||
<field name="dose_uom"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===== Rule Form ===== -->
|
||||
<record id="view_fp_replenishment_rule_form" model="ir.ui.view">
|
||||
<field name="name">fp.replenishment.rule.form</field>
|
||||
<field name="model">fusion.plating.bath.replenishment.rule</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Scope">
|
||||
<field name="process_type_id"/>
|
||||
<field name="bath_id"/>
|
||||
<field name="parameter_id"/>
|
||||
<field name="trigger"/>
|
||||
</group>
|
||||
<group string="Dose">
|
||||
<field name="product_name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="dose_rate"/>
|
||||
<field name="dose_uom"/>
|
||||
<field name="min_dose"/>
|
||||
<field name="max_dose"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
<field name="notes" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_replenishment_rule" model="ir.actions.act_window">
|
||||
<field name="name">Replenishment Rules</field>
|
||||
<field name="res_model">fusion.plating.bath.replenishment.rule</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<!-- ===== Suggestion List ===== -->
|
||||
<record id="view_fp_replenishment_suggestion_list" model="ir.ui.view">
|
||||
<field name="name">fp.replenishment.suggestion.list</field>
|
||||
<field name="model">fusion.plating.bath.replenishment.suggestion</field>
|
||||
<field name="arch" type="xml">
|
||||
<list decoration-info="state == 'pending'"
|
||||
decoration-muted="state in ('applied','dismissed')"
|
||||
default_order="create_date desc">
|
||||
<field name="create_date" optional="show"/>
|
||||
<field name="bath_id"/>
|
||||
<field name="parameter_id"/>
|
||||
<field name="current_value"/>
|
||||
<field name="target_min"/>
|
||||
<field name="target_max"/>
|
||||
<field name="product_name"/>
|
||||
<field name="dose_amount"/>
|
||||
<field name="dose_uom"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'pending'"
|
||||
decoration-success="state == 'applied'"
|
||||
decoration-muted="state == 'dismissed'"/>
|
||||
<button name="action_apply" type="object"
|
||||
string="Apply" class="btn-primary"
|
||||
invisible="state != 'pending'" icon="fa-check"/>
|
||||
<button name="action_dismiss" type="object"
|
||||
string="Dismiss"
|
||||
invisible="state != 'pending'" icon="fa-times"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===== Suggestion Form ===== -->
|
||||
<record id="view_fp_replenishment_suggestion_form" model="ir.ui.view">
|
||||
<field name="name">fp.replenishment.suggestion.form</field>
|
||||
<field name="model">fusion.plating.bath.replenishment.suggestion</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="action_apply" string="Apply"
|
||||
type="object" class="btn-primary"
|
||||
invisible="state != 'pending'"/>
|
||||
<button name="action_dismiss" string="Dismiss"
|
||||
type="object" class="btn-secondary"
|
||||
invisible="state != 'pending'"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="pending,applied"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group string="Context">
|
||||
<field name="bath_id"/>
|
||||
<field name="parameter_id"/>
|
||||
<field name="log_line_id"/>
|
||||
<field name="rule_id"/>
|
||||
</group>
|
||||
<group string="Reading vs Target">
|
||||
<field name="current_value"/>
|
||||
<field name="target_min"/>
|
||||
<field name="target_max"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Suggested Dose">
|
||||
<group>
|
||||
<field name="product_name"/>
|
||||
<field name="dose_amount"/>
|
||||
<field name="dose_uom"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="applied_at"/>
|
||||
<field name="applied_by_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_replenishment_suggestion" model="ir.actions.act_window">
|
||||
<field name="name">Replenishment Suggestions</field>
|
||||
<field name="res_model">fusion.plating.bath.replenishment.suggestion</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'search_default_pending': 1}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -43,6 +43,24 @@
|
||||
action="action_fp_tank"
|
||||
sequence="30"/>
|
||||
|
||||
<menuitem id="menu_fp_racks"
|
||||
name="Racks & Fixtures"
|
||||
parent="menu_fp_operations"
|
||||
action="action_fp_rack"
|
||||
sequence="35"/>
|
||||
|
||||
<menuitem id="menu_fp_replenishment_suggestions"
|
||||
name="Replenishment Suggestions"
|
||||
parent="menu_fp_operations"
|
||||
action="action_fp_replenishment_suggestion"
|
||||
sequence="40"/>
|
||||
|
||||
<menuitem id="menu_fp_replenishment_rules"
|
||||
name="Replenishment Rules"
|
||||
parent="menu_fp_config"
|
||||
action="action_fp_replenishment_rule"
|
||||
sequence="55"/>
|
||||
|
||||
<!-- ===== CONFIGURATION ===== -->
|
||||
<menuitem id="menu_fp_config"
|
||||
name="Configuration"
|
||||
|
||||
132
fusion_plating/fusion_plating/views/fp_rack_views.xml
Normal file
132
fusion_plating/fusion_plating/views/fp_rack_views.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?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 string="Notes">
|
||||
<field name="notes" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
</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>
|
||||
Reference in New Issue
Block a user