feat: separate fusion field service and LTC into standalone modules, update core modules
- fusion_claims: separated field service logic, updated controllers/views - fusion_tasks: updated task views and map integration - fusion_authorizer_portal: added page 11 signing, schedule booking, migrations - fusion_shipping: new standalone shipping module (Canada Post, FedEx, DHL, Purolator) - fusion_ltc_management: new standalone LTC management module
This commit is contained in:
@@ -341,6 +341,27 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- INVOICE LIST: Custom Columns -->
|
||||
<!-- ===================================================================== -->
|
||||
<record id="view_out_invoice_tree_fusion_claims" model="ir.ui.view">
|
||||
<field name="name">account.move.list.fusion.central</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_invoice_tree"/>
|
||||
<field name="priority">80</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='amount_untaxed_in_currency_signed']" position="before">
|
||||
<field name="x_fc_invoice_type" string="Invoice Type" optional="hide"/>
|
||||
<field name="x_fc_client_type" string="Client Type" optional="hide"/>
|
||||
<field name="x_fc_claim_number" string="Claim #" optional="hide"/>
|
||||
<field name="x_fc_client_ref_1" string="Client Ref 1" optional="hide"/>
|
||||
<field name="x_fc_client_ref_2" string="Client Ref 2" optional="hide"/>
|
||||
<field name="partner_shipping_id" string="Delivery Address" optional="hide"/>
|
||||
<field name="x_fc_adp_invoice_portion" string="Portion" optional="hide" widget="badge"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- INVOICE SEARCH: Filters -->
|
||||
<!-- ===================================================================== -->
|
||||
@@ -350,24 +371,59 @@
|
||||
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//search" position="inside">
|
||||
<!-- Search Fields -->
|
||||
<field name="partner_shipping_id" string="Delivery Address"/>
|
||||
<field name="x_fc_claim_number" string="Claim Number"/>
|
||||
<field name="x_fc_client_ref_1" string="Client Reference 1"/>
|
||||
<field name="x_fc_client_ref_2" string="Client Reference 2"/>
|
||||
<field name="x_fc_invoice_type" string="Invoice Type"/>
|
||||
<field name="x_fc_client_type" string="Client Type"/>
|
||||
<separator/>
|
||||
<filter string="ADP Invoices" name="adp_invoices"
|
||||
<!-- Sale Type Filters -->
|
||||
<filter string="ADP" name="type_adp"
|
||||
domain="[('x_fc_invoice_type', 'in', ['adp', 'adp_odsp'])]"/>
|
||||
<filter string="ADP Client" name="type_adp_client"
|
||||
domain="[('x_fc_invoice_type', '=', 'adp_client')]"/>
|
||||
<filter string="ODSP" name="type_odsp"
|
||||
domain="[('x_fc_invoice_type', 'in', ['odsp', 'adp_odsp'])]"/>
|
||||
<filter string="MOD" name="type_mod"
|
||||
domain="[('x_fc_invoice_type', '=', 'march_of_dimes')]"/>
|
||||
<filter string="WSIB" name="type_wsib"
|
||||
domain="[('x_fc_invoice_type', '=', 'wsib')]"/>
|
||||
<filter string="Insurance" name="type_insurance"
|
||||
domain="[('x_fc_invoice_type', '=', 'insurance')]"/>
|
||||
<filter string="Direct/Private" name="type_direct_private"
|
||||
domain="[('x_fc_invoice_type', '=', 'direct_private')]"/>
|
||||
<filter string="Hardship" name="type_hardship"
|
||||
domain="[('x_fc_invoice_type', '=', 'hardship')]"/>
|
||||
<filter string="Rentals" name="type_rental"
|
||||
domain="[('x_fc_invoice_type', '=', 'rental')]"/>
|
||||
<filter string="Muscular Dystrophy" name="type_muscular_dystrophy"
|
||||
domain="[('x_fc_invoice_type', '=', 'muscular_dystrophy')]"/>
|
||||
<filter string="Others" name="type_other"
|
||||
domain="[('x_fc_invoice_type', '=', 'other')]"/>
|
||||
<filter string="Regular" name="type_regular"
|
||||
domain="[('x_fc_invoice_type', '=', 'regular')]"/>
|
||||
<separator/>
|
||||
<!-- ADP Export Filters -->
|
||||
<filter string="ADP Exported" name="adp_exported"
|
||||
domain="[('adp_exported', '=', True)]"/>
|
||||
<filter string="Not ADP Exported" name="not_adp_exported"
|
||||
domain="[('adp_exported', '=', False), ('x_fc_invoice_type', 'in', ['adp', 'adp_odsp']), ('move_type', 'in', ['out_invoice', 'out_refund'])]"/>
|
||||
<separator/>
|
||||
<!-- Client Type Filters -->
|
||||
<filter string="REG Clients" name="reg_clients"
|
||||
domain="[('x_fc_client_type', '=', 'REG')]"/>
|
||||
<filter string="ODS/OWP/ACS" name="full_funding"
|
||||
domain="[('x_fc_client_type', 'in', ['ODS', 'OWP', 'ACS'])]"/>
|
||||
<separator/>
|
||||
<!-- Invoice Portion Filters -->
|
||||
<filter string="Client Invoices (25%)" name="client_invoices"
|
||||
domain="[('x_fc_adp_invoice_portion', '=', 'client')]"/>
|
||||
<filter string="ADP Invoices (75%)" name="adp_portion_invoices"
|
||||
domain="[('x_fc_adp_invoice_portion', '=', 'adp')]"/>
|
||||
<separator/>
|
||||
<!-- ADP Billing Status Filters -->
|
||||
<filter string="Billing: Waiting" name="billing_waiting"
|
||||
domain="[('x_fc_adp_billing_status', '=', 'waiting')]"/>
|
||||
<filter string="Billing: Submitted" name="billing_submitted"
|
||||
@@ -376,6 +432,16 @@
|
||||
domain="[('x_fc_adp_billing_status', '=', 'need_correction')]"/>
|
||||
<filter string="Billing: Payment Issued" name="billing_payment_issued"
|
||||
domain="[('x_fc_adp_billing_status', '=', 'payment_issued')]"/>
|
||||
<separator/>
|
||||
<!-- Group By -->
|
||||
<filter string="Invoice Type" name="group_invoice_type"
|
||||
context="{'group_by': 'x_fc_invoice_type'}"/>
|
||||
<filter string="Client Type" name="group_client_type"
|
||||
context="{'group_by': 'x_fc_client_type'}"/>
|
||||
<filter string="Invoice Portion" name="group_invoice_portion"
|
||||
context="{'group_by': 'x_fc_adp_invoice_portion'}"/>
|
||||
<filter string="Billing Status" name="group_billing_status"
|
||||
context="{'group_by': 'x_fc_adp_billing_status'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -238,21 +238,13 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search ADP Orders">
|
||||
<field name="partner_id" string="Customer"/>
|
||||
<field name="name" string="Order Reference"/>
|
||||
<field name="name" string="Order"
|
||||
filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="x_fc_claim_number"/>
|
||||
<field name="x_fc_authorizer_id" string="Authorizer"/>
|
||||
<field name="x_fc_authorizer_id"/>
|
||||
<field name="x_fc_client_ref_1" string="Client Reference 1"/>
|
||||
<field name="x_fc_client_ref_2" string="Client Reference 2"/>
|
||||
<field name="x_fc_adp_application_status" string="ADP Status"/>
|
||||
<field name="state" string="Order Status"/>
|
||||
<field name="tag_ids" string="Tags"/>
|
||||
<field name="partner_shipping_id" string="Delivery Name/Address"
|
||||
filter_domain="['|', '|', '|',
|
||||
('partner_shipping_id.name', 'ilike', self),
|
||||
('partner_shipping_id.street', 'ilike', self),
|
||||
('partner_shipping_id.street2', 'ilike', self),
|
||||
('partner_shipping_id.city', 'ilike', self)]"/>
|
||||
<separator/>
|
||||
<!-- Status Filters - Active Workflow -->
|
||||
<filter string="Quotation" name="filter_quotation"
|
||||
@@ -687,22 +679,12 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search ODSP Cases">
|
||||
<field name="partner_id" string="Customer"/>
|
||||
<field name="name" string="Order Reference"/>
|
||||
<field name="name" string="Order"
|
||||
filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="x_fc_odsp_member_id"/>
|
||||
<field name="x_fc_odsp_office_id"/>
|
||||
<field name="x_fc_odsp_case_worker_name"/>
|
||||
<field name="x_fc_odsp_std_status" string="ODSP Status"/>
|
||||
<field name="x_fc_sa_status" string="SA Mobility Status"/>
|
||||
<field name="x_fc_ow_status" string="Ontario Works Status"/>
|
||||
<field name="state" string="Order Status"/>
|
||||
<field name="tag_ids" string="Tags"/>
|
||||
<field name="partner_shipping_id" string="Delivery Name/Address"
|
||||
filter_domain="['|', '|', '|',
|
||||
('partner_shipping_id.name', 'ilike', self),
|
||||
('partner_shipping_id.street', 'ilike', self),
|
||||
('partner_shipping_id.street2', 'ilike', self),
|
||||
('partner_shipping_id.city', 'ilike', self)]"/>
|
||||
<separator/>
|
||||
<!-- ODSP Standard Status -->
|
||||
<filter string="Quotation" name="filter_quotation"
|
||||
@@ -1261,21 +1243,11 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search March of Dimes Cases">
|
||||
<field name="partner_id" string="Customer"/>
|
||||
<field name="name" string="Order Reference"/>
|
||||
<field name="x_fc_case_reference" string="HVMP Reference"/>
|
||||
<field name="x_fc_case_handler" string="Case Handler"/>
|
||||
<field name="x_fc_case_worker" string="Case Worker"/>
|
||||
<field name="x_fc_mod_status" string="MOD Status"/>
|
||||
<field name="x_fc_mod_production_status" string="Production Stage"/>
|
||||
<field name="state" string="Order Status"/>
|
||||
<field name="tag_ids" string="Tags"/>
|
||||
<field name="partner_shipping_id" string="Delivery Name/Address"
|
||||
filter_domain="['|', '|', '|',
|
||||
('partner_shipping_id.name', 'ilike', self),
|
||||
('partner_shipping_id.street', 'ilike', self),
|
||||
('partner_shipping_id.street2', 'ilike', self),
|
||||
('partner_shipping_id.city', 'ilike', self)]"/>
|
||||
<field name="name" string="Order"
|
||||
filter_domain="['|', '|', ('name', 'ilike', self), ('client_order_ref', 'ilike', self), ('partner_id', 'child_of', self)]"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="x_fc_case_reference"/>
|
||||
<field name="x_fc_case_handler"/>
|
||||
<separator/>
|
||||
<!-- Status Filters - Main Workflow -->
|
||||
<filter string="Schedule Assessment" name="filter_need_to_schedule"
|
||||
@@ -1747,58 +1719,13 @@ else:
|
||||
sequence="30"
|
||||
groups="group_fusion_claims_user,fusion_tasks.group_field_technician"/>
|
||||
|
||||
<!-- ===== ALL INVOICES ===== -->
|
||||
<menuitem id="menu_fc_all_invoices" name="All Invoices" parent="menu_adp_claims_root"
|
||||
action="action_fc_all_invoices" sequence="3"/>
|
||||
|
||||
<!-- ===== LTC MANAGEMENT ===== -->
|
||||
<menuitem id="menu_fc_ltc"
|
||||
name="LTC"
|
||||
parent="menu_adp_claims_root"
|
||||
sequence="5"/>
|
||||
<menuitem id="menu_ltc_overview"
|
||||
name="Overview"
|
||||
parent="menu_fc_ltc"
|
||||
action="action_ltc_repairs_kanban"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_ltc_repairs"
|
||||
name="Repair Requests"
|
||||
parent="menu_fc_ltc"
|
||||
sequence="10"/>
|
||||
<menuitem id="menu_ltc_repairs_all"
|
||||
name="All Repairs"
|
||||
parent="menu_ltc_repairs"
|
||||
action="action_ltc_repairs_all"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_ltc_repairs_new"
|
||||
name="New / Pending"
|
||||
parent="menu_ltc_repairs"
|
||||
action="action_ltc_repairs_new"
|
||||
sequence="2"/>
|
||||
<menuitem id="menu_ltc_repairs_progress"
|
||||
name="In Progress"
|
||||
parent="menu_ltc_repairs"
|
||||
action="action_ltc_repairs_in_progress"
|
||||
sequence="3"/>
|
||||
<menuitem id="menu_ltc_repairs_completed"
|
||||
name="Completed"
|
||||
parent="menu_ltc_repairs"
|
||||
action="action_ltc_repairs_completed"
|
||||
sequence="4"/>
|
||||
<menuitem id="menu_ltc_cleanup"
|
||||
name="Cleanup Schedule"
|
||||
parent="menu_fc_ltc"
|
||||
action="action_ltc_cleanups"
|
||||
sequence="20"/>
|
||||
<menuitem id="menu_ltc_locations"
|
||||
name="Locations"
|
||||
parent="menu_fc_ltc"
|
||||
sequence="30"/>
|
||||
<menuitem id="menu_ltc_facilities"
|
||||
name="Facilities"
|
||||
parent="menu_ltc_locations"
|
||||
action="action_ltc_facilities"
|
||||
sequence="1"/>
|
||||
<!-- ===== ALL ORDERS (parent) ===== -->
|
||||
<menuitem id="menu_fc_all_orders" name="All Orders" parent="menu_adp_claims_root"
|
||||
action="sale.action_orders" sequence="2"/>
|
||||
<menuitem id="menu_fc_all_sales_orders" name="All Sales Orders" parent="menu_fc_all_orders"
|
||||
action="sale.action_orders" sequence="1"/>
|
||||
<menuitem id="menu_fc_all_invoices" name="All Invoices" parent="menu_fc_all_orders"
|
||||
action="action_fc_all_invoices" sequence="2"/>
|
||||
|
||||
<!-- ===== ADP SUBMENU (full workflow) ===== -->
|
||||
<menuitem id="menu_fc_adp"
|
||||
@@ -2108,22 +2035,6 @@ else:
|
||||
action="action_device_import_wizard" sequence="20"/>
|
||||
<menuitem id="menu_import_xml_files" name="Import XML Files" parent="menu_adp_config"
|
||||
action="action_xml_import_wizard" sequence="30"/>
|
||||
<menuitem id="menu_ltc_repair_stages" name="LTC Repair Stages" parent="menu_adp_config"
|
||||
action="action_ltc_repair_stages" sequence="40"/>
|
||||
<menuitem id="menu_forms_management"
|
||||
name="Forms Management"
|
||||
parent="menu_adp_config"
|
||||
sequence="50"/>
|
||||
<menuitem id="menu_form_submissions"
|
||||
name="Form Submissions"
|
||||
parent="menu_forms_management"
|
||||
action="action_ltc_form_submissions"
|
||||
sequence="1"/>
|
||||
<menuitem id="menu_forms_settings"
|
||||
name="Forms Settings"
|
||||
parent="menu_forms_management"
|
||||
action="action_fusion_claims_settings"
|
||||
sequence="2"/>
|
||||
<menuitem id="menu_fusion_claims_settings" name="Settings" parent="menu_adp_config"
|
||||
action="action_fusion_claims_settings" sequence="90"/>
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<menuitem id="menu_loaner_root"
|
||||
name="Loaner Management"
|
||||
name="Loaners"
|
||||
parent="menu_adp_claims_root"
|
||||
sequence="58"/>
|
||||
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- CLEANUP - FORM VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_cleanup_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.cleanup.form</field>
|
||||
<field name="model">fusion.ltc.cleanup</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cleanup Schedule">
|
||||
<header>
|
||||
<button name="action_start" type="object" string="Start"
|
||||
class="btn-primary"
|
||||
invisible="state != 'scheduled'"/>
|
||||
<button name="action_complete" type="object" string="Complete"
|
||||
class="btn-primary"
|
||||
invisible="state != 'in_progress'"/>
|
||||
<button name="action_cancel" type="object" string="Cancel"
|
||||
invisible="state in ('completed', 'cancelled')"/>
|
||||
<button name="action_reset" type="object" string="Reset to Scheduled"
|
||||
invisible="state not in ('cancelled', 'rescheduled')"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="scheduled,in_progress,completed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_create_task" type="object"
|
||||
class="oe_stat_button" icon="fa-tasks">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Task</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group string="Schedule">
|
||||
<field name="facility_id"/>
|
||||
<field name="scheduled_date"/>
|
||||
<field name="completed_date"/>
|
||||
<field name="technician_id"/>
|
||||
</group>
|
||||
<group string="Details">
|
||||
<field name="items_cleaned"/>
|
||||
<field name="task_id" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="notes" placeholder="Cleanup notes..."/>
|
||||
</page>
|
||||
<page string="Photos" name="photos">
|
||||
<field name="photo_ids" widget="many2many_binary"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- CLEANUP - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_cleanup_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.cleanup.list</field>
|
||||
<field name="model">fusion.ltc.cleanup</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Cleanup Schedule" default_order="scheduled_date desc"
|
||||
decoration-success="state == 'completed'"
|
||||
decoration-muted="state in ('cancelled', 'rescheduled')">
|
||||
<field name="name"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="scheduled_date"/>
|
||||
<field name="completed_date" optional="show"/>
|
||||
<field name="technician_id" widget="many2one_avatar_user" optional="show"/>
|
||||
<field name="items_cleaned" optional="show"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state == 'scheduled'"
|
||||
decoration-warning="state == 'in_progress'"
|
||||
decoration-success="state == 'completed'"
|
||||
decoration-danger="state == 'cancelled'"
|
||||
decoration-muted="state == 'rescheduled'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- CLEANUP - KANBAN VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_cleanup_kanban" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.cleanup.kanban</field>
|
||||
<field name="model">fusion.ltc.cleanup</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="state" class="o_kanban_small_column">
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="d-flex justify-content-between">
|
||||
<field name="name" class="fw-bold"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="facility_id" class="fw-bold"/>
|
||||
</div>
|
||||
<div class="text-muted">
|
||||
Scheduled: <field name="scheduled_date"/>
|
||||
</div>
|
||||
<div t-if="record.completed_date.raw_value" class="text-muted">
|
||||
Completed: <field name="completed_date"/>
|
||||
</div>
|
||||
<footer class="mt-2">
|
||||
<field name="technician_id" widget="many2one_avatar_user"/>
|
||||
</footer>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- CLEANUP - SEARCH VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_cleanup_search" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.cleanup.search</field>
|
||||
<field name="model">fusion.ltc.cleanup</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Cleanups">
|
||||
<field name="facility_id"/>
|
||||
<field name="technician_id"/>
|
||||
<separator/>
|
||||
<filter string="Scheduled" name="filter_scheduled"
|
||||
domain="[('state', '=', 'scheduled')]"/>
|
||||
<filter string="In Progress" name="filter_in_progress"
|
||||
domain="[('state', '=', 'in_progress')]"/>
|
||||
<filter string="Completed" name="filter_completed"
|
||||
domain="[('state', '=', 'completed')]"/>
|
||||
<separator/>
|
||||
<filter string="Upcoming (7 Days)" name="filter_upcoming"
|
||||
domain="[('scheduled_date', '<=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
|
||||
('scheduled_date', '>=', context_today().strftime('%Y-%m-%d')),
|
||||
('state', '=', 'scheduled')]"/>
|
||||
<filter string="Overdue" name="filter_overdue"
|
||||
domain="[('scheduled_date', '<', context_today().strftime('%Y-%m-%d')),
|
||||
('state', '=', 'scheduled')]"/>
|
||||
<separator/>
|
||||
<filter string="Facility" name="group_facility"
|
||||
context="{'group_by': 'facility_id'}"/>
|
||||
<filter string="Status" name="group_state"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter string="Technician" name="group_technician"
|
||||
context="{'group_by': 'technician_id'}"/>
|
||||
<filter string="Scheduled Month" name="group_month"
|
||||
context="{'group_by': 'scheduled_date:month'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTIONS -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_ltc_cleanups" model="ir.actions.act_window">
|
||||
<field name="name">Cleanup Schedule</field>
|
||||
<field name="res_model">fusion.ltc.cleanup</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_cleanup_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No cleanups scheduled yet
|
||||
</p>
|
||||
<p>Cleanups are auto-scheduled based on facility settings, or can be created manually.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,299 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FACILITY - FORM VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_facility_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.facility.form</field>
|
||||
<field name="model">fusion.ltc.facility</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="LTC Facility">
|
||||
<header/>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" text="Archived" bg_color="text-bg-danger"
|
||||
invisible="active"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_repairs" type="object"
|
||||
class="oe_stat_button" icon="fa-wrench">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="active_repair_count"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Active Repairs</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_repairs" type="object"
|
||||
class="oe_stat_button" icon="fa-list">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="repair_count"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Total Repairs</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_cleanups" type="object"
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="cleanup_count"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Cleanups</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<field name="image_1920" widget="image" class="oe_avatar"
|
||||
options="{'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="Facility Name"/>
|
||||
</h1>
|
||||
<field name="code" readonly="1"/>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group string="Facility Details">
|
||||
<field name="partner_id"/>
|
||||
<field name="phone" widget="phone"/>
|
||||
<field name="email" widget="email"/>
|
||||
<field name="website" widget="url"/>
|
||||
</group>
|
||||
<group string="Address">
|
||||
<field name="street"/>
|
||||
<field name="street2"/>
|
||||
<field name="city"/>
|
||||
<field name="state_id"/>
|
||||
<field name="zip"/>
|
||||
<field name="country_id"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Key Contacts" name="contacts">
|
||||
<group>
|
||||
<group>
|
||||
<field name="director_of_care_id"/>
|
||||
<field name="service_supervisor_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="physiotherapist_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Floors & Stations" name="structure">
|
||||
<group>
|
||||
<field name="number_of_floors"/>
|
||||
</group>
|
||||
<field name="floor_ids">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="head_nurse_id"/>
|
||||
<field name="physiotherapist_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Nursing Stations" name="stations">
|
||||
<field name="floor_ids" mode="list">
|
||||
<list>
|
||||
<field name="name" string="Floor"/>
|
||||
<field name="station_ids" widget="many2many_tags" string="Stations"/>
|
||||
<field name="head_nurse_id"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
<page string="Contract" name="contract">
|
||||
<group>
|
||||
<group>
|
||||
<field name="contract_start_date"/>
|
||||
<field name="contract_end_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cleanup_frequency"/>
|
||||
<field name="cleanup_interval_days"
|
||||
invisible="cleanup_frequency != 'custom'"/>
|
||||
<field name="next_cleanup_date"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<separator string="Contract Document"/>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<field name="contract_file"
|
||||
filename="contract_file_filename"
|
||||
widget="binary" nolabel="1"/>
|
||||
<field name="contract_file_filename" invisible="1"/>
|
||||
<button name="action_preview_contract" type="object"
|
||||
class="btn btn-secondary"
|
||||
icon="fa-eye"
|
||||
string="Preview"
|
||||
invisible="not contract_file"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<field name="contract_notes" placeholder="Contract details and notes..."/>
|
||||
</page>
|
||||
|
||||
<page string="Notes" name="notes">
|
||||
<field name="notes"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FACILITY - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_facility_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.facility.list</field>
|
||||
<field name="model">fusion.ltc.facility</field>
|
||||
<field name="arch" type="xml">
|
||||
<list default_order="name">
|
||||
<field name="code" optional="show"/>
|
||||
<field name="name"/>
|
||||
<field name="city"/>
|
||||
<field name="phone" optional="show"/>
|
||||
<field name="director_of_care_id" optional="show"/>
|
||||
<field name="service_supervisor_id" optional="hide"/>
|
||||
<field name="number_of_floors" optional="hide"/>
|
||||
<field name="contract_start_date" optional="hide"/>
|
||||
<field name="contract_end_date" optional="hide"/>
|
||||
<field name="cleanup_frequency" optional="show"/>
|
||||
<field name="next_cleanup_date" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FACILITY - SEARCH VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_facility_search" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.facility.search</field>
|
||||
<field name="model">fusion.ltc.facility</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Facilities">
|
||||
<field name="name" string="Facility"/>
|
||||
<field name="code"/>
|
||||
<field name="city"/>
|
||||
<field name="director_of_care_id"/>
|
||||
<separator/>
|
||||
<filter string="Active" name="filter_active"
|
||||
domain="[('active', '=', True)]"/>
|
||||
<filter string="Archived" name="filter_archived"
|
||||
domain="[('active', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="Has Repairs" name="filter_has_repairs"
|
||||
domain="[('repair_ids', '!=', False)]"/>
|
||||
<filter string="Cleanup Due" name="filter_cleanup_due"
|
||||
domain="[('next_cleanup_date', '<=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
|
||||
('next_cleanup_date', '!=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="City" name="group_city" context="{'group_by': 'city'}"/>
|
||||
<filter string="Cleanup Frequency" name="group_frequency"
|
||||
context="{'group_by': 'cleanup_frequency'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- STATION - FORM VIEW (for inline editing within floors) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_station_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.station.form</field>
|
||||
<field name="model">fusion.ltc.station</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Nursing Station">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="head_nurse_id"/>
|
||||
<field name="phone" widget="phone"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- STATION - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_station_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.station.list</field>
|
||||
<field name="model">fusion.ltc.station</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Nursing Stations" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="floor_id"/>
|
||||
<field name="name"/>
|
||||
<field name="head_nurse_id"/>
|
||||
<field name="phone"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FLOOR - FORM VIEW (with embedded stations) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_floor_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.floor.form</field>
|
||||
<field name="model">fusion.ltc.floor</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Floor">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="facility_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="head_nurse_id"/>
|
||||
<field name="physiotherapist_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="station_ids">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="head_nurse_id"/>
|
||||
<field name="phone"/>
|
||||
</list>
|
||||
</field>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTIONS -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_ltc_facilities" model="ir.actions.act_window">
|
||||
<field name="name">LTC Facilities</field>
|
||||
<field name="res_model">fusion.ltc.facility</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_facility_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Add your first LTC Facility
|
||||
</p>
|
||||
<p>Create a facility record to start managing repairs and cleanups.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,148 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FORM SUBMISSION - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_form_submission_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.form.submission.list</field>
|
||||
<field name="model">fusion.ltc.form.submission</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Form Submissions" default_order="submitted_date desc"
|
||||
decoration-danger="is_emergency"
|
||||
decoration-info="status == 'submitted'"
|
||||
decoration-success="status == 'processed'">
|
||||
<field name="name"/>
|
||||
<field name="form_type"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="client_name"/>
|
||||
<field name="room_number"/>
|
||||
<field name="product_serial" optional="show"/>
|
||||
<field name="is_emergency"/>
|
||||
<field name="submitted_date"/>
|
||||
<field name="ip_address" optional="hide"/>
|
||||
<field name="repair_id" optional="show"/>
|
||||
<field name="status" widget="badge"
|
||||
decoration-info="status == 'submitted'"
|
||||
decoration-success="status == 'processed'"
|
||||
decoration-danger="status == 'rejected'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FORM SUBMISSION - FORM VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_form_submission_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.form.submission.form</field>
|
||||
<field name="model">fusion.ltc.form.submission</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Form Submission">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_repair" type="object"
|
||||
class="oe_stat_button" icon="fa-wrench"
|
||||
invisible="not repair_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Repair</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="form_type"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="client_name"/>
|
||||
<field name="room_number"/>
|
||||
<field name="product_serial"/>
|
||||
<field name="is_emergency"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="status"/>
|
||||
<field name="submitted_date"/>
|
||||
<field name="ip_address"/>
|
||||
<field name="repair_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FORM SUBMISSION - SEARCH VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_form_submission_search" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.form.submission.search</field>
|
||||
<field name="model">fusion.ltc.form.submission</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Submissions">
|
||||
<field name="name"/>
|
||||
<field name="client_name"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="room_number"/>
|
||||
<separator/>
|
||||
<filter string="Emergency" name="filter_emergency"
|
||||
domain="[('is_emergency', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Submitted" name="filter_submitted"
|
||||
domain="[('status', '=', 'submitted')]"/>
|
||||
<filter string="Processed" name="filter_processed"
|
||||
domain="[('status', '=', 'processed')]"/>
|
||||
<filter string="Rejected" name="filter_rejected"
|
||||
domain="[('status', '=', 'rejected')]"/>
|
||||
<separator/>
|
||||
<filter string="Today" name="filter_today"
|
||||
domain="[('submitted_date', '>=', (context_today()).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="This Week" name="filter_week"
|
||||
domain="[('submitted_date', '>=', (context_today() - datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="This Month" name="filter_month"
|
||||
domain="[('submitted_date', '>=', (context_today()).strftime('%Y-%m-01'))]"/>
|
||||
<separator/>
|
||||
<filter string="Facility" name="group_facility"
|
||||
context="{'group_by': 'facility_id'}"/>
|
||||
<filter string="Form Type" name="group_type"
|
||||
context="{'group_by': 'form_type'}"/>
|
||||
<filter string="Status" name="group_status"
|
||||
context="{'group_by': 'status'}"/>
|
||||
<filter string="Submitted Date" name="group_date"
|
||||
context="{'group_by': 'submitted_date:day'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTIONS -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_ltc_form_submissions" model="ir.actions.act_window">
|
||||
<field name="name">Form Submissions</field>
|
||||
<field name="res_model">fusion.ltc.form.submission</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_form_submission_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No form submissions yet
|
||||
</p>
|
||||
<p>Submissions from portal repair forms will appear here.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- SEQUENCE -->
|
||||
<data noupdate="1">
|
||||
<record id="seq_ltc_form_submission" model="ir.sequence">
|
||||
<field name="name">LTC Form Submission</field>
|
||||
<field name="code">fusion.ltc.form.submission</field>
|
||||
<field name="prefix">LTC-SUB-</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="number_next">1</field>
|
||||
<field name="number_increment">1</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</odoo>
|
||||
@@ -1,375 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- REPAIR - FORM VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_repair_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.form</field>
|
||||
<field name="model">fusion.ltc.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Repair Request">
|
||||
<header>
|
||||
<button name="action_create_sale_order" type="object"
|
||||
string="Create Sale Order" class="btn-primary"
|
||||
invisible="sale_order_id"/>
|
||||
<field name="stage_id" widget="statusbar"
|
||||
options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_sale_order" type="object"
|
||||
class="oe_stat_button" icon="fa-shopping-cart"
|
||||
invisible="not sale_order_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="sale_order_name"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sale Order</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_task" type="object"
|
||||
class="oe_stat_button" icon="fa-tasks"
|
||||
invisible="not task_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Task</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" text="Emergency" bg_color="text-bg-danger"
|
||||
invisible="not is_emergency"/>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group string="Repair Details">
|
||||
<field name="facility_id"/>
|
||||
<field name="client_id"/>
|
||||
<field name="client_name" invisible="client_id"/>
|
||||
<field name="room_number"/>
|
||||
<field name="is_emergency"/>
|
||||
<field name="priority" widget="priority"/>
|
||||
</group>
|
||||
<group string="Product & Assignment">
|
||||
<field name="product_serial"/>
|
||||
<field name="product_id"/>
|
||||
<field name="assigned_technician_id"/>
|
||||
<field name="source"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Issue" name="issue">
|
||||
<group>
|
||||
<group>
|
||||
<field name="issue_reported_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="issue_fixed_date"/>
|
||||
</group>
|
||||
</group>
|
||||
<label for="issue_description"/>
|
||||
<field name="issue_description"
|
||||
placeholder="Describe the issue in detail..."/>
|
||||
<label for="resolution_description"/>
|
||||
<field name="resolution_description"
|
||||
placeholder="How was the issue resolved?"/>
|
||||
</page>
|
||||
|
||||
<page string="Family/POA" name="poa">
|
||||
<group>
|
||||
<group>
|
||||
<field name="poa_name"/>
|
||||
<field name="poa_phone" widget="phone"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Financial" name="financial">
|
||||
<group>
|
||||
<group>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="task_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="repair_value"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Photos & Notes" name="photos">
|
||||
<div class="fc-gallery-content">
|
||||
<separator string="Before Photos (Reported Condition)"/>
|
||||
<field name="before_photo_ids" widget="many2many_binary"/>
|
||||
<separator string="After Photos (Completed Repair)"/>
|
||||
<field name="after_photo_ids" widget="many2many_binary"/>
|
||||
</div>
|
||||
<field name="photo_ids" invisible="1"/>
|
||||
<separator string="Internal Notes"/>
|
||||
<field name="notes" placeholder="Internal notes..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- REPAIR - KANBAN VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_repair_kanban" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.kanban</field>
|
||||
<field name="model">fusion.ltc.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="stage_id"
|
||||
default_order="is_emergency desc, issue_reported_date desc"
|
||||
highlight_color="color"
|
||||
class="o_kanban_small_column">
|
||||
<field name="color"/>
|
||||
<field name="is_emergency"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="kanban_state"/>
|
||||
<field name="stage_color"/>
|
||||
<progressbar field="kanban_state"
|
||||
colors='{"normal": "200", "done": "success", "blocked": "danger"}'/>
|
||||
<templates>
|
||||
<t t-name="menu">
|
||||
<a t-if="widget.editable" role="menuitem" type="open"
|
||||
class="dropdown-item">Edit</a>
|
||||
<a t-if="widget.deletable" role="menuitem" type="delete"
|
||||
class="dropdown-item">Delete</a>
|
||||
<field widget="kanban_color_picker" name="color"/>
|
||||
</t>
|
||||
<t t-name="card" class="flex-row">
|
||||
<main t-att-data-stage="record.stage_color.raw_value || 'secondary'"
|
||||
t-att-data-emergency="record.is_emergency.raw_value ? '1' : '0'"
|
||||
t-att-data-priority="record.priority.raw_value">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<field name="name" class="fw-bold text-primary"/>
|
||||
<span t-attf-style="#{record.priority.raw_value == '1' ? 'background: rgba(255,152,0,0.1); border-radius: 4px; padding: 1px 5px;' : ''}">
|
||||
<field name="priority" widget="priority"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-1">
|
||||
<span class="fw-bold">
|
||||
<field name="display_client_name"/>
|
||||
</span>
|
||||
<span t-if="record.room_number.raw_value"
|
||||
class="ms-1 badge text-bg-light">
|
||||
Rm <field name="room_number"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-muted small">
|
||||
<field name="facility_id"/>
|
||||
</div>
|
||||
<div t-if="record.is_emergency.raw_value"
|
||||
class="mt-1">
|
||||
<span class="badge text-bg-danger">
|
||||
<i class="fa fa-exclamation-triangle me-1"/>Emergency
|
||||
</span>
|
||||
</div>
|
||||
<div t-if="record.product_serial.raw_value"
|
||||
class="text-muted small mt-1">
|
||||
<i class="fa fa-barcode me-1"/>S/N: <field name="product_serial"/>
|
||||
</div>
|
||||
<footer class="mt-2 pt-1 border-top">
|
||||
<span class="text-muted small">
|
||||
<i class="fa fa-calendar me-1"/><field name="issue_reported_date"/>
|
||||
</span>
|
||||
<div class="ms-auto d-flex align-items-center">
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
<field name="assigned_technician_id"
|
||||
widget="many2one_avatar_user"
|
||||
class="ms-1"/>
|
||||
</div>
|
||||
</footer>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- REPAIR - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_repair_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.list</field>
|
||||
<field name="model">fusion.ltc.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Repair Requests" default_order="issue_reported_date desc"
|
||||
decoration-danger="is_emergency">
|
||||
<field name="stage_color" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="display_client_name" string="Client"/>
|
||||
<field name="room_number"/>
|
||||
<field name="product_serial" optional="show"/>
|
||||
<field name="issue_reported_date"/>
|
||||
<field name="issue_fixed_date" optional="show"/>
|
||||
<field name="stage_id" widget="badge"
|
||||
decoration-info="stage_color == 'info'"
|
||||
decoration-warning="stage_color == 'warning'"
|
||||
decoration-success="stage_color == 'success'"
|
||||
decoration-danger="stage_color == 'danger'"
|
||||
optional="show"/>
|
||||
<field name="is_emergency" string="Emergency" optional="show"
|
||||
widget="boolean_toggle"/>
|
||||
<field name="assigned_technician_id" widget="many2one_avatar_user"
|
||||
optional="show"/>
|
||||
<field name="sale_order_id" optional="hide"/>
|
||||
<field name="repair_value" optional="hide"/>
|
||||
<field name="source" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- REPAIR - SEARCH VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_repair_search" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.search</field>
|
||||
<field name="model">fusion.ltc.repair</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Repairs">
|
||||
<field name="name"/>
|
||||
<field name="display_client_name" string="Client"/>
|
||||
<field name="room_number"/>
|
||||
<field name="product_serial"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="assigned_technician_id"/>
|
||||
<separator/>
|
||||
<filter string="Emergency" name="filter_emergency"
|
||||
domain="[('is_emergency', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="New" name="filter_new"
|
||||
domain="[('stage_id.sequence', '=', 1)]"/>
|
||||
<filter string="In Progress" name="filter_in_progress"
|
||||
domain="[('stage_id.fold', '=', False), ('stage_id.sequence', '>', 1)]"/>
|
||||
<filter string="Completed" name="filter_completed"
|
||||
domain="[('stage_id.fold', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Has Sale Order" name="filter_has_so"
|
||||
domain="[('sale_order_id', '!=', False)]"/>
|
||||
<filter string="No Sale Order" name="filter_no_so"
|
||||
domain="[('sale_order_id', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="This Month" name="filter_this_month"
|
||||
domain="[('issue_reported_date', '>=', (context_today()).strftime('%Y-%m-01'))]"/>
|
||||
<filter string="Last 30 Days" name="filter_30d"
|
||||
domain="[('issue_reported_date', '>=', (context_today() - datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="This Year" name="filter_this_year"
|
||||
domain="[('issue_reported_date', '>=', (context_today()).strftime('%Y-01-01'))]"/>
|
||||
<separator/>
|
||||
<filter string="Facility" name="group_facility"
|
||||
context="{'group_by': 'facility_id'}"/>
|
||||
<filter string="Stage" name="group_stage"
|
||||
context="{'group_by': 'stage_id'}"/>
|
||||
<filter string="Technician" name="group_technician"
|
||||
context="{'group_by': 'assigned_technician_id'}"/>
|
||||
<filter string="Source" name="group_source"
|
||||
context="{'group_by': 'source'}"/>
|
||||
<filter string="Reported Month" name="group_month"
|
||||
context="{'group_by': 'issue_reported_date:month'}"/>
|
||||
<filter string="Fixed Month" name="group_fixed_month"
|
||||
context="{'group_by': 'issue_fixed_date:month'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- REPAIR STAGE - LIST + FORM (Configuration) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_ltc_repair_stage_list" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.stage.list</field>
|
||||
<field name="model">fusion.ltc.repair.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Repair Stages" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="color"/>
|
||||
<field name="fold"/>
|
||||
<field name="description" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_ltc_repair_stage_form" model="ir.ui.view">
|
||||
<field name="name">fusion.ltc.repair.stage.form</field>
|
||||
<field name="model">fusion.ltc.repair.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Repair Stage">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="color"/>
|
||||
<field name="fold"/>
|
||||
<field name="description"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTIONS -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_ltc_repairs_kanban" model="ir.actions.act_window">
|
||||
<field name="name">Repair Overview</field>
|
||||
<field name="res_model">fusion.ltc.repair</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_repair_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No repair requests yet
|
||||
</p>
|
||||
<p>Repair requests submitted via the portal form or manually will appear here.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_ltc_repairs_all" model="ir.actions.act_window">
|
||||
<field name="name">All Repairs</field>
|
||||
<field name="res_model">fusion.ltc.repair</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_repair_search"/>
|
||||
</record>
|
||||
|
||||
<record id="action_ltc_repairs_new" model="ir.actions.act_window">
|
||||
<field name="name">New / Pending</field>
|
||||
<field name="res_model">fusion.ltc.repair</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_repair_search"/>
|
||||
<field name="domain">[('stage_id.sequence', '<=', 2)]</field>
|
||||
</record>
|
||||
|
||||
<record id="action_ltc_repairs_in_progress" model="ir.actions.act_window">
|
||||
<field name="name">In Progress</field>
|
||||
<field name="res_model">fusion.ltc.repair</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_repair_search"/>
|
||||
<field name="domain">[('stage_id.fold', '=', False), ('stage_id.sequence', '>', 2)]</field>
|
||||
</record>
|
||||
|
||||
<record id="action_ltc_repairs_completed" model="ir.actions.act_window">
|
||||
<field name="name">Completed</field>
|
||||
<field name="res_model">fusion.ltc.repair</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_ltc_repair_search"/>
|
||||
<field name="domain">[('stage_id.fold', '=', True)]</field>
|
||||
</record>
|
||||
|
||||
<record id="action_ltc_repair_stages" model="ir.actions.act_window">
|
||||
<field name="name">Repair Stages</field>
|
||||
<field name="res_model">fusion.ltc.repair.stage</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
89
fusion_claims/views/page11_sign_request_views.xml
Normal file
89
fusion_claims/views/page11_sign_request_views.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_page11_sign_request_list" model="ir.ui.view">
|
||||
<field name="name">fusion.page11.sign.request.list</field>
|
||||
<field name="model">fusion.page11.sign.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="signer_name"/>
|
||||
<field name="signer_email"/>
|
||||
<field name="signer_type"/>
|
||||
<field name="sent_date"/>
|
||||
<field name="signed_date"/>
|
||||
<field name="expiry_date"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-success="state == 'signed'"
|
||||
decoration-info="state == 'sent'"
|
||||
decoration-warning="state == 'expired'"
|
||||
decoration-danger="state == 'cancelled'"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_page11_sign_request_form" model="ir.ui.view">
|
||||
<field name="name">fusion.page11.sign.request.form</field>
|
||||
<field name="model">fusion.page11.sign.request</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Page 11 Signing Request">
|
||||
<header>
|
||||
<button name="action_resend" type="object" string="Resend Email"
|
||||
class="btn-primary" invisible="state not in ('sent', 'expired')"/>
|
||||
<button name="action_request_new_signature" type="object"
|
||||
string="Request New Signature"
|
||||
class="btn-warning" invisible="state not in ('signed', 'cancelled')"
|
||||
confirm="This will cancel the current signed version and open a new signing request. Continue?"/>
|
||||
<button name="action_cancel" type="object" string="Cancel"
|
||||
class="btn-secondary" invisible="state not in ('draft', 'sent')"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,sent,signed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group string="Request Details">
|
||||
<field name="sale_order_id" readonly="1"/>
|
||||
<field name="signer_name"/>
|
||||
<field name="signer_email"/>
|
||||
<field name="signer_type"/>
|
||||
<field name="signer_relationship"
|
||||
invisible="signer_type == 'client'"/>
|
||||
</group>
|
||||
<group string="Dates">
|
||||
<field name="sent_date" readonly="1"/>
|
||||
<field name="expiry_date"/>
|
||||
<field name="signed_date" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Consent" invisible="state != 'signed'">
|
||||
<field name="consent_signed_by"/>
|
||||
<field name="consent_declaration_accepted"/>
|
||||
</group>
|
||||
<group string="Agent Details"
|
||||
invisible="consent_signed_by != 'agent' or state != 'signed'">
|
||||
<group>
|
||||
<field name="agent_first_name"/>
|
||||
<field name="agent_last_name"/>
|
||||
<field name="agent_phone"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="agent_street"/>
|
||||
<field name="agent_city"/>
|
||||
<field name="agent_province"/>
|
||||
<field name="agent_postal_code"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Signature" invisible="state != 'signed'">
|
||||
<field name="signature_data" widget="image" readonly="1"/>
|
||||
</group>
|
||||
<group string="Signed PDF" invisible="state != 'signed' or not signed_pdf">
|
||||
<field name="signed_pdf" filename="signed_pdf_filename"/>
|
||||
<field name="signed_pdf_filename" invisible="1"/>
|
||||
</group>
|
||||
<group string="Custom Message" invisible="not custom_message">
|
||||
<field name="custom_message" readonly="1" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -194,26 +194,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>External APIs</h2>
|
||||
|
||||
<div class="row mt-4 o_settings_container">
|
||||
<!-- Google Maps API Key -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Google Maps API</span>
|
||||
<div class="text-muted">
|
||||
API key for Google Maps Places autocomplete in address fields (accessibility assessments, etc.)
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<field name="fc_google_maps_api_key" placeholder="Enter your Google Maps API Key" password="True"/>
|
||||
</div>
|
||||
<div class="alert alert-info mt-2" role="alert">
|
||||
<i class="fa fa-info-circle"/> Enable the "Places API" in your Google Cloud Console for address autocomplete.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>AI Client Intelligence</h2>
|
||||
|
||||
<div class="row mt-4 o_settings_container">
|
||||
@@ -256,117 +236,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Technician Management</h2>
|
||||
|
||||
<div class="row mt-4 o_settings_container">
|
||||
<!-- Store Hours -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Store / Scheduling Hours</span>
|
||||
<div class="text-muted">
|
||||
Operating hours for technician task scheduling. Tasks can only be booked
|
||||
within these hours. Calendar view is also restricted to this range.
|
||||
</div>
|
||||
<div class="mt-2 d-flex align-items-center gap-2">
|
||||
<field name="fc_store_open_hour" widget="float_time" style="max-width: 100px;"/>
|
||||
<span>to</span>
|
||||
<field name="fc_store_close_hour" widget="float_time" style="max-width: 100px;"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Distance Matrix Toggle -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="fc_google_distance_matrix_enabled"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="fc_google_distance_matrix_enabled"/>
|
||||
<div class="text-muted">
|
||||
Calculate travel time between technician tasks using Google Distance Matrix API.
|
||||
Requires Google Maps API key above with Distance Matrix API enabled.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start Address (Company Default / Fallback) -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Default HQ / Fallback Address</span>
|
||||
<div class="text-muted">
|
||||
Company default start location used when a technician has no personal
|
||||
start address set. Each technician can set their own start location
|
||||
in their user profile or from the portal.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<field name="fc_technician_start_address" placeholder="e.g. 123 Main St, Brampton, ON"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Location History Retention -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Location History Retention</span>
|
||||
<div class="text-muted">
|
||||
How many days to keep technician GPS location history before automatic cleanup.
|
||||
</div>
|
||||
<div class="mt-2 d-flex align-items-center gap-2">
|
||||
<field name="fc_location_retention_days" placeholder="30" style="max-width: 80px;"/>
|
||||
<span class="text-muted">days</span>
|
||||
</div>
|
||||
<div class="text-muted small mt-1">
|
||||
Leave empty = 30 days. Enter 0 = delete at end of each day. 1+ = keep that many days.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Push Notifications</h2>
|
||||
|
||||
<div class="row mt-4 o_settings_container">
|
||||
<!-- Push Enable -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="fc_push_enabled"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="fc_push_enabled"/>
|
||||
<div class="text-muted">
|
||||
Send web push notifications to technicians about upcoming tasks.
|
||||
Requires VAPID keys (auto-generated on first save if empty).
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Advance Minutes -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Notification Advance Time</span>
|
||||
<div class="text-muted">
|
||||
Send push notification this many minutes before a scheduled task.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<field name="fc_push_advance_minutes"/> minutes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- VAPID Public Key -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">VAPID Public Key</span>
|
||||
<div class="mt-2">
|
||||
<field name="fc_vapid_public_key" placeholder="Auto-generated"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- VAPID Private Key -->
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">VAPID Private Key</span>
|
||||
<div class="mt-2">
|
||||
<field name="fc_vapid_private_key" password="True" placeholder="Auto-generated"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>March of Dimes</h2>
|
||||
|
||||
<div class="row mt-4 o_settings_container">
|
||||
@@ -501,25 +370,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== PORTAL FORMS ===== -->
|
||||
<h2>Portal Forms</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">LTC Form Access Password</span>
|
||||
<div class="text-muted">
|
||||
Set a password to protect the public LTC repair form.
|
||||
Share this with facility staff so they can submit repair requests.
|
||||
Minimum 4 characters. Leave empty to allow unrestricted access.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<field name="fc_ltc_form_password"
|
||||
placeholder="e.g. 1234"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== PORTAL BRANDING ===== -->
|
||||
<h2>Portal Branding</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
|
||||
@@ -16,32 +16,6 @@
|
||||
<field name="x_fc_contact_type" placeholder="Select contact type..."/>
|
||||
</xpath>
|
||||
|
||||
<!-- LTC section in notebook -->
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="LTC Home" name="ltc_info"
|
||||
invisible="x_fc_contact_type not in ('long_term_care_home',)">
|
||||
<group string="LTC Facility Information">
|
||||
<group>
|
||||
<field name="x_fc_ltc_facility_id"/>
|
||||
<field name="x_fc_ltc_room_number"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Family Contacts">
|
||||
<field name="x_fc_ltc_family_contact_ids" nolabel="1">
|
||||
<list editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="relationship"/>
|
||||
<field name="phone"/>
|
||||
<field name="phone2"/>
|
||||
<field name="email"/>
|
||||
<field name="is_poa"/>
|
||||
<field name="notes" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<!-- ODSP section in notebook -->
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="ODSP" name="odsp_info"
|
||||
@@ -97,8 +71,6 @@
|
||||
domain="[('x_fc_contact_type', 'in', ['odsp_customer', 'adp_odsp_customer'])]"/>
|
||||
<filter name="filter_odsp_office" string="ODSP Offices"
|
||||
domain="[('x_fc_contact_type', '=', 'odsp_office')]"/>
|
||||
<filter name="filter_ltc_home" string="LTC Homes"
|
||||
domain="[('x_fc_contact_type', '=', 'long_term_care_home')]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -2467,28 +2467,6 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Reorder: Customer first -->
|
||||
<xpath expr="//field[@name='name']" position="before">
|
||||
<field name="partner_id" string="Customer"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id'][@operator='child_of']" position="replace"/>
|
||||
|
||||
<!-- Add Fusion-specific search fields after base fields -->
|
||||
<xpath expr="//field[@name='activity_type_id']" position="after">
|
||||
<field name="x_fc_claim_number" string="Claim Number"/>
|
||||
<field name="x_fc_authorizer_id" string="Authorizer"/>
|
||||
<field name="x_fc_sale_type" string="Sale Type"/>
|
||||
<field name="x_fc_adp_application_status" string="ADP Status"/>
|
||||
<field name="state" string="Order Status"/>
|
||||
<field name="tag_ids" string="Tags"/>
|
||||
<field name="partner_shipping_id" string="Delivery Name/Address"
|
||||
filter_domain="['|', '|', '|',
|
||||
('partner_shipping_id.name', 'ilike', self),
|
||||
('partner_shipping_id.street', 'ilike', self),
|
||||
('partner_shipping_id.street2', 'ilike', self),
|
||||
('partner_shipping_id.city', 'ilike', self)]"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//search" position="inside">
|
||||
<separator/>
|
||||
<!-- ADP Status Filters (using x_fc_adp_application_status) -->
|
||||
|
||||
@@ -1,416 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2024-2025 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Part of the Fusion Claim Assistant product family.
|
||||
|
||||
Portal template overrides for ADP orders:
|
||||
- Shows client portion in sidebar instead of full order total
|
||||
- Displays ADP claim details (Client Type, Authorizer, Dates, etc.)
|
||||
- Payment amount selector shows client portion
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================
|
||||
1. SIDEBAR: Show client portion instead of full amount
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_sidebar_adp"
|
||||
inherit_id="sale.sale_order_portal_template"
|
||||
name="Fusion: ADP Sidebar Amount">
|
||||
|
||||
<!-- Replace the data attribute with client portion for ADP -->
|
||||
<xpath expr="//div[hasclass('o_portal_sale_sidebar')]" position="attributes">
|
||||
<attribute name="t-att-data-order-amount-total">
|
||||
sale_order.x_fc_client_portion_total if sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG' else sale_order.amount_total
|
||||
</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Replace the sidebar title (amount display) -->
|
||||
<xpath expr="//div[hasclass('o_portal_sale_sidebar')]//t[@t-set='title']" position="replace">
|
||||
<t t-set="title">
|
||||
<!-- ADP REG: show client portion -->
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG'">
|
||||
<small class="text-muted d-block">Your Portion</small>
|
||||
<h2 class="mb-0 text-break">
|
||||
<t t-out="sale_order.x_fc_client_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
</h2>
|
||||
</t>
|
||||
<!-- ADP non-REG (100% funded): no payment needed -->
|
||||
<t t-elif="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type and sale_order.x_fc_client_type != 'REG'">
|
||||
<small class="text-muted d-block">Fully ADP Funded</small>
|
||||
<h2 class="mb-0 text-break text-success">$ 0.00</h2>
|
||||
</t>
|
||||
<!-- Standard Odoo behavior for non-ADP -->
|
||||
<t t-elif="sale_order._has_to_be_paid() and sale_order.prepayment_percent != 1.0">
|
||||
<h4>Down payment</h4>
|
||||
<h2>
|
||||
<t t-out="sale_order._get_prepayment_required_amount()"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
(<t t-out="sale_order.prepayment_percent * 100"/>%)
|
||||
</h2>
|
||||
</t>
|
||||
<h2 t-else="" t-field="sale_order.amount_total" class="mb-0 text-break"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
2. CONTENT: Show ADP claim details + funding breakdown
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_content_adp"
|
||||
inherit_id="sale.sale_order_portal_content"
|
||||
name="Fusion: ADP Details on Portal">
|
||||
|
||||
<!-- Add ADP details section after sale_info -->
|
||||
<xpath expr="//div[@id='sale_info']" position="after">
|
||||
<t t-if="sale_order.x_fc_is_adp_sale">
|
||||
<div class="col-12 col-lg-6 mb-4">
|
||||
<h5 class="mb-1">ADP Claim Details</h5>
|
||||
<hr class="mt-1 mb-2"/>
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody style="white-space:nowrap">
|
||||
<tr t-if="sale_order.x_fc_client_type">
|
||||
<th class="ps-0 pb-0">Client Type:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_client_type"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_claim_number">
|
||||
<th class="ps-0 pb-0">Claim Number:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_claim_number"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_authorizer_id">
|
||||
<th class="ps-0 pb-0">Authorizer:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_authorizer_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_client_ref_1">
|
||||
<th class="ps-0 pb-0">Client Ref 1:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_client_ref_1"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_client_ref_2">
|
||||
<th class="ps-0 pb-0">Client Ref 2:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_client_ref_2"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_assessment_end_date">
|
||||
<th class="ps-0 pb-0">Assessment Date:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_assessment_end_date"
|
||||
t-options="{'widget': 'date'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_claim_authorization_date">
|
||||
<th class="ps-0 pb-0">Authorization Date:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_claim_authorization_date"
|
||||
t-options="{'widget': 'date'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_claim_approval_date">
|
||||
<th class="ps-0 pb-0">Approval Date:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_claim_approval_date"
|
||||
t-options="{'widget': 'date'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="sale_order.x_fc_adp_delivery_date">
|
||||
<th class="ps-0 pb-0">Delivery Date:</th>
|
||||
<td class="w-100 pb-0 text-wrap">
|
||||
<span t-field="sale_order.x_fc_adp_delivery_date"
|
||||
t-options="{'widget': 'date'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<!-- Add funding breakdown before totals -->
|
||||
<xpath expr="//div[@id='total']" position="before">
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG'">
|
||||
<div class="alert alert-info mb-3 py-2">
|
||||
<strong>ADP Assisted Devices Program Order</strong><br/>
|
||||
This order is partially funded through ADP.<br/>
|
||||
<strong>Your portion:</strong>
|
||||
<span t-esc="sale_order.x_fc_client_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
<span class="text-muted ms-2">
|
||||
(ADP covers
|
||||
<span t-esc="sale_order.x_fc_adp_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>)
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type and sale_order.x_fc_client_type != 'REG'">
|
||||
<div class="alert alert-success mb-3 py-2">
|
||||
<strong>ADP Assisted Devices Program Order</strong><br/>
|
||||
This order is fully funded through ADP. No payment is required from you.
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
3. PAYMENT MODAL: Show client portion in amount selector
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_pay_amount_adp"
|
||||
inherit_id="sale.sale_order_portal_pay_modal_amount_selector"
|
||||
name="Fusion: ADP Payment Amount Selector">
|
||||
<xpath expr="//button[@name='o_sale_portal_amount_total_button']" position="replace">
|
||||
<button name="o_sale_portal_amount_total_button" class="btn btn-light">
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG'">
|
||||
Client Portion <br/>
|
||||
<span
|
||||
t-out="sale_order.x_fc_client_portion_total"
|
||||
t-options="{
|
||||
'widget': 'monetary',
|
||||
'display_currency': sale_order.currency_id,
|
||||
}"
|
||||
class="fw-bold"
|
||||
/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
Full amount <br/>
|
||||
<span
|
||||
t-out="sale_order.amount_total"
|
||||
t-options="{
|
||||
'widget': 'monetary',
|
||||
'display_currency': sale_order.currency_id,
|
||||
}"
|
||||
class="fw-bold"
|
||||
/>
|
||||
</t>
|
||||
</button>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
4. PAY MODAL: Fix confirmation text for ADP orders
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_pay_modal_adp"
|
||||
inherit_id="sale.sale_order_portal_pay_modal"
|
||||
name="Fusion: ADP Pay Modal Confirmation Text">
|
||||
<xpath expr="//div[hasclass('mb-3')][.//b[@data-id='total_amount']]" position="replace">
|
||||
<div t-if="sale_order._has_to_be_paid()" class="mb-3">
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG'">
|
||||
By paying
|
||||
<span t-out="sale_order.x_fc_client_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"
|
||||
class="fw-bold"/>,
|
||||
you confirm acceptance on behalf of
|
||||
<b t-field="sale_order.partner_id.commercial_partner_id"/>
|
||||
for quotation <b t-field="sale_order.name"/>.
|
||||
This payment covers your client portion. The remaining
|
||||
<span t-out="sale_order.x_fc_adp_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"
|
||||
class="fw-bold"/>
|
||||
is funded by ADP.
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span t-if="sale_order.prepayment_percent and sale_order.prepayment_percent != 1.0">
|
||||
<span id="o_sale_portal_use_amount_prepayment">
|
||||
By paying a <u>down payment</u> of
|
||||
<span t-out="amount"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"
|
||||
class="fw-bold"/>
|
||||
<t t-if="sale_order._get_prepayment_required_amount() == amount">
|
||||
(<b t-esc="sale_order.prepayment_percent * 100"/>%),
|
||||
</t>
|
||||
</span>
|
||||
<span id="o_sale_portal_use_amount_total">By paying,</span>
|
||||
</span>
|
||||
<span t-else="">
|
||||
By paying
|
||||
<span t-out="amount"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"
|
||||
class="fw-bold"/>,
|
||||
</span>
|
||||
you confirm acceptance on behalf of
|
||||
<b t-field="sale_order.partner_id.commercial_partner_id"/>
|
||||
for the <b data-id="total_amount" t-field="sale_order.amount_total"/> quote.
|
||||
</t>
|
||||
<b t-if="sale_order.payment_term_id"
|
||||
t-field="sale_order.payment_term_id.note"
|
||||
class="o_sale_payment_terms"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
5. SIGN MODAL: Fix confirmation text for ADP orders
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_sign_modal_adp"
|
||||
inherit_id="sale.sale_order_portal_sign_modal"
|
||||
name="Fusion: ADP Sign Modal Confirmation Text">
|
||||
<xpath expr="//main[@id='sign-dialog']/span[.//b[@data-id='total_amount']]" position="replace">
|
||||
<span>
|
||||
<t t-if="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type == 'REG'">
|
||||
By signing, you confirm acceptance on behalf of
|
||||
<b t-field="sale_order.partner_id.commercial_partner_id"/>
|
||||
for quotation <b t-field="sale_order.name"/>.
|
||||
Your client portion is
|
||||
<b t-out="sale_order.x_fc_client_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>.
|
||||
The remaining
|
||||
<span t-out="sale_order.x_fc_adp_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
is funded by ADP.
|
||||
</t>
|
||||
<t t-elif="sale_order.x_fc_is_adp_sale and sale_order.x_fc_client_type and sale_order.x_fc_client_type != 'REG'">
|
||||
By signing, you confirm acceptance on behalf of
|
||||
<b t-field="sale_order.partner_id.commercial_partner_id"/>
|
||||
for quotation <b t-field="sale_order.name"/>.
|
||||
This order is fully funded by ADP.
|
||||
</t>
|
||||
<t t-else="">
|
||||
By signing, you confirm acceptance on behalf of
|
||||
<b t-field="sale_order.partner_id.commercial_partner_id"/>
|
||||
for the <b data-id="total_amount" t-field="sale_order.amount_total"/> quote.
|
||||
</t>
|
||||
</span>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
6. PORTAL TABLE: ADP table with borders, device code, portions
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_table_adp"
|
||||
inherit_id="sale.sale_order_portal_content"
|
||||
name="Fusion: ADP Portal Table with Borders and Columns">
|
||||
|
||||
<!-- Hide original table for ADP orders -->
|
||||
<xpath expr="//div[@name='sol_table']" position="attributes">
|
||||
<attribute name="t-if">not sale_order.x_fc_is_adp_sale</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Add ADP-specific table after the original -->
|
||||
<xpath expr="//div[@name='sol_table']" position="after">
|
||||
<div t-if="sale_order.x_fc_is_adp_sale" name="sol_table_adp" class="table-responsive">
|
||||
<style>
|
||||
.fc-adp-portal th { font-size: 0.78rem !important; white-space: nowrap; }
|
||||
.fc-adp-portal td { font-size: 0.82rem !important; }
|
||||
.fc-adp-portal .adp-col-bg { background-color: #f5faff; }
|
||||
.fc-adp-portal .client-col-bg { background-color: #fffaf0; }
|
||||
</style>
|
||||
<table class="table table-sm table-bordered fc-adp-portal"
|
||||
id="sales_order_table"
|
||||
t-att-data-order-id="sale_order.id"
|
||||
t-att-data-token="sale_order.access_token">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th class="text-center" style="width: 9%;">ADP Code</th>
|
||||
<th class="text-start" id="product_name_header">Products</th>
|
||||
<th class="text-end" id="product_qty_header">Quantity</th>
|
||||
<th class="text-end d-none d-sm-table-cell" id="product_unit_price_header">Unit Price</th>
|
||||
<th t-if="display_taxes" class="text-end d-none d-md-table-cell">Taxes</th>
|
||||
<th class="text-end" style="background-color: #e3f2fd;">ADP Portion</th>
|
||||
<th class="text-end" style="background-color: #fff3e0;">Client Portion</th>
|
||||
<th class="text-end" id="product_total_header">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="adp_total_cols" t-value="8 - (0 if display_taxes else 1)"/>
|
||||
<t t-foreach="lines_to_report" t-as="line">
|
||||
<!-- Section Header -->
|
||||
<tr t-if="line.display_type == 'line_section'" name="tr_section" class="bg-200 fw-bold">
|
||||
<td t-att-colspan="adp_total_cols" name="td_section_line">
|
||||
<span t-field="line.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Note Line -->
|
||||
<tr t-elif="line.display_type == 'line_note'" name="tr_note" class="fst-italic text-muted">
|
||||
<td t-att-colspan="adp_total_cols" name="td_note_line">
|
||||
<span t-field="line.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Product Line -->
|
||||
<tr t-elif="not line.display_type" name="tr_product">
|
||||
<td class="text-center">
|
||||
<span t-esc="line.product_id.x_fc_adp_device_code or ''"/>
|
||||
</td>
|
||||
<td name="td_product_name">
|
||||
<span t-field="line.name"/>
|
||||
</td>
|
||||
<td name="td_product_quantity" class="text-end">
|
||||
<div id="quote_qty">
|
||||
<span t-field="line.product_uom_qty"/>
|
||||
<span t-field="line.product_uom_id"/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end d-none d-sm-table-cell">
|
||||
<span t-field="line.price_unit"
|
||||
t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
|
||||
</td>
|
||||
<td t-if="display_taxes" class="text-end d-none d-md-table-cell">
|
||||
<span t-out="', '.join(map(lambda x: (x.name), line.tax_ids))"/>
|
||||
</td>
|
||||
<td class="text-end adp-col-bg">
|
||||
<span t-field="line.x_fc_adp_portion"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
</td>
|
||||
<td class="text-end client-col-bg">
|
||||
<span t-field="line.x_fc_client_portion"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
</td>
|
||||
<td t-if="not line.is_downpayment" name="td_product_subtotal" class="text-end">
|
||||
<span t-field="line.price_subtotal"/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- ================================================================
|
||||
7. PORTAL TOTALS: ADP/Client portion subtotals
|
||||
================================================================ -->
|
||||
<template id="sale_order_portal_totals_adp"
|
||||
inherit_id="sale.sale_order_portal_content_totals_table"
|
||||
name="Fusion: ADP Portal Totals">
|
||||
<xpath expr="//table[@name='sale_order_totals_table']" position="before">
|
||||
<t t-if="sale_order.x_fc_is_adp_sale">
|
||||
<table class="table table-sm table-bordered mb-1">
|
||||
<tr style="background-color: #e3f2fd;">
|
||||
<td class="ps-2"><strong>Total ADP Portion</strong></td>
|
||||
<td class="text-end pe-2">
|
||||
<strong>
|
||||
<span t-field="sale_order.x_fc_adp_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #fff3e0;">
|
||||
<td class="ps-2"><strong>Total Client Portion</strong></td>
|
||||
<td class="text-end pe-2">
|
||||
<strong>
|
||||
<span t-field="sale_order.x_fc_client_portion_total"
|
||||
t-options="{'widget': 'monetary', 'display_currency': sale_order.currency_id}"/>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath expr="//table[@name='sale_order_totals_table']" position="attributes">
|
||||
<attribute name="t-att-class">'table table-sm' + (' table-bordered' if sale_order.x_fc_is_adp_sale else '')</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SYNC CONFIG - FORM VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_task_sync_config_form" model="ir.ui.view">
|
||||
<field name="name">fusion.task.sync.config.form</field>
|
||||
<field name="model">fusion.task.sync.config</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Task Sync Configuration">
|
||||
<header>
|
||||
<button name="action_test_connection" type="object"
|
||||
string="Test Connection" class="btn-secondary" icon="fa-plug"/>
|
||||
<button name="action_sync_now" type="object"
|
||||
string="Sync Now" class="btn-success" icon="fa-sync"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" placeholder="e.g. Westin Healthcare"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Connection">
|
||||
<field name="instance_id" placeholder="e.g. westin"/>
|
||||
<field name="url" placeholder="http://192.168.1.40:8069"/>
|
||||
<field name="database" placeholder="e.g. westin-v19"/>
|
||||
<field name="username" placeholder="e.g. admin"/>
|
||||
<field name="api_key" password="True"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group string="Status">
|
||||
<field name="last_sync"/>
|
||||
<field name="last_sync_error" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<div class="alert alert-info mt-3">
|
||||
<i class="fa fa-info-circle"/>
|
||||
Technicians are matched across instances by their
|
||||
<strong>Tech Sync ID</strong> field (Settings > Users).
|
||||
Set the same ID (e.g. "gordy") on both instances for each shared technician.
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SYNC CONFIG - LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_task_sync_config_list" model="ir.ui.view">
|
||||
<field name="name">fusion.task.sync.config.list</field>
|
||||
<field name="model">fusion.task.sync.config</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="instance_id"/>
|
||||
<field name="url"/>
|
||||
<field name="database"/>
|
||||
<field name="active"/>
|
||||
<field name="last_sync"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SYNC CONFIG - ACTION + MENU -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_task_sync_config" model="ir.actions.act_window">
|
||||
<field name="name">Task Sync Instances</field>
|
||||
<field name="res_model">fusion.task.sync.config</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_task_sync_config"
|
||||
name="Task Sync"
|
||||
parent="fusion_claims.menu_technician_schedule"
|
||||
action="action_task_sync_config"
|
||||
sequence="99"/>
|
||||
|
||||
</odoo>
|
||||
@@ -1,128 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_location_list" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.location.list</field>
|
||||
<field name="model">fusion.technician.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Technician Locations" create="0" edit="0"
|
||||
default_order="logged_at desc">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<field name="logged_at" string="Time"/>
|
||||
<field name="latitude" optional="hide"/>
|
||||
<field name="longitude" optional="hide"/>
|
||||
<field name="accuracy" string="Accuracy (m)" optional="hide"/>
|
||||
<field name="source"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FORM VIEW (read-only) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_location_form" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.location.form</field>
|
||||
<field name="model">fusion.technician.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Location Log" create="0" edit="0">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="logged_at"/>
|
||||
<field name="source"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="latitude"/>
|
||||
<field name="longitude"/>
|
||||
<field name="accuracy"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SEARCH VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_location_search" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.location.search</field>
|
||||
<field name="model">fusion.technician.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Location Logs">
|
||||
<field name="user_id" string="Technician"/>
|
||||
<separator/>
|
||||
<filter string="Today" name="filter_today"
|
||||
domain="[('logged_at', '>=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Last 7 Days" name="filter_7d"
|
||||
domain="[('logged_at', '>=', (context_today() - datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Last 30 Days" name="filter_30d"
|
||||
domain="[('logged_at', '>=', (context_today() - datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]"/>
|
||||
<separator/>
|
||||
<filter string="Technician" name="group_user" context="{'group_by': 'user_id'}"/>
|
||||
<filter string="Date" name="group_date" context="{'group_by': 'logged_at:day'}"/>
|
||||
<filter string="Source" name="group_source" context="{'group_by': 'source'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTION -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_technician_locations" model="ir.actions.act_window">
|
||||
<field name="name">Location History</field>
|
||||
<field name="res_model">fusion.technician.location</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_technician_location_search"/>
|
||||
<field name="context">{
|
||||
'search_default_filter_today': 1,
|
||||
'search_default_group_user': 1,
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No location data logged yet.
|
||||
</p>
|
||||
<p>Technician locations are automatically logged when they use the portal.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- MAP VIEW (QWeb HTML with Google Maps) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="action_technician_location_map" model="ir.actions.act_url">
|
||||
<field name="name">Technician Map</field>
|
||||
<field name="url">/my/technician/admin/map</field>
|
||||
<field name="target">self</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- MENU ITEMS (under Technician Management) -->
|
||||
<!-- ================================================================== -->
|
||||
<menuitem id="menu_technician_locations"
|
||||
name="Location History"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_locations"
|
||||
sequence="40"/>
|
||||
|
||||
<menuitem id="menu_technician_map"
|
||||
name="Live Map"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_location_map"
|
||||
sequence="45"/>
|
||||
|
||||
<!-- CRON: Cleanup old location records (runs daily) -->
|
||||
<record id="ir_cron_cleanup_technician_locations" model="ir.cron">
|
||||
<field name="name">Cleanup Old Technician Locations</field>
|
||||
<field name="model_id" ref="model_fusion_technician_location"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model._cron_cleanup_old_locations()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,540 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2024-2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
|
||||
Claims-specific extensions to the base technician task views
|
||||
defined in fusion_tasks. Adds SO/PO/rental fields.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SEQUENCE -->
|
||||
<!-- SEARCH VIEW EXTENSION -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="seq_technician_task" model="ir.sequence">
|
||||
<field name="name">Technician Task</field>
|
||||
<field name="code">fusion.technician.task</field>
|
||||
<field name="prefix">TASK-</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="number_increment">1</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- RES.USERS FORM EXTENSION - Field Staff toggle -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_users_form_field_staff" model="ir.ui.view">
|
||||
<field name="name">res.users.form.field.staff</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<record id="view_technician_task_search_claims" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.search.claims</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="inherit_id" ref="fusion_tasks.view_technician_task_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='share']" position="after">
|
||||
<field name="x_fc_is_field_staff"/>
|
||||
<field name="x_fc_start_address"
|
||||
invisible="not x_fc_is_field_staff"
|
||||
placeholder="e.g. 123 Main St, Brampton, ON"/>
|
||||
<field name="x_fc_tech_sync_id"
|
||||
invisible="not x_fc_is_field_staff"
|
||||
placeholder="e.g. gordy, manpreet"/>
|
||||
<xpath expr="//filter[@name='filter_pod']" position="after">
|
||||
<filter string="Has Purchase Order" name="has_po"
|
||||
domain="[('purchase_order_id', '!=', False)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- SEARCH VIEW -->
|
||||
<!-- FORM VIEW EXTENSION -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_search" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.search</field>
|
||||
<record id="view_technician_task_form_claims" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.form.claims</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="inherit_id" ref="fusion_tasks.view_technician_task_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Tasks">
|
||||
<!-- Quick Filters -->
|
||||
<filter string="Today" name="filter_today"
|
||||
domain="[('scheduled_date', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Tomorrow" name="filter_tomorrow"
|
||||
domain="[('scheduled_date', '=', (context_today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="This Week" name="filter_this_week"
|
||||
domain="[('scheduled_date', '>=', (context_today() - datetime.timedelta(days=context_today().weekday())).strftime('%Y-%m-%d')),
|
||||
('scheduled_date', '<=', (context_today() + datetime.timedelta(days=6-context_today().weekday())).strftime('%Y-%m-%d'))]"/>
|
||||
<separator/>
|
||||
<filter string="Pending" name="filter_pending" domain="[('status', '=', 'pending')]"/>
|
||||
<filter string="Scheduled" name="filter_scheduled" domain="[('status', '=', 'scheduled')]"/>
|
||||
<filter string="En Route" name="filter_en_route" domain="[('status', '=', 'en_route')]"/>
|
||||
<filter string="In Progress" name="filter_in_progress" domain="[('status', '=', 'in_progress')]"/>
|
||||
<filter string="Completed" name="filter_completed" domain="[('status', '=', 'completed')]"/>
|
||||
<filter string="Active" name="filter_active" domain="[('status', 'not in', ['cancelled', 'completed'])]"/>
|
||||
<separator/>
|
||||
<filter string="My Tasks" name="filter_my_tasks"
|
||||
domain="['|', ('technician_id', '=', uid), ('additional_technician_ids', 'in', [uid])]"/>
|
||||
<filter string="Deliveries" name="filter_deliveries" domain="[('task_type', '=', 'delivery')]"/>
|
||||
<filter string="Repairs" name="filter_repairs" domain="[('task_type', '=', 'repair')]"/>
|
||||
<filter string="POD Required" name="filter_pod" domain="[('pod_required', '=', True)]"/>
|
||||
<filter string="Has Purchase Order" name="has_po"
|
||||
domain="[('purchase_order_id', '!=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="Local Tasks" name="filter_local"
|
||||
domain="[('x_fc_sync_source', '=', False)]"/>
|
||||
<filter string="Synced Tasks" name="filter_synced"
|
||||
domain="[('x_fc_sync_source', '!=', False)]"/>
|
||||
<separator/>
|
||||
<!-- Group By -->
|
||||
<filter string="Technician" name="group_technician" context="{'group_by': 'technician_id'}"/>
|
||||
<filter string="Date" name="group_date" context="{'group_by': 'scheduled_date'}"/>
|
||||
<filter string="Status" name="group_status" context="{'group_by': 'status'}"/>
|
||||
<filter string="Task Type" name="group_type" context="{'group_by': 'task_type'}"/>
|
||||
<filter string="Client" name="group_client" context="{'group_by': 'partner_id'}"/>
|
||||
</search>
|
||||
<!-- Stat buttons: View Case + Purchase Order -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_view_sale_order" type="object"
|
||||
class="oe_stat_button" icon="fa-file-text-o"
|
||||
invisible="not sale_order_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">View Case</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_purchase_order" type="object"
|
||||
class="oe_stat_button" icon="fa-shopping-cart"
|
||||
invisible="not purchase_order_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Purchase Order</span>
|
||||
</div>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- Add sale_order_id, purchase_order_id after priority -->
|
||||
<xpath expr="//field[@name='priority']" position="after">
|
||||
<field name="sale_order_id"/>
|
||||
<field name="purchase_order_id"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Rental Inspection tab after Completion tab -->
|
||||
<xpath expr="//page[@name='completion']" position="after">
|
||||
<page string="Rental Inspection" name="rental_inspection"
|
||||
invisible="task_type != 'pickup'">
|
||||
<group>
|
||||
<group string="Condition">
|
||||
<field name="rental_inspection_condition"/>
|
||||
<field name="rental_inspection_completed"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Inspection Notes">
|
||||
<field name="rental_inspection_notes" nolabel="1"/>
|
||||
</group>
|
||||
<group string="Inspection Photos">
|
||||
<field name="rental_inspection_photo_ids"
|
||||
widget="many2many_binary" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- FORM VIEW -->
|
||||
<!-- LIST VIEW EXTENSION -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_form" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.form</field>
|
||||
<record id="view_technician_task_list_claims" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.list.claims</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="inherit_id" ref="fusion_tasks.view_technician_task_list"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Technician Task">
|
||||
<field name="x_fc_is_shadow" invisible="1"/>
|
||||
<field name="x_fc_sync_source" invisible="1"/>
|
||||
<header>
|
||||
<button name="action_start_en_route" type="object" string="En Route"
|
||||
class="btn-primary" invisible="status != 'scheduled' or x_fc_is_shadow"/>
|
||||
<button name="action_start_task" type="object" string="Start Task"
|
||||
class="btn-primary" invisible="status not in ('scheduled', 'en_route') or x_fc_is_shadow"/>
|
||||
<button name="action_complete_task" type="object" string="Complete"
|
||||
class="btn-success" invisible="status not in ('in_progress', 'en_route') or x_fc_is_shadow"/>
|
||||
<button name="action_reschedule" type="object" string="Reschedule"
|
||||
class="btn-warning" invisible="status not in ('scheduled', 'en_route') or x_fc_is_shadow"/>
|
||||
<button name="action_cancel_task" type="object" string="Cancel"
|
||||
class="btn-danger" invisible="status in ('completed', 'cancelled') or x_fc_is_shadow"
|
||||
confirm="Are you sure you want to cancel this task?"/>
|
||||
<button name="action_reset_to_scheduled" type="object" string="Reset to Scheduled"
|
||||
invisible="status not in ('cancelled', 'rescheduled') or x_fc_is_shadow"/>
|
||||
<button string="Calculate Travel"
|
||||
class="btn-secondary o_fc_calculate_travel" icon="fa-car"
|
||||
invisible="x_fc_is_shadow"/>
|
||||
<field name="status" widget="statusbar"
|
||||
statusbar_visible="pending,scheduled,en_route,in_progress,completed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<!-- Shadow task banner -->
|
||||
<div class="alert alert-info text-center" role="alert"
|
||||
invisible="not x_fc_is_shadow">
|
||||
<strong><i class="fa fa-link"/> This task is synced from
|
||||
<field name="x_fc_sync_source" readonly="1" nolabel="1" class="d-inline"/>
|
||||
— view only.</strong>
|
||||
</div>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_sale_order" type="object"
|
||||
class="oe_stat_button" icon="fa-file-text-o"
|
||||
invisible="not sale_order_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">View Case</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_purchase_order" type="object"
|
||||
class="oe_stat_button" icon="fa-shopping-cart"
|
||||
invisible="not purchase_order_id">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Purchase Order</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Completed" bg_color="text-bg-success"
|
||||
invisible="status != 'completed'"/>
|
||||
<widget name="web_ribbon" title="Cancelled" bg_color="text-bg-danger"
|
||||
invisible="status != 'cancelled'"/>
|
||||
<widget name="web_ribbon" title="Synced" bg_color="text-bg-info"
|
||||
invisible="not x_fc_is_shadow or status in ('completed', 'cancelled')"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- Schedule Info Banner -->
|
||||
<field name="schedule_info_html" nolabel="1" colspan="2"
|
||||
invisible="not technician_id or not scheduled_date"/>
|
||||
|
||||
<!-- Previous Task / Travel Warning Banner -->
|
||||
<field name="prev_task_summary_html" nolabel="1" colspan="2"
|
||||
invisible="not technician_id or not scheduled_date"/>
|
||||
|
||||
<!-- Hidden fields for calendar sync and legacy -->
|
||||
<field name="datetime_start" invisible="1"/>
|
||||
<field name="datetime_end" invisible="1"/>
|
||||
<field name="time_start_12h" invisible="1"/>
|
||||
<field name="time_end_12h" invisible="1"/>
|
||||
|
||||
<group>
|
||||
<group string="Assignment">
|
||||
<field name="technician_id"
|
||||
domain="[('x_fc_is_field_staff', '=', True)]"/>
|
||||
<field name="additional_technician_ids"
|
||||
widget="many2many_tags_avatar"
|
||||
domain="[('x_fc_is_field_staff', '=', True), ('id', '!=', technician_id)]"
|
||||
options="{'color_field': 'color'}"/>
|
||||
<field name="task_type"/>
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="facility_id"
|
||||
invisible="task_type != 'ltc_visit'"/>
|
||||
<field name="sale_order_id"
|
||||
invisible="task_type == 'ltc_visit'"/>
|
||||
<field name="purchase_order_id"
|
||||
invisible="task_type == 'ltc_visit'"/>
|
||||
</group>
|
||||
<group string="Schedule">
|
||||
<field name="scheduled_date"/>
|
||||
<field name="time_start" widget="float_time"
|
||||
string="Start Time"/>
|
||||
<field name="duration_hours" widget="float_time"
|
||||
string="Duration"/>
|
||||
<field name="time_end" widget="float_time"
|
||||
string="End Time" readonly="1"
|
||||
force_save="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<group string="Client">
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_phone" widget="phone"/>
|
||||
</group>
|
||||
<group string="Location">
|
||||
<field name="address_partner_id"/>
|
||||
<field name="address_street"/>
|
||||
<field name="address_street2" string="Unit/Suite #"/>
|
||||
<field name="address_buzz_code"/>
|
||||
<field name="address_city" invisible="1"/>
|
||||
<field name="address_state_id" invisible="1"/>
|
||||
<field name="address_zip" invisible="1"/>
|
||||
<field name="address_lat" invisible="1"/>
|
||||
<field name="address_lng" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<group string="Travel (Auto-Calculated)">
|
||||
<field name="travel_time_minutes" readonly="1"/>
|
||||
<field name="travel_distance_km" readonly="1"/>
|
||||
<field name="travel_origin" readonly="1"/>
|
||||
<field name="previous_task_id" readonly="1"/>
|
||||
</group>
|
||||
<group string="Options">
|
||||
<field name="pod_required"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Description" name="description">
|
||||
<group>
|
||||
<field name="description" placeholder="What needs to be done..."/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="equipment_needed" placeholder="Tools, parts, materials..."/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Completion" name="completion">
|
||||
<group>
|
||||
<field name="completion_datetime"/>
|
||||
<field name="completion_notes"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="voice_note_transcription"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Rental Inspection" name="rental_inspection"
|
||||
invisible="task_type != 'pickup'">
|
||||
<group>
|
||||
<group string="Condition">
|
||||
<field name="rental_inspection_condition"/>
|
||||
<field name="rental_inspection_completed"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Inspection Notes">
|
||||
<field name="rental_inspection_notes" nolabel="1"/>
|
||||
</group>
|
||||
<group string="Inspection Photos">
|
||||
<field name="rental_inspection_photo_ids"
|
||||
widget="many2many_binary" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- LIST VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_list" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.list</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Technician Tasks" decoration-success="status == 'completed'"
|
||||
decoration-warning="status == 'in_progress'"
|
||||
decoration-info="status == 'en_route'"
|
||||
decoration-danger="status == 'cancelled'"
|
||||
decoration-muted="status == 'rescheduled'"
|
||||
default_order="scheduled_date, sequence, time_start">
|
||||
<field name="name"/>
|
||||
<field name="technician_id" widget="many2one_avatar_user"/>
|
||||
<field name="additional_technician_ids" widget="many2many_tags_avatar"
|
||||
optional="show" string="+ Techs"/>
|
||||
<field name="task_type" decoration-bf="1"/>
|
||||
<field name="scheduled_date"/>
|
||||
<field name="time_start_display" string="Start"/>
|
||||
<field name="time_end_display" string="End"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="address_city"/>
|
||||
<field name="travel_time_minutes" string="Travel (min)" optional="show"/>
|
||||
<field name="status" widget="badge"
|
||||
decoration-success="status == 'completed'"
|
||||
decoration-warning="status == 'in_progress'"
|
||||
decoration-info="status in ('scheduled', 'en_route')"
|
||||
decoration-danger="status == 'cancelled'"/>
|
||||
<field name="priority" widget="priority" optional="hide"/>
|
||||
<field name="pod_required" optional="hide"/>
|
||||
<xpath expr="//field[@name='pod_required']" position="after">
|
||||
<field name="sale_order_id" optional="hide"/>
|
||||
<field name="purchase_order_id" optional="hide"/>
|
||||
<field name="x_fc_source_label" string="Source" optional="show"
|
||||
widget="badge" decoration-info="x_fc_is_shadow"
|
||||
decoration-success="not x_fc_is_shadow"/>
|
||||
</list>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- KANBAN VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_kanban" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.kanban</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="status" class="o_kanban_small_column"
|
||||
records_draggable="1" group_create="0">
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
<field name="technician_id"/>
|
||||
<field name="additional_technician_ids"/>
|
||||
<field name="additional_tech_count"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="task_type"/>
|
||||
<field name="scheduled_date"/>
|
||||
<field name="time_start_display"/>
|
||||
<field name="address_city"/>
|
||||
<field name="travel_time_minutes"/>
|
||||
<field name="status"/>
|
||||
<field name="x_fc_is_shadow"/>
|
||||
<field name="x_fc_sync_client_name"/>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div t-attf-class="oe_kanban_color_#{record.color.raw_value} oe_kanban_card oe_kanban_global_click">
|
||||
<div class="oe_kanban_content">
|
||||
<div class="o_kanban_record_top mb-1">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
</div>
|
||||
<field name="priority" widget="priority"/>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<span class="badge bg-primary me-1"><field name="task_type"/></span>
|
||||
<span class="text-muted"><field name="scheduled_date"/> - <field name="time_start_display"/></span>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<i class="fa fa-user me-1"/>
|
||||
<t t-if="record.x_fc_is_shadow.raw_value">
|
||||
<span t-out="record.x_fc_sync_client_name.value"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<field name="partner_id"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="text-muted small" t-if="record.address_city.raw_value">
|
||||
<i class="fa fa-map-marker me-1"/><field name="address_city"/>
|
||||
<t t-if="record.travel_time_minutes.raw_value">
|
||||
<span class="ms-2"><i class="fa fa-car me-1"/><field name="travel_time_minutes"/> min</span>
|
||||
</t>
|
||||
</div>
|
||||
<div t-if="record.additional_tech_count.raw_value > 0" class="text-muted small mb-1">
|
||||
<i class="fa fa-users me-1"/>
|
||||
<span>+<field name="additional_tech_count"/> technician(s)</span>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom mt-2">
|
||||
<div class="oe_kanban_bottom_left">
|
||||
<field name="activity_ids" widget="kanban_activity"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<field name="technician_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- CALENDAR VIEW -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_calendar" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.calendar</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Technician Schedule"
|
||||
date_start="datetime_start" date_stop="datetime_end"
|
||||
color="technician_id" mode="week" event_open_popup="1"
|
||||
quick_create="0">
|
||||
<!-- Displayed on the calendar card -->
|
||||
<field name="partner_id"/>
|
||||
<field name="x_fc_sync_client_name"/>
|
||||
<field name="task_type"/>
|
||||
<field name="time_start_display" string="Start"/>
|
||||
<field name="time_end_display" string="End"/>
|
||||
<!-- Popover (hover/click) details -->
|
||||
<field name="name"/>
|
||||
<field name="technician_id" avatar_field="image_128"/>
|
||||
<field name="address_display" string="Address"/>
|
||||
<field name="travel_time_minutes" string="Travel (min)"/>
|
||||
<field name="status"/>
|
||||
<field name="duration_hours" widget="float_time" string="Duration"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- MAP VIEW (Enterprise web_map) -->
|
||||
<!-- ================================================================== -->
|
||||
<record id="view_technician_task_map" model="ir.ui.view">
|
||||
<field name="name">fusion.technician.task.map</field>
|
||||
<field name="model">fusion.technician.task</field>
|
||||
<field name="arch" type="xml">
|
||||
<map res_partner="address_partner_id" default_order="time_start"
|
||||
routing="1" js_class="fusion_task_map">
|
||||
<field name="partner_id" string="Client"/>
|
||||
<field name="task_type" string="Type"/>
|
||||
<field name="technician_id" string="Technician"/>
|
||||
<field name="time_start_display" string="Start"/>
|
||||
<field name="time_end_display" string="End"/>
|
||||
<field name="status" string="Status"/>
|
||||
<field name="travel_time_minutes" string="Travel (min)"/>
|
||||
</map>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ACTIONS -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
<!-- Main Tasks Action (List/Kanban) -->
|
||||
<record id="action_technician_tasks" model="ir.actions.act_window">
|
||||
<field name="name">Technician Tasks</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,map</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first technician task
|
||||
</p>
|
||||
<p>Schedule deliveries, repairs, and other field tasks for your technicians.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Schedule Action (Map default) -->
|
||||
<record id="action_technician_schedule" model="ir.actions.act_window">
|
||||
<field name="name">Schedule</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">map,calendar,list,kanban,form</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
</record>
|
||||
|
||||
<!-- Map View Action (for app landing page) -->
|
||||
<record id="action_technician_map_view" model="ir.actions.act_window">
|
||||
<field name="name">Delivery Map</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">map,list,kanban,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
</record>
|
||||
|
||||
<!-- Today's Tasks Action -->
|
||||
<record id="action_technician_tasks_today" model="ir.actions.act_window">
|
||||
<field name="name">Today's Tasks</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">kanban,list,form,map</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_today': 1, 'search_default_filter_active': 1}</field>
|
||||
</record>
|
||||
|
||||
<!-- My Tasks Action -->
|
||||
<record id="action_technician_my_tasks" model="ir.actions.act_window">
|
||||
<field name="name">My Tasks</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">list,kanban,form,calendar,map</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_my_tasks': 1, 'search_default_filter_active': 1}</field>
|
||||
</record>
|
||||
|
||||
<!-- Pending Tasks Action -->
|
||||
<record id="action_technician_tasks_pending" model="ir.actions.act_window">
|
||||
<field name="name">Pending Tasks</field>
|
||||
<field name="res_model">fusion.technician.task</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="view_technician_task_search"/>
|
||||
<field name="context">{'search_default_filter_pending': 1}</field>
|
||||
</record>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- MENU ITEMS -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
<!-- Field Service - top-level menu (sequence 3 = first child = app default) -->
|
||||
<menuitem id="menu_technician_management"
|
||||
name="Field Service"
|
||||
parent="fusion_claims.menu_adp_claims_root"
|
||||
sequence="3"
|
||||
groups="fusion_claims.group_fusion_claims_user,fusion_claims.group_field_technician"/>
|
||||
|
||||
<!-- Delivery Map - first item under Field Service = default landing view -->
|
||||
<menuitem id="menu_fc_delivery_map"
|
||||
name="Delivery Map"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_map_view"
|
||||
sequence="5"
|
||||
groups="fusion_claims.group_fusion_claims_user,fusion_claims.group_field_technician"/>
|
||||
|
||||
<menuitem id="menu_technician_schedule"
|
||||
name="Schedule"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_schedule"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_technician_tasks"
|
||||
name="Tasks"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_tasks"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_technician_tasks_pending"
|
||||
name="Pending Tasks"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_tasks_pending"
|
||||
sequence="13"/>
|
||||
|
||||
<menuitem id="menu_technician_tasks_today"
|
||||
name="Today's Tasks"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_tasks_today"
|
||||
sequence="15"/>
|
||||
|
||||
<menuitem id="menu_technician_my_tasks"
|
||||
name="My Tasks"
|
||||
parent="menu_technician_management"
|
||||
action="action_technician_my_tasks"
|
||||
sequence="25"
|
||||
groups="fusion_claims.group_field_technician"/>
|
||||
|
||||
<!-- Field Service menus moved to fusion_tasks standalone app -->
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user