Adds two Integer fields to res.partner: - x_fc_default_lead_time_min_days - x_fc_default_lead_time_max_days Set once on the customer's Plating Defaults tab (Fulfilment group); auto-copies onto every new Express Order via the existing _onchange_partner_id hook. Operator can still override per-order since the onchange only fills when the wizard field is still blank. Field declaration lives in fusion_plating_configurator (alongside the rest of the partner cascade reads). View edit lives in fusion_plating_invoicing where the Plating Defaults tab already hosts the other partner-level defaults (invoice strategy, deposit %, delivery method, deadline-days). Invoicing depends on configurator, so the fields are registered before the view loads. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
89 lines
4.5 KiB
XML
89 lines
4.5 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_partner_form_account_hold" model="ir.ui.view">
|
|
<field name="name">res.partner.form.fp.account.hold</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//sheet" position="before">
|
|
<div class="alert alert-danger mb-0" role="alert"
|
|
invisible="not x_fc_account_hold">
|
|
<strong>Account Hold Active</strong> —
|
|
<field name="x_fc_account_hold_reason" readonly="1" nolabel="1"/>
|
|
<br/>
|
|
<small>
|
|
Placed by <field name="x_fc_account_hold_by_id" readonly="1" nolabel="1"/>
|
|
on <field name="x_fc_account_hold_date" readonly="1" nolabel="1"/>
|
|
</small>
|
|
</div>
|
|
</xpath>
|
|
|
|
<!-- Single "Plating Defaults" tab — invoice strategy, delivery,
|
|
deadlines, tax type, payment terms. Set once here, cascades
|
|
onto every new SO for this customer. -->
|
|
<xpath expr="//notebook" position="inside">
|
|
<page string="Plating Defaults" name="fp_plating_defaults_tab"
|
|
invisible="is_company == False and parent_id"
|
|
groups="fusion_plating_invoicing.group_fp_accounting">
|
|
<p class="text-muted">
|
|
Set defaults once per customer to speed up order entry.
|
|
These cascade onto every new sale order; the estimator
|
|
can override per order.
|
|
</p>
|
|
<group>
|
|
<group string="Invoicing">
|
|
<field name="x_fc_default_invoice_strategy"/>
|
|
<field name="x_fc_default_deposit_percent"
|
|
invisible="x_fc_default_invoice_strategy != 'deposit'"/>
|
|
<field name="property_payment_term_id"/>
|
|
<field name="property_account_position_id"
|
|
string="Tax Type (Fiscal Position)"/>
|
|
</group>
|
|
<group string="Fulfilment">
|
|
<field name="x_fc_default_delivery_method"/>
|
|
<field name="x_fc_default_internal_deadline_days"/>
|
|
<field name="x_fc_default_customer_deadline_days"/>
|
|
<field name="x_fc_default_lead_time_min_days"
|
|
string="Lead Time Min (days)"/>
|
|
<field name="x_fc_default_lead_time_max_days"
|
|
string="Lead Time Max (days)"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
|
|
<!-- Phase D5 — Account Hold management (the override gate per
|
|
spec section 2.E Layer 3). Was previously gated on the
|
|
fold-in group_fp_accounting; consolidated to group_fp_manager
|
|
and resolves audit-finding-11 _administrator typo by removing
|
|
the old fold-in group from this surface. The Python helper
|
|
_fp_user_can_override_account_hold (still in res_partner.py)
|
|
is the runtime gate; Phase G fixes the Python-side typo
|
|
separately. -->
|
|
<page string="Account Hold" name="account_hold_tab"
|
|
groups="fusion_plating.group_fp_manager">
|
|
<group>
|
|
<group>
|
|
<field name="x_fc_account_hold"/>
|
|
<field name="x_fc_account_hold_reason"
|
|
invisible="not x_fc_account_hold"/>
|
|
</group>
|
|
<group>
|
|
<field name="x_fc_account_hold_date"
|
|
invisible="not x_fc_account_hold"/>
|
|
<field name="x_fc_account_hold_by_id"
|
|
invisible="not x_fc_account_hold"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|