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>
70 lines
3.6 KiB
XML
70 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_repair_intake_wizard_form" model="ir.ui.view">
|
|
<field name="name">fusion.repair.intake.wizard.form</field>
|
|
<field name="model">fusion.repair.intake.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="New Service Call">
|
|
<sheet>
|
|
<group>
|
|
<group string="Caller / Client">
|
|
<field name="intake_user_id" options="{'no_create': True}"/>
|
|
<field name="partner_id"
|
|
options="{'no_create_edit': False, 'no_quick_create': False}"/>
|
|
<field name="partner_phone" readonly="1" invisible="not partner_id"/>
|
|
</group>
|
|
</group>
|
|
|
|
<separator string="Equipment Items (one repair per item)"/>
|
|
<field name="equipment_ids">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="repair_category_id" options="{'no_create': True}"/>
|
|
<field name="product_id" optional="show"/>
|
|
<field name="lot_id" optional="hide"/>
|
|
<field name="third_party" optional="show"/>
|
|
<field name="urgency" widget="badge"
|
|
decoration-success="urgency == 'normal'"
|
|
decoration-warning="urgency == 'urgent'"
|
|
decoration-danger="urgency == 'safety'"/>
|
|
<field name="issue_summary"/>
|
|
<field name="scheduled_date" optional="hide"/>
|
|
</list>
|
|
<form>
|
|
<group>
|
|
<group>
|
|
<field name="repair_category_id" options="{'no_create': True}"/>
|
|
<field name="product_id"/>
|
|
<field name="lot_id"/>
|
|
<field name="third_party"/>
|
|
</group>
|
|
<group>
|
|
<field name="urgency"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="intake_template_id" options="{'no_create': True}"/>
|
|
</group>
|
|
</group>
|
|
<field name="issue_summary"
|
|
placeholder="One-line summary (e.g. 'stairlift stops halfway up')"/>
|
|
<field name="issue_category"
|
|
placeholder="Symptom tag (e.g. battery, motor, remote)"/>
|
|
<field name="internal_notes" placeholder="Internal notes"/>
|
|
<separator string="Photos / Videos"/>
|
|
<field name="photo_ids" widget="many2many_binary"/>
|
|
</form>
|
|
</field>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Submit"
|
|
name="action_submit"
|
|
type="object"
|
|
class="btn-primary"/>
|
|
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|