Files
Odoo-Modules/fusion_repairs/views/res_config_settings_views.xml
gsinghpal 429084e0bf feat(fusion_repairs): Phase 1 MVP - backend intake wizard + core models
Scaffolds the fusion_repairs module that extends Odoo 19 repair.order with
a guided medical-equipment intake workflow.

Models
- fusion.repair.product.category (8 medical equipment categories seeded)
- fusion.repair.intake.template / .question / .answer (7 templates,
  32 questions seeded across hospital bed, stairlift, porch lift,
  wheelchair, walker/rollator, mattress)
- fusion.repair.intake.service (AbstractModel) - single entry point used
  by backend wizard, sales rep portal, and public client portal so all
  three surfaces produce identical outcomes
- repair.order extensions (x_fc_intake_*, x_fc_third_party_equipment,
  x_fc_photo_ids, x_fc_urgency, x_fc_estimated/actual_cost, AI summary)
- fusion.technician.task back-link (x_fc_repair_order_id)
- res.partner service preferences (preferred tech, time window, access notes)
- res.users repair extensions (skills, cost rate, on-call rotation fields)
- res.config.settings for variance thresholds, portal URL, rate limit

UI
- Backend intake wizard with multi-equipment loop, third-party flag, photos
- repair.order form: Intake tab, Photos, Pricing tab, AI tab, smart buttons
  (technician tasks, intake answers, original SO)
- Kanban + list view urgency badges
- Fusion Repairs app menu (New Service Call, Repair Orders, Config)

Activities & Email
- 4 follow-up activity types (CS callback, tech dispatch, visit follow-up,
  manager review) with urgency-tiered deadlines
- 2 mail templates (client confirmation + office notification) with the
  same dark/light-safe styling as fusion_claims ADP templates

Security
- New res.groups.privilege + 3 groups (User, Dispatcher, Manager)
- Reuses fusion_tasks.group_field_technician (do NOT recreate)
- Reuses fusion_authorizer_portal.group_sales_rep_portal
- Multi-company global rule + technician scoping rule on repair.order

Verified end-to-end on local westin-v19 dev DB via odoo-shell - creates
multiple repairs in one session, auto-creates dispatch task for urgent,
attaches 4 activity types correctly per urgency tier and third-party flag.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 21:35:52 -04:00

63 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_inherit_fusion_repairs" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.fusion_repairs</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app data-string="Fusion Repairs"
string="Fusion Repairs"
name="fusion_repairs"
groups="fusion_repairs.group_fusion_repairs_manager">
<block title="Notifications" name="fc_repairs_notifications">
<setting id="fc_repairs_enable_email_notifications"
string="Enable Email Notifications"
help="Master toggle for all automated repair-related emails (intake confirmations, dispatch alerts, office digests).">
<field name="fc_repairs_enable_email_notifications"/>
</setting>
</block>
<block title="Intake Behaviour" name="fc_repairs_intake">
<setting id="fc_repairs_duplicate_call_window_days"
string="Duplicate Call Window (days)"
help="When an intake matches an open repair from this many days back on the same phone, the wizard offers 'add note instead'.">
<field name="fc_repairs_duplicate_call_window_days"/>
</setting>
<setting id="fc_repairs_outstanding_balance_threshold"
string="Outstanding Balance Warning ($)"
help="Show a warning if the client's open invoice total exceeds this amount.">
<field name="fc_repairs_outstanding_balance_threshold"/>
</setting>
</block>
<block title="Pricing Variance" name="fc_repairs_pricing">
<setting id="fc_repairs_variance_threshold_pct"
string="Variance Threshold (%)"
help="If the actual repair cost exceeds the estimate by more than this percentage, invoicing is blocked until manager review.">
<field name="fc_repairs_variance_threshold_pct"/>
</setting>
<setting id="fc_repairs_variance_threshold_amount"
string="Variance Threshold ($)"
help="Absolute variance amount that also triggers re-quote (whichever hits first).">
<field name="fc_repairs_variance_threshold_amount"/>
</setting>
</block>
<block title="Public Client Portal" name="fc_repairs_client_portal">
<setting id="fc_repairs_client_portal_url"
string="Portal URL Path"
help="URL path mentioned in voicemail greetings and printed on QR stickers. Phase 1 ships the form at this path.">
<field name="fc_repairs_client_portal_url"/>
</setting>
<setting id="fc_repairs_client_portal_rate_limit_per_hour"
string="Rate Limit (per hour per IP)"
help="Anti-spam limit for the public form.">
<field name="fc_repairs_client_portal_rate_limit_per_hour"/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</odoo>