The grumpy-old-customer-with-broken-stairlift scenario. Four real workflows
the office faces every week, with comms baked in so the client never has to
call back asking for status.
NEW MODELS
- fusion.repair.emergency.charge (rate card)
Per (category, tier) rate with per_tech_multiplier; 5 tiers
(same_day / next_day / after_hours / weekend / holiday). Each category
can have its own rates - bed motors need 2 techs, stairlift is single.
Seeded with realistic Westin rates: stairlift same-day $250, weekend
$450; porch lift same-day $300; bed same-day $175 with 0.6 multiplier
(2-tech jobs frequent); powerchair same-day $200.
- fusion.repair.part.order (procurement-facing record)
One per distinct part the tech needs from the manufacturer. Carries
description + OEM # + manufacturer + quantity + photos + notes.
4-state lifecycle: draft -> ordered -> received -> fitted (or
cancelled). On state transitions:
draft -> ordered: email client "ordered, expected by X"
ordered -> received: email client "arrived, scheduling return visit"
+ auto-create follow-up dispatch task when ALL
outstanding parts on the repair have arrived.
REPAIR.ORDER EXTENSIONS
- Rush fields: x_fc_rush_requested, x_fc_rush_tier,
x_fc_rush_techs_required, x_fc_rush_surcharge (computed via rate card),
x_fc_rush_acknowledged_at + x_fc_rush_acknowledged_by_id (audit trail
proving CS got verbal OK before charging).
- Parts-awaiting fields: x_fc_parts_awaiting + x_fc_parts_eta_date +
x_fc_part_order_ids One2many + x_fc_part_order_count.
- New methods:
* action_acknowledge_rush() - one-click "client agreed" with audit.
* action_squeeze_into_today() - picks the lightest-loaded skilled tech,
finds their first free 1-hour slot between 9am-6pm, schedules the
task in it, sends:
1) live bus.bus push to the tech (sticky notification in their
web client - so they see it MID-SHIFT)
2) rush-alert email (force_send=True - this can't wait in the queue)
3) chatter post on the tech task itself
Validates against fusion_tasks' time-conflict rule by passing
force_schedule via context (intake.service honours it).
* action_view_part_orders() - smart button.
WIZARD EXTENSIONS
- repair.intake.wizard:
New rush_requested + rush_tier + rush_techs_required + rush_acknowledged
controls. Live rush_surcharge_preview compute shows CS the price in
real-time as they change category / tier / tech count. Yellow alert
reminds CS to read the price to the client BEFORE submitting.
- repair.visit.report.wizard:
New outcome radio: completed / parts_needed / rescheduled.
When outcome=parts_needed, needs_parts_line_ids One2many appears for
the tech to capture each part (description, OEM, manufacturer, qty,
lead days, notes, photos). On submit each line creates a
fusion.repair.part.order, the repair flips to x_fc_parts_awaiting=True
with an ETA, and the client gets the "we found the problem, here's the
plan" email immediately.
INTAKE SERVICE
- _create_dispatch_task now honours force_schedule (date + time_start +
time_end) via context so squeeze + auto-redispatch don't crash on
fusion_tasks' time-window validator.
- _create_single_repair carries rush_requested/tier/techs through to
the new repair fields.
MAIL TEMPLATES (4 new)
- email_template_rush_tech_alert: red 4px accent, address + phone + the
$surcharge - what the tech needs to know mid-shift.
- email_template_repair_awaiting_parts: amber accent, "we found the
problem, parts ordered, return visit ~ETA, no action needed".
- email_template_parts_ordered: blue, per-part confirmation.
- email_template_parts_received: green, "arrived, office will call to
confirm visit".
UI / NAVIGATION
- Backend wizard: rush controls + live surcharge preview + verbal-OK alert.
- repair.order form: new Rush / Parts notebook tab with all the fields
+ linked part orders list. Two new header buttons (Squeeze into
Today / Client Agreed to Rush Price). Two new search filters
(Rush, Awaiting Parts).
- Part Order form: statusbar with the 4 transitions + Cancel; notes +
photos notebook tabs; full chatter for audit.
- Menus: 'Parts to Order' under root; 'Emergency Surcharges' under
Configuration.
SECURITY
- 8 new ACL entries (emergency_charge user/manager; part_order
user/dispatcher/manager/technician; visit_report partline for office
and field tech). Office sees parts but only managers can edit
emergency rates.
Verified end-to-end on local westin-v19 - all 4 scenarios green:
S1 Same-day rush stairlift -> $250 surcharge, ack stamped, squeeze
assigned garry@ at first free 1h slot today, alert email queued,
chatter posted.
S2 Next-day priority bed -> $0 surcharge (no rate seeded for bed
next_day - office can configure), 4 emails queued (client + office).
S3 2-tech weekend stairlift -> $675 (450 base + 0.5x base for 2nd tech).
S4 Parts-needed visit-report -> 2 PART-#### records created, repair
awaiting_parts=True, ETA=2026-06-06, office activity scheduled,
client email sent. Marking part ordered -> client mail. Marking
all parts received -> auto-dispatch follow-up + client mail.
Bumped to 19.0.1.9.1.
Co-authored-by: Cursor <cursoragent@cursor.com>
484 lines
36 KiB
XML
484 lines
36 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Fusion Repairs Mail Templates.
|
|
Styling: 4px accent bar, 600px max-width, dark/light safe.
|
|
Mirrors fusion_claims/data/mail_template_data.xml ADP templates for consistency.
|
|
-->
|
|
<odoo>
|
|
<data noupdate="1">
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Repair Intake Received - Client Confirmation -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_intake_received_client" model="mail.template">
|
|
<field name="name">Repair: Intake Received (Client)</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">{{ object.company_id.name }} - Service Call {{ object.name or 'received' }}</field>
|
|
<field name="email_from">{{ (object.user_id.email_formatted or object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#2B6CB0;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#2B6CB0;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">We received your service request</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Hello <t t-out="object.partner_id.name or 'there'"/>, thank you for letting us know about your equipment.
|
|
Your service call reference is <strong><t t-out="object.name"/></strong>.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td colspan="2" style="padding:10px 14px;font-size:12px;font-weight:600;opacity:0.55;text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid rgba(128,128,128,0.25);">Service Call Details</td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Reference</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<t t-if="object.product_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.product_id.display_name"/></td></tr>
|
|
</t>
|
|
<t t-if="object.schedule_date">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Scheduled</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.schedule_date" t-options="{'widget': 'datetime'}"/></td></tr>
|
|
</t>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;">Status</td><td style="padding:10px 14px;font-size:14px;"><t t-out="dict(object._fields['state'].selection).get(object.state)"/></td></tr>
|
|
</table>
|
|
<div style="border-left:3px solid #2B6CB0;padding:12px 16px;margin:0 0 24px 0;">
|
|
<p style="margin:0;font-size:14px;line-height:1.5;">
|
|
A team member will be in touch shortly to confirm the next steps.
|
|
If you need to reach us before then, please contact our office directly.
|
|
</p>
|
|
</div>
|
|
<t t-if="not is_html_empty(object.user_id.signature)" data-o-mail-quote-container="1">
|
|
<div data-o-mail-quote="1">--<br data-o-mail-quote="1"/><t t-out="object.user_id.signature or ''" data-o-mail-quote="1"/></div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- X2: Day-before visit reminder -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_visit_day_before" model="mail.template">
|
|
<field name="name">Repair: Day-Before Visit Reminder</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">Reminder: technician visit tomorrow for {{ object.name }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#2B6CB0;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#2B6CB0;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Reminder: our technician visits tomorrow</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Hello <t t-out="object.partner_id.name or 'there'"/>, this is a friendly
|
|
reminder that your service call <strong><t t-out="object.name"/></strong>
|
|
is scheduled for tomorrow.
|
|
</p>
|
|
<!-- H3: pull the SPECIFIC task via context (cron passes reminder_task_id);
|
|
fall back to the first task otherwise so manual sends still work. -->
|
|
<t t-set="task_id" t-value="ctx.get('reminder_task_id') if ctx else False"/>
|
|
<t t-set="task" t-value="env['fusion.technician.task'].browse(task_id) if task_id else object.x_fc_technician_task_ids[:1]"/>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<t t-if="task">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Scheduled</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="task.scheduled_date" t-options="{'widget': 'date'}"/></td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Technician</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="task.technician_id.name or 'TBC'"/></td></tr>
|
|
</t>
|
|
<t t-if="object.product_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.product_id.display_name"/></td></tr>
|
|
</t>
|
|
</table>
|
|
<div style="border-left:3px solid #2B6CB0;padding:12px 16px;margin:0 0 24px 0;">
|
|
<p style="margin:0;font-size:14px;line-height:1.5;">
|
|
<strong>Need to reschedule?</strong> Reply to this email or call our office.
|
|
Please make sure the equipment is accessible and any pets are secured.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- X4: Post-visit NPS / Google review -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_post_visit_nps" model="mail.template">
|
|
<field name="name">Repair: Post-Visit NPS</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">How did we do, {{ object.partner_id.name or 'there' }}?</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#38a169;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#38a169;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Thanks for trusting us with your equipment</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Your service call <strong><t t-out="object.name"/></strong> is complete.
|
|
We would love to hear how it went - your feedback helps other clients
|
|
find us and helps us improve.
|
|
</p>
|
|
<!-- H4: URL-encode the company name so the fallback URL survives ampersands + spaces. -->
|
|
<t t-set="review_url" t-value="object.company_id.x_fc_google_review_url or ('https://www.google.com/search?' + url_encode({'q': object.company_id.name or ''}))"/>
|
|
<div style="text-align:center;margin:0 0 24px 0;">
|
|
<a t-att-href="review_url"
|
|
style="display:inline-block;padding:14px 28px;background-color:#38a169;color:#ffffff;text-decoration:none;border-radius:6px;font-size:16px;font-weight:600;">
|
|
Leave a Google review
|
|
</a>
|
|
</div>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">
|
|
If anything is not right, please reply directly to this email - we will make it right.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Bundle 8: Rush service technician alert (mid-shift squeeze) -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_rush_tech_alert" model="mail.template">
|
|
<field name="name">Repair: Rush Squeeze - Tech Alert</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">URGENT: {{ object.partner_id.name or 'rush client' }} added to your route - {{ object.name }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#c53030;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#c53030;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
Rush stop added to your day
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;">A rush call was squeezed into your route</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Office added this between your existing stops. Please re-sequence
|
|
your day and head over as soon as you can finish your current job.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Repair</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Client</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.name or '?'"/></td></tr>
|
|
<t t-if="object.partner_id.phone">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Phone</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><a t-attf-href="tel:{{ object.partner_id.phone }}"><t t-out="object.partner_id.phone"/></a></td></tr>
|
|
</t>
|
|
<t t-if="object.x_fc_repair_category_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.x_fc_repair_category_id.name"/></td></tr>
|
|
</t>
|
|
<t t-if="object.partner_id.street or object.partner_id.city">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Address</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.street or ''"/>, <t t-out="object.partner_id.city or ''"/></td></tr>
|
|
</t>
|
|
<t t-if="object.x_fc_rush_surcharge">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;">Rush Surcharge</td><td style="padding:10px 14px;font-size:14px;color:#c53030;font-weight:600;">$<t t-out="object.x_fc_rush_surcharge"/></td></tr>
|
|
</t>
|
|
</table>
|
|
<p style="margin:0;font-size:13px;color:#888;">
|
|
Open the task in your tech portal to see the full route and tap Start Timer when you arrive.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Bundle 8: Repair awaiting parts (client comms) -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_repair_awaiting_parts" model="mail.template">
|
|
<field name="name">Repair: Awaiting Parts (Client)</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">{{ object.company_id.name }} - update on your repair {{ object.name }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#d97706;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#d97706;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;">We found the problem - here's the plan</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Hello <t t-out="object.partner_id.name or 'there'"/>, our technician
|
|
diagnosed your equipment today but needs a part we don't carry on the
|
|
truck. We're ordering it right away from the manufacturer.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:40%;">Reference</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<t t-if="object.x_fc_parts_eta_date">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;">Expected return visit</td><td style="padding:10px 14px;font-size:14px;color:#d97706;font-weight:600;">~<t t-out="object.x_fc_parts_eta_date" t-options="{'widget': 'date'}"/></td></tr>
|
|
</t>
|
|
</table>
|
|
<div style="border-left:3px solid #d97706;padding:12px 16px;margin:0 0 24px 0;">
|
|
<p style="margin:0;font-size:14px;line-height:1.5;">
|
|
<strong>What happens next:</strong>
|
|
</p>
|
|
<ol style="margin:8px 0 0 0;font-size:14px;line-height:1.6;">
|
|
<li>We order the parts from the manufacturer today.</li>
|
|
<li>When the parts arrive at our warehouse, we'll email you with a confirmed visit date.</li>
|
|
<li>You don't need to do anything in the meantime.</li>
|
|
</ol>
|
|
</div>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">
|
|
Questions? Reply to this email or call our office. Reference: <t t-out="object.name"/>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Bundle 8: Specific parts ordered (per part) -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_parts_ordered" model="mail.template">
|
|
<field name="name">Repair: Parts Ordered (Client)</field>
|
|
<field name="model_id" ref="model_fusion_repair_part_order"/>
|
|
<field name="subject">Parts ordered for your {{ object.repair_order_id.x_fc_repair_category_id.name or 'equipment' }} - {{ object.repair_order_id.name }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#2B6CB0;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<h2 style="font-size:20px;font-weight:700;margin:0 0 16px 0;">Parts ordered</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 16px 0;">
|
|
We've placed an order for the parts your <t t-out="object.repair_order_id.x_fc_repair_category_id.name or 'equipment'"/>
|
|
needs. Expected arrival: <strong><t t-out="object.expected_date" t-options="{'widget': 'date'}"/></strong>.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 16px 0;">
|
|
<tr><td style="padding:8px 14px;opacity:0.6;font-size:13px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Part</td><td style="padding:8px 14px;font-size:13px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.description"/></td></tr>
|
|
<t t-if="object.manufacturer">
|
|
<tr><td style="padding:8px 14px;opacity:0.6;font-size:13px;border-bottom:1px solid rgba(128,128,128,0.15);">Manufacturer</td><td style="padding:8px 14px;font-size:13px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.manufacturer"/></td></tr>
|
|
</t>
|
|
<tr><td style="padding:8px 14px;opacity:0.6;font-size:13px;">Ref</td><td style="padding:8px 14px;font-size:13px;"><t t-out="object.name"/></td></tr>
|
|
</table>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">We'll email again as soon as the parts arrive at our warehouse.</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Bundle 8: Parts received - re-dispatch coming (client) -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_parts_received" model="mail.template">
|
|
<field name="name">Repair: Parts Received (Client)</field>
|
|
<field name="model_id" ref="model_fusion_repair_part_order"/>
|
|
<field name="subject">Parts arrived - scheduling your return visit ({{ object.repair_order_id.name }})</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#38a169;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 16px 0;">Good news - your parts arrived</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 16px 0;">
|
|
The parts for your repair are in. Our office will call you in the next business day
|
|
to confirm a return-visit time. You don't need to do anything right now.
|
|
</p>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">Reference: <t t-out="object.repair_order_id.name"/></p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- M1: Inspection certificate expiry reminder -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_inspection_expiry_reminder" model="mail.template">
|
|
<field name="name">Repair: Inspection Certificate Expiry Reminder</field>
|
|
<field name="model_id" ref="model_fusion_repair_inspection_certificate"/>
|
|
<field name="subject">Your {{ object.product_id.display_name }} inspection certificate expires {{ object.expiry_date }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#d97706;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#d97706;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Annual safety inspection coming due</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Hello <t t-out="object.partner_id.name or 'there'"/>, the safety inspection
|
|
certificate on your <strong><t t-out="object.product_id.display_name"/></strong>
|
|
(certificate <strong><t t-out="object.name"/></strong>) expires
|
|
<strong><t t-out="object.expiry_date" t-options="{'widget': 'date'}"/></strong>.
|
|
Annual re-inspection keeps your equipment compliant with local safety regulations.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:40%;">Certificate</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.product_id.display_name"/></td></tr>
|
|
<t t-if="object.lot_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Serial</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.lot_id.name"/></td></tr>
|
|
</t>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;">Expires</td><td style="padding:10px 14px;font-size:14px;color:#d97706;font-weight:600;"><t t-out="object.expiry_date" t-options="{'widget': 'date'}"/></td></tr>
|
|
</table>
|
|
<div style="border-left:3px solid #d97706;padding:12px 16px;margin:0 0 24px 0;">
|
|
<p style="margin:0;font-size:14px;line-height:1.5;">
|
|
Reply to this email or call our office to book your re-inspection. We will
|
|
send our certified technician to confirm everything is safe and renew your
|
|
certificate.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- On-Call Safety Page -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_on_call_page" model="mail.template">
|
|
<field name="name">Repair: On-Call Safety Page</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">[SAFETY PAGE] {{ object.partner_id.name or 'Unknown' }} - {{ object.name or 'n/a' }}</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#c53030;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#c53030;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
URGENT - SAFETY PAGE
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Safety service call requires response</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
A client just submitted a safety-flagged service request via the
|
|
<t t-out="dict(object._fields['x_fc_intake_source'].selection).get(object.x_fc_intake_source) or 'intake'"/>.
|
|
You have been paged as the on-call manager.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Reference</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Client</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.name or '?'"/></td></tr>
|
|
<t t-if="object.partner_id.phone">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Phone</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.phone"/></td></tr>
|
|
</t>
|
|
<t t-if="object.x_fc_repair_category_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.x_fc_repair_category_id.name"/></td></tr>
|
|
</t>
|
|
</table>
|
|
<div style="text-align:center;margin:0 0 24px 0;">
|
|
<a t-attf-href="/repair/on-call/ack/{{ object.x_fc_on_call_token or '' }}"
|
|
style="display:inline-block;padding:14px 28px;background-color:#c53030;color:#ffffff;text-decoration:none;border-radius:6px;font-size:16px;font-weight:600;">
|
|
Acknowledge - I will respond
|
|
</a>
|
|
</div>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">
|
|
If you do not acknowledge within 15 minutes, the next on-call
|
|
priority will be paged automatically.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Maintenance Due Reminder -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_maintenance_due_reminder" model="mail.template">
|
|
<field name="name">Repair: Maintenance Due Reminder</field>
|
|
<field name="model_id" ref="model_fusion_repair_maintenance_contract"/>
|
|
<field name="subject">{{ object.company_id.name }} - Time to schedule your equipment maintenance</field>
|
|
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="partner_to">{{ object.partner_id.id }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#38a169;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#38a169;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
<t t-out="object.company_id.name"/>
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">Your equipment is due for maintenance</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Hello <t t-out="object.partner_id.name or 'there'"/>, your
|
|
<strong><t t-out="object.product_id.display_name or 'equipment'"/></strong>
|
|
is due for its next scheduled maintenance visit on
|
|
<strong><t t-out="object.next_due_date" t-options="{'widget': 'date'}"/></strong>.
|
|
</p>
|
|
<div style="text-align:center;margin:0 0 24px 0;">
|
|
<a t-attf-href="/repairs/maintenance/book/{{ object.booking_token }}"
|
|
style="display:inline-block;padding:14px 28px;background-color:#38a169;color:#ffffff;text-decoration:none;border-radius:6px;font-size:16px;font-weight:600;">
|
|
Book my maintenance visit
|
|
</a>
|
|
</div>
|
|
<div style="border-left:3px solid #38a169;padding:12px 16px;margin:0 0 24px 0;">
|
|
<p style="margin:0;font-size:14px;line-height:1.5;">
|
|
Regular maintenance keeps your equipment safe and reliable. Use the
|
|
button above to confirm and we will reach out to schedule a time that works for you.
|
|
</p>
|
|
</div>
|
|
<p style="opacity:0.55;font-size:12px;margin:0;">
|
|
Contract reference <strong><t t-out="object.name"/></strong>.
|
|
If you no longer have this equipment, you can ignore this email.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Repair Intake Received - Office Notification -->
|
|
<!-- ============================================================== -->
|
|
<record id="email_template_intake_received_office" model="mail.template">
|
|
<field name="name">Repair: Intake Received (Office)</field>
|
|
<field name="model_id" ref="repair.model_repair_order"/>
|
|
<field name="subject">[New Service Call] {{ object.partner_id.name or 'Walk-in' }} - {{ object.name or 'n/a' }}</field>
|
|
<field name="email_from">{{ (object.user_id.email_formatted or object.company_id.email_formatted or user.email_formatted) }}</field>
|
|
<field name="email_to">{{ ','.join(p.email for p in (object.company_id.x_fc_office_notification_ids if 'x_fc_office_notification_ids' in object.company_id._fields else []) if p.email) or (object.company_id.email or '') }}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;max-width:600px;margin:0 auto;">
|
|
<div style="height:4px;background-color:#d69e2e;"></div>
|
|
<div style="padding:32px 28px;">
|
|
<p style="color:#d69e2e;font-size:13px;font-weight:600;letter-spacing:0.5px;text-transform:uppercase;margin:0 0 24px 0;">
|
|
Internal: New Service Call
|
|
</p>
|
|
<h2 style="font-size:22px;font-weight:700;margin:0 0 6px 0;line-height:1.3;">A new repair has been submitted</h2>
|
|
<p style="opacity:0.65;font-size:15px;line-height:1.5;margin:0 0 24px 0;">
|
|
Submitted by <strong><t t-out="object.x_fc_intake_user_id.name or object.user_id.name or 'system'"/></strong>
|
|
via the <strong><t t-out="dict(object._fields['x_fc_intake_source'].selection).get(object.x_fc_intake_source) or 'intake'"/></strong>.
|
|
</p>
|
|
<table style="width:100%;border-collapse:collapse;margin:0 0 24px 0;">
|
|
<tr><td colspan="2" style="padding:10px 14px;font-size:12px;font-weight:600;opacity:0.55;text-transform:uppercase;letter-spacing:0.5px;border-bottom:2px solid rgba(128,128,128,0.25);">Details</td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);width:35%;">Reference</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.name"/></td></tr>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Client</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.name or 'Walk-in / unknown'"/></td></tr>
|
|
<t t-if="object.partner_id.phone">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Phone</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.partner_id.phone"/></td></tr>
|
|
</t>
|
|
<t t-if="object.product_id">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Equipment</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="object.product_id.display_name"/></td></tr>
|
|
</t>
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Urgency</td><td style="padding:10px 14px;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);"><t t-out="dict(object._fields['x_fc_urgency'].selection).get(object.x_fc_urgency) or 'normal'"/></td></tr>
|
|
<t t-if="object.x_fc_third_party_equipment">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Third-party</td><td style="padding:10px 14px;color:#d69e2e;font-size:14px;font-weight:600;border-bottom:1px solid rgba(128,128,128,0.15);">Yes - equipment not sold by us</td></tr>
|
|
</t>
|
|
<t t-if="object.under_warranty">
|
|
<tr><td style="padding:10px 14px;opacity:0.6;font-size:14px;border-bottom:1px solid rgba(128,128,128,0.15);">Warranty</td><td style="padding:10px 14px;color:#38a169;font-size:14px;font-weight:600;border-bottom:1px solid rgba(128,128,128,0.15);">Under warranty</td></tr>
|
|
</t>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|