feat(promote-customer-spec): Phase B — two-picker SO line UX
Spec-side picker (x_fc_customer_spec_id / customer_spec_id) added on: - sale.order.line (via quality inherit — onchange autofill, create() fallback to part default, _prepare_invoice_line carry) - account.move.line (via quality inherit — invoice rendering) - fp.part.catalog (via quality inherit — x_fc_default_customer_spec_id) - fp.direct.order.line (via quality inherit — wizard picker + autofill) - fp.direct.order.wizard (action_create_order post-creates spec on SO line) Thickness picker switched to fp.recipe.thickness (replaces coating-scoped): - sale.order.line.x_fc_thickness_id comodel + domain rewired to recipe - account.move.line + fp.delivery same - fp.direct.order.line.thickness_id same View inherits in quality add Specification picker next to legacy Primary Treatment column on: - SO form line tree - part catalog Default Treatments block - direct-order wizard line tree + drawer Wizard files (fp.contract.review.client.email.wizard) pulled from entech into the repo — they were ahead of the repo. Quality __init__ now imports wizards/. Legacy x_fc_coating_config_id + treatment_ids remain visible during transition; Phase E removes them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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.
|
||||
|
||||
Adds the Specification picker to the direct-order wizard line.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_direct_order_wizard_form_spec_inherit"
|
||||
model="ir.ui.view">
|
||||
<field name="name">fp.direct.order.wizard.form.spec.inherit</field>
|
||||
<field name="model">fp.direct.order.wizard</field>
|
||||
<field name="inherit_id"
|
||||
ref="fusion_plating_configurator.view_fp_direct_order_wizard_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Wizard line list (main editable rows) -->
|
||||
<xpath expr="//field[@name='line_ids']/list/field[@name='coating_config_id']"
|
||||
position="after">
|
||||
<field name="customer_spec_id"
|
||||
string="Specification"
|
||||
options="{'no_quick_create': True}"
|
||||
optional="show"/>
|
||||
</xpath>
|
||||
<!-- Wizard line drawer / form view (the "expand line" panel) -->
|
||||
<xpath expr="//field[@name='line_ids']/form//field[@name='coating_config_id']"
|
||||
position="after">
|
||||
<field name="customer_spec_id"
|
||||
string="Specification"
|
||||
options="{'no_quick_create': True}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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.
|
||||
|
||||
Adds the "Default Specification" picker to the part catalog form
|
||||
next to "Default Treatment". Phase E removes the legacy field
|
||||
entirely.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_part_catalog_form_spec_inherit" model="ir.ui.view">
|
||||
<field name="name">fp.part.catalog.form.spec.inherit</field>
|
||||
<field name="model">fp.part.catalog</field>
|
||||
<field name="inherit_id"
|
||||
ref="fusion_plating_configurator.view_fp_part_catalog_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='x_fc_default_coating_config_id']"
|
||||
position="after">
|
||||
<field name="x_fc_default_customer_spec_id"
|
||||
string="Default Specification"
|
||||
options="{'no_create_edit': True}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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.
|
||||
|
||||
Adds the Specification picker to the SO line tree (the configurator's
|
||||
main editable line list inside the SO form). The Spec field lives on
|
||||
sale.order.line as an _inherit added in this module, so the view
|
||||
that surfaces it must also live here.
|
||||
|
||||
During Phases B-D the Spec picker sits ALONGSIDE the legacy
|
||||
Primary Treatment picker (both visible). Phase E removes the legacy
|
||||
field entirely.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- Configurator's view_sale_order_form_fp inherits sale.view_order_form
|
||||
and adds Plating fields to the order_line tree. We inherit THAT
|
||||
view to add Specification right after Primary Treatment. -->
|
||||
<record id="view_sale_order_form_quality_inherit" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.quality.spec.inherit</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id"
|
||||
ref="fusion_plating_configurator.view_sale_order_form_fp"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Editable order_line tree (estimator's main grid) -->
|
||||
<xpath expr="//field[@name='order_line']/list/field[@name='x_fc_coating_config_id']"
|
||||
position="after">
|
||||
<field name="x_fc_customer_spec_id"
|
||||
string="Specification"
|
||||
options="{'no_quick_create': True}"
|
||||
optional="show"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- The SO list's coating column is on sale.order itself (header
|
||||
field). Adding a parallel spec column on the order header is
|
||||
a Phase B+ enhancement — for now, the line tree (above) is
|
||||
sufficient for the operator. -->
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user