feat: add x_fc_authorizer_number, x_fc_account_number, x_marked_for fields; auto-link authorizer from XML

- fusion_claims: added x_fc_authorizer_number to res.partner for ADP authorizer registration numbers
- fusion_claims: XML parser auto-links authorizer contact to sale order by ADP number
- fusion_claims: removed size=9 constraint from x_fc_odsp_member_id
- fusion_claims: authorizer number shown on OT/PT contact form
- fusion_so_to_po: added x_marked_for (Many2one) field definition on purchase.order
- fusion_so_to_po: added x_fc_account_number on res.partner for vendor account numbers
This commit is contained in:
2026-03-11 17:22:02 +00:00
parent 431052920e
commit f3766c2898
18 changed files with 733 additions and 2 deletions

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Sale Order form: add "Create PO" button and purchase count stat -->
<record id="fusion_sale_order_form_inherit" model="ir.ui.view">
<field name="name">fusion.sale.order.form.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//form//header//button[@name='action_quotation_send']" position="after">
<button name="%(fusion_purchase_order_wizard_action)d" class="btn-primary" type="action" string="Create PO"/>
</xpath>
<xpath expr="//button[@name='action_view_invoice']" position="before">
<button type="object" name="action_view_fusion_purchases" class="oe_stat_button" invisible="fusion_purchase_count == 0" icon="fa-file">
<field name="fusion_purchase_count" widget="statinfo" string="Purchase"/>
</button>
</xpath>
</field>
</record>
<!-- Purchase Order form: add linked SOs, marked for, match button, stat -->
<record id="fusion_purchase_order_form_inherit" model="ir.ui.view">
<field name="name">fusion.purchase.order.form.inherit</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<!-- Match SO button in header -->
<xpath expr="//header" position="inside">
<button name="action_fusion_match_sale_order" type="object" string="Match Sale Order"
class="btn-secondary"
confirm="This will try to match this PO to a Sale Order based on the 'Marked For' field. Continue?"/>
</xpath>
<!-- Stat button for linked Sale Orders -->
<xpath expr="//div[@name='button_box']" position="inside">
<button type="object" name="action_view_fusion_sale_order" class="oe_stat_button"
invisible="fusion_sale_count == 0" icon="fa-shopping-cart">
<field name="fusion_sale_count" widget="statinfo" string="Sale Orders"/>
</button>
</xpath>
<!-- Marked For (contacts) below Vendor Reference -->
<xpath expr="//field[@name='partner_ref']" position="after">
<field name="fusion_marked_for_ids" widget="many2many_tags" string="Marked For"
placeholder="Select customers..." options="{'no_create': False, 'no_quick_create': False}"/>
</xpath>
<!-- Sale Orders (many2many) before order date -->
<xpath expr="//field[@name='date_order']" position="before">
<field name="fusion_sale_ids" widget="many2many_tags" string="Sale Orders"
placeholder="Link sale orders..." options="{'no_create': True}"/>
</xpath>
</field>
</record>
</data>
</odoo>