feat(fusion_portal): assessment-visit redesign - live on westin 19.0.2.9.0
Bundles multiple assessments per home visit; on completion groups them by funding workflow (x_fc_sale_type) into one draft sale order per workflow (March of Dimes / ADP / ODSP / WSIB / private / hardship / insurance). Adds the mobility scooter ADP device type, the power-mobility home-access rule, ADP multi-device combination guard, and the portal visit workspace. Verified on a westin-v19 clone (clean registry load + funding-grouping smoke test) then deployed to westin prod (fusion_portal 19.0.2.9.0). Prod's pre-existing orphaned tax links were preserved (Odoo skips existing FKs), pending a later audit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
108
fusion_portal/views/visit_views.xml
Normal file
108
fusion_portal/views/visit_views.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Form -->
|
||||
<record id="view_fusion_assessment_visit_form" model="ir.ui.view">
|
||||
<field name="name">fusion.assessment.visit.form</field>
|
||||
<field name="model">fusion.assessment.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="action_complete_visit" type="object"
|
||||
string="Complete Visit & Create Sale Orders"
|
||||
class="btn-primary" invisible="state == 'done'"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="measuring,client_pending,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" readonly="1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Client">
|
||||
<field name="partner_id"/>
|
||||
<field name="client_name"/>
|
||||
<field name="client_phone"/>
|
||||
<field name="client_email"/>
|
||||
</group>
|
||||
<group string="Visit">
|
||||
<field name="visit_date"/>
|
||||
<field name="sales_rep_id"/>
|
||||
<field name="authorizer_id"/>
|
||||
<field name="has_mod_items" invisible="1"/>
|
||||
<field name="x_fc_income_under_mod_threshold"
|
||||
invisible="not has_mod_items"/>
|
||||
</group>
|
||||
</group>
|
||||
<div class="alert alert-info" role="alert" invisible="not has_mod_items">
|
||||
<strong>March of Dimes:</strong> covers up to $15,000 per person
|
||||
(lifetime), income-gated. Confirm the client's income status above.
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="Accessibility Assessments">
|
||||
<field name="accessibility_assessment_ids" readonly="1">
|
||||
<list>
|
||||
<field name="reference"/>
|
||||
<field name="assessment_type"/>
|
||||
<field name="x_fc_funding_source"/>
|
||||
<field name="state"/>
|
||||
<field name="sale_order_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="ADP Assessments">
|
||||
<field name="adp_assessment_ids" readonly="1">
|
||||
<list>
|
||||
<field name="equipment_type"/>
|
||||
<field name="state"/>
|
||||
<field name="sale_order_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Sale Orders">
|
||||
<field name="sale_order_ids" readonly="1">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="x_fc_sale_type"/>
|
||||
<field name="state"/>
|
||||
<field name="amount_total"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- List -->
|
||||
<record id="view_fusion_assessment_visit_list" model="ir.ui.view">
|
||||
<field name="name">fusion.assessment.visit.list</field>
|
||||
<field name="model">fusion.assessment.visit</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="visit_date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="client_name"/>
|
||||
<field name="sales_rep_id"/>
|
||||
<field name="assessment_count"/>
|
||||
<field name="sale_order_count"/>
|
||||
<field name="state"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action + menu -->
|
||||
<record id="action_fusion_assessment_visit" model="ir.actions.act_window">
|
||||
<field name="name">Assessment Visits</field>
|
||||
<field name="res_model">fusion.assessment.visit</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fusion_assessment_visit"
|
||||
name="Assessment Visits"
|
||||
parent="sale.sale_menu_root"
|
||||
action="action_fusion_assessment_visit"
|
||||
sequence="50"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user