Files
Odoo-Modules/fusion_repairs/wizard/repair_visit_report_wizard_views.xml
gsinghpal b4b59cc3c9 feat(fusion_repairs): Bundle 7 - tech mobile (T3 + T4 + T6 + T7)
T3 Labour timer on technician task
- Two new fields on fusion.technician.task: x_fc_timer_running_since
  (Datetime) + x_fc_timer_accumulated_minutes (Float).
- action_timer_start / action_timer_stop methods, idempotent (start when
  already running is a no-op, stop when not running is a no-op).
- Multiple start/stop cycles accumulate into the same total.
- Two header buttons (Start Timer green / Stop Timer amber), invisible
  based on the running_since field so the right one shows at any time.
- Stop posts a chatter line 'Labour timer stopped. Added X.X min, total
  Y.Y min.' so audit history shows every shift.

T4 Client signature on visit report
- New client_signature Binary field on the visit-report wizard with
  Odoo native widget='signature' that draws on canvas + base64-encodes
  the PNG.
- client_signature_name Char for typed name (audit).
- Persisted as an ir.attachment on the repair.order via the new
  _persist_mobile_artefacts helper.
- Chatter post 'Client signature captured (Jane Smith).'.

T6 Replaced parts - serial capture
- parts_serial_capture Text on the wizard (one per line per the spec).
- On confirm, posted to chatter wrapped in <pre> so line breaks survive.
- Used by OEM warranty filing in future M8.

T7 Client no-show photo proof
- no_show Boolean + no_show_photo Binary with widget='image' (visible
  only when no_show=True via Odoo 19 invisible= conditional).
- Photo saved as ir.attachment on the repair when present.
- Chatter post 'Visit recorded as client no-show (photo attached)'.

Verified end-to-end on local westin-v19:
  T3 timer started -> 2s sleep -> stopped -> 0.0357 min recorded
  T4 attachment 'signature-RO-202605-17.png' created on repair
  T6 chatter shows 'SN-AAA-111 / SN-BBB-222'
  T4 chatter shows 'Client signature captured (Jane Smith)'

Bumped to 19.0.1.7.0.

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

83 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_repair_visit_report_wizard_form" model="ir.ui.view">
<field name="name">fusion.repair.visit.report.wizard.form</field>
<field name="model">fusion.repair.visit.report.wizard</field>
<field name="arch" type="xml">
<form string="Visit Report">
<sheet>
<group>
<group>
<field name="repair_id" readonly="1"/>
<field name="technician_id"
options="{'no_create': True}"/>
</group>
<group>
<field name="labour_hours"/>
</group>
</group>
<separator string="Parts Used"/>
<field name="parts_line_ids">
<list editable="bottom">
<field name="product_id"/>
<field name="quantity"/>
<field name="unit_price" widget="monetary"/>
<field name="subtotal" widget="monetary"/>
</list>
</field>
<separator string="Cost Reconciliation"/>
<group>
<group>
<field name="estimated_cost" widget="monetary"/>
<field name="actual_cost" widget="monetary"/>
</group>
<group>
<field name="variance_pct" widget="float" digits="[12,1]"/>
<field name="requires_requote"/>
<field name="company_currency_id" invisible="1"/>
</group>
</group>
<div class="alert alert-warning" role="alert"
invisible="not requires_requote">
Variance exceeds the configured threshold. Saving will
mark the repair as <strong>Requires Re-Quote</strong>;
a manager must review before invoicing.
</div>
<separator string="Outcome"/>
<field name="notes"/>
<field name="found_another_issue"/>
<field name="issue_inspection_cert"/>
<separator string="No-Show (T7)"/>
<group>
<field name="no_show"/>
<field name="no_show_photo" widget="image" filename="no_show_photo_filename"
invisible="not no_show"/>
</group>
<separator string="Parts Replaced - Serial Capture (T6)"/>
<field name="parts_serial_capture" nolabel="1"
placeholder="One serial per line - used for OEM warranty claims"/>
<separator string="Client Signature (T4)"/>
<group>
<field name="client_signature_name"/>
<field name="client_signature" widget="signature"/>
</group>
</sheet>
<footer>
<button string="Save Visit Report"
name="action_confirm"
type="object"
class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>