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>
96 lines
4.6 KiB
XML
96 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Intake Template -->
|
|
<record id="view_repair_intake_template_list" model="ir.ui.view">
|
|
<field name="name">fusion.repair.intake.template.list</field>
|
|
<field name="model">fusion.repair.intake.template</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Intake Templates">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="code"/>
|
|
<field name="question_count"/>
|
|
<field name="is_default"/>
|
|
<field name="active" widget="boolean_toggle"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_repair_intake_template_form" model="ir.ui.view">
|
|
<field name="name">fusion.repair.intake.template.form</field>
|
|
<field name="model">fusion.repair.intake.template</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Intake Template">
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name"/>
|
|
<h1>
|
|
<field name="name" placeholder="e.g. Stairlift - Standard Intake"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="code"/>
|
|
<field name="sequence"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
<group>
|
|
<field name="is_default"/>
|
|
<field name="active"/>
|
|
</group>
|
|
</group>
|
|
<field name="product_category_ids" widget="many2many_tags"/>
|
|
<notebook>
|
|
<page string="Questions" name="questions">
|
|
<field name="question_ids">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="code" optional="hide"/>
|
|
<field name="question_type"/>
|
|
<field name="required"/>
|
|
<field name="help_text" optional="hide"/>
|
|
<field name="selection_options" optional="hide"/>
|
|
<field name="symptom_keywords" optional="hide"/>
|
|
</list>
|
|
<form>
|
|
<group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="code"/>
|
|
<field name="question_type"/>
|
|
<field name="required"/>
|
|
</group>
|
|
<group>
|
|
<field name="sequence"/>
|
|
<field name="parent_question_id"/>
|
|
<field name="parent_answer_value"
|
|
invisible="not parent_question_id"/>
|
|
</group>
|
|
</group>
|
|
<field name="help_text" placeholder="Optional hint shown beneath the question"/>
|
|
<field name="selection_options"
|
|
invisible="question_type != 'selection'"
|
|
placeholder="One option per line"/>
|
|
<field name="symptom_keywords" placeholder="e.g. battery,charge,won't turn on"/>
|
|
</form>
|
|
</field>
|
|
</page>
|
|
<page string="Description" name="description">
|
|
<field name="description"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_repair_intake_template" model="ir.actions.act_window">
|
|
<field name="name">Intake Templates</field>
|
|
<field name="res_model">fusion.repair.intake.template</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
</odoo>
|