feat: reorder search views - Customer first, add delivery/tags/status fields for ADP, ODSP, MOD
This commit is contained in:
@@ -41,15 +41,26 @@
|
||||
<field name="x_fc_client_type" string="Client Type"
|
||||
invisible="x_fc_sale_type not in ('adp', 'adp_odsp')"/>
|
||||
|
||||
<!-- Delivery Status -->
|
||||
<field name="x_fc_show_delivery_datetime" invisible="1"/>
|
||||
<field name="x_fc_delivery_status" string="Delivery Status"/>
|
||||
<field name="x_fc_delivery_datetime" string="Delivery Date/Time"
|
||||
invisible="not x_fc_show_delivery_datetime"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- SALE ORDER FORM: Move Salesperson to header (after Quotation Template) -->
|
||||
<!-- ===================================================================== -->
|
||||
<record id="view_order_form_fusion_claims_salesperson" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.fusion.central.salesperson</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="priority">51</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="sale_order_template_id" position="after">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</field>
|
||||
<xpath expr="//page[@name='other_information']//field[@name='user_id']" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- SALE ORDER FORM: March of Dimes Case Details -->
|
||||
<!-- ===================================================================== -->
|
||||
@@ -1077,6 +1088,13 @@
|
||||
invisible="x_fc_technician_task_count == 0">
|
||||
<field name="x_fc_technician_task_count" widget="statinfo" string="Tasks"/>
|
||||
</button>
|
||||
|
||||
<!-- Page 11 Signing Requests -->
|
||||
<button name="action_view_page11_requests" type="object"
|
||||
class="oe_stat_button" icon="fa-pencil-square-o"
|
||||
invisible="page11_sign_request_count == 0">
|
||||
<field name="page11_sign_request_count" widget="statinfo" string="Page 11 Requests"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -1183,13 +1201,25 @@
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status != 'quotation'"
|
||||
help="Move to Assessment Scheduled status"/>
|
||||
|
||||
<!-- Assessment Scheduled -> Complete Assessment -->
|
||||
<!-- Assessment Scheduled (or Quotation override) -> Complete Assessment -->
|
||||
<button name="action_complete_assessment" type="object"
|
||||
string="Complete Assessment" class="btn-info"
|
||||
icon="fa-check-square-o"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status != 'assessment_scheduled'"
|
||||
help="Mark assessment as completed"/>
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('quotation', 'assessment_scheduled')"
|
||||
help="Mark assessment as completed (override available from Quotation stage)"/>
|
||||
|
||||
<!-- Request Page 11 Remote Signature (before Application Received) -->
|
||||
<button name="action_request_page11_signature" type="object"
|
||||
string="Request Page 11 Signature" class="btn-warning"
|
||||
icon="fa-pencil-square-o"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('assessment_completed', 'waiting_for_application', 'application_received') or x_fc_signed_pages_11_12"
|
||||
help="Send Page 11 to a family member or agent for remote digital signing"/>
|
||||
<button name="action_request_page11_signature" type="object"
|
||||
string="Re-sign Page 11" class="btn-secondary"
|
||||
icon="fa-repeat"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('assessment_completed', 'waiting_for_application', 'application_received') or not x_fc_signed_pages_11_12"
|
||||
help="Page 11 already signed. Click to request a new signature."/>
|
||||
|
||||
<!-- Waiting for Application -> Application Received -->
|
||||
<button name="action_application_received" type="object"
|
||||
string="Application Received" class="btn-info"
|
||||
@@ -1260,15 +1290,22 @@
|
||||
<button name="%(fusion_claims.action_set_status_on_hold)d"
|
||||
type="action" string="Put On Hold" class="btn-warning"
|
||||
icon="fa-pause"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('approved', 'approved_deduction', 'ready_delivery', 'ready_bill')"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('submitted', 'resubmitted', 'needs_correction', 'accepted', 'approved', 'approved_deduction', 'ready_delivery', 'ready_bill')"
|
||||
help="Put this application on hold"/>
|
||||
|
||||
<button name="%(fusion_claims.action_set_status_withdrawn)d"
|
||||
<button name="%(fusion_claims.action_set_status_withdrawn)d"
|
||||
type="action" string="Withdraw" class="btn-secondary"
|
||||
icon="fa-undo"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('approved', 'approved_deduction', 'ready_bill')"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status not in ('submitted', 'resubmitted', 'needs_correction', 'accepted', 'approved', 'approved_deduction', 'ready_bill')"
|
||||
help="Withdraw this application"/>
|
||||
|
||||
|
||||
<button name="action_resubmit_from_withdrawn" type="object"
|
||||
string="Resubmit Application" class="btn-primary"
|
||||
icon="fa-repeat"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_adp_application_status != 'withdrawn'"
|
||||
confirm="This will return the application to Ready for Submission status. Continue?"
|
||||
help="Return this withdrawn application to Ready for Submission"/>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- REVIEW BUTTONS (color changes based on verified/approved) -->
|
||||
<!-- ============================================================ -->
|
||||
@@ -1277,14 +1314,14 @@
|
||||
<button name="action_open_submission_verification_wizard" type="object"
|
||||
string="Review Submission" class="fc-btn-status-good"
|
||||
icon="fa-check-circle"
|
||||
invisible="not x_fc_is_adp_sale or not x_fc_submission_verified or x_fc_adp_application_status in ('quotation', 'assessment_scheduled', 'assessment_completed', 'waiting_for_application', 'application_received', 'ready_submission', 'approved', 'approved_deduction', 'ready_bill', 'billed', 'case_closed', 'denied', 'withdrawn', 'cancelled', 'expired')"
|
||||
invisible="not x_fc_is_adp_sale or not x_fc_submission_verified or x_fc_adp_application_status in ('quotation', 'assessment_scheduled', 'assessment_completed', 'waiting_for_application', 'application_received', 'ready_submission', 'needs_correction', 'approved', 'approved_deduction', 'ready_delivery', 'ready_bill', 'billed', 'case_closed', 'on_hold', 'denied', 'withdrawn', 'cancelled', 'expired')"
|
||||
help="Submission verified - click to review"/>
|
||||
|
||||
<!-- Review Submission: LIGHT RED when not yet verified -->
|
||||
<button name="action_open_submission_verification_wizard" type="object"
|
||||
string="Review Submission" class="fc-btn-status-bad"
|
||||
icon="fa-exclamation-triangle"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_submission_verified or x_fc_adp_application_status in ('quotation', 'assessment_scheduled', 'assessment_completed', 'waiting_for_application', 'application_received', 'ready_submission', 'approved', 'approved_deduction', 'ready_bill', 'billed', 'case_closed', 'denied', 'withdrawn', 'cancelled', 'expired')"
|
||||
invisible="not x_fc_is_adp_sale or x_fc_submission_verified or x_fc_adp_application_status in ('quotation', 'assessment_scheduled', 'assessment_completed', 'waiting_for_application', 'application_received', 'ready_submission', 'needs_correction', 'approved', 'approved_deduction', 'ready_delivery', 'ready_bill', 'billed', 'case_closed', 'on_hold', 'denied', 'withdrawn', 'cancelled', 'expired')"
|
||||
help="Submission not yet verified - click to review"/>
|
||||
|
||||
<!-- Review Approval: GREEN when all devices approved -->
|
||||
@@ -1482,10 +1519,16 @@
|
||||
icon="fa-pause"
|
||||
invisible="x_fc_adp_application_status in ('on_hold', 'denied', 'withdrawn', 'cancelled', 'case_closed')"/>
|
||||
<button name="action_resume_from_hold" type="object"
|
||||
string="Resume"
|
||||
string="Resume"
|
||||
class="btn-success btn-sm me-1"
|
||||
icon="fa-play"
|
||||
invisible="x_fc_adp_application_status != 'on_hold'"/>
|
||||
<button name="action_resubmit_from_withdrawn" type="object"
|
||||
string="Resubmit Application"
|
||||
class="btn-primary btn-sm me-1"
|
||||
icon="fa-repeat"
|
||||
invisible="x_fc_adp_application_status != 'withdrawn'"
|
||||
confirm="This will return the application to Ready for Submission status. Continue?"/>
|
||||
<button name="%(fusion_claims.action_set_status_withdrawn)d"
|
||||
type="action" string="Withdraw"
|
||||
class="btn-secondary btn-sm me-1"
|
||||
@@ -1549,7 +1592,7 @@
|
||||
<!-- Application Details - Show after Ready for Submission stage -->
|
||||
<group string="Application Details" invisible="not x_fc_stage_after_ready_submission">
|
||||
<group>
|
||||
<field name="x_fc_client_ref_1" placeholder="e.g., DOJO"
|
||||
<field name="x_fc_client_ref_1" placeholder="e.g., JODO"
|
||||
required="x_fc_stage_after_ready_submission"
|
||||
readonly="x_fc_case_locked"/>
|
||||
<field name="x_fc_client_ref_2" placeholder="e.g., 1234"
|
||||
@@ -1804,8 +1847,14 @@
|
||||
widget="binary" nolabel="1" class="fc-tile-upload-field"
|
||||
required="x_fc_is_adp_sale and x_fc_adp_application_status not in ('quotation', 'assessment_scheduled', 'assessment_completed', 'waiting_for_application', 'application_received')"
|
||||
readonly="x_fc_case_locked"/>
|
||||
<button name="action_request_page11_signature" type="object"
|
||||
class="btn btn-sm btn-outline-primary mt-1"
|
||||
string="Request Signature"
|
||||
title="Send Page 11 to a family member or agent for remote signing"
|
||||
invisible="x_fc_signed_pages_11_12 or not x_fc_is_adp_sale"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="page11_sign_status" invisible="1"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2094,22 +2143,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SYNC TO INVOICES - Shows when there are invoices to sync -->
|
||||
<div class="alert alert-secondary mb-3" role="alert"
|
||||
invisible="not x_fc_has_adp_invoice and not x_fc_has_client_invoice">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<strong><i class="fa fa-refresh"/> Sync ADP Fields</strong>
|
||||
<p class="mb-0 small text-muted">
|
||||
Push claim number, client references, dates, and serial numbers from this order to linked invoices.
|
||||
</p>
|
||||
</div>
|
||||
<button name="action_sync_adp_fields" type="object"
|
||||
string="Sync to Invoices" class="btn btn-secondary btn-sm ms-3"
|
||||
icon="fa-refresh"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DEDUCTION ALERT - Only show when there are deductions -->
|
||||
<field name="x_fc_has_deductions" invisible="1"/>
|
||||
<field name="x_fc_total_deduction_amount" invisible="1"/>
|
||||
@@ -2145,6 +2178,7 @@
|
||||
help="Device approved by ADP"/>
|
||||
<field name="name" string="Description" class="text-wrap"/>
|
||||
<field name="x_fc_adp_device_type" string="Device Type" optional="show" width="150px"/>
|
||||
<field name="x_fc_adp_build_type" string="Build" optional="show" width="100px"/>
|
||||
<field name="x_fc_serial_number" string="S/N" optional="show" width="90px"/>
|
||||
<field name="product_uom_qty" string="Qty" width="60px"/>
|
||||
<field name="price_unit" string="Unit $" width="100px"/>
|
||||
@@ -2377,9 +2411,11 @@
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Serial Number: after description, always visible -->
|
||||
<!-- Serial Number and Build Type: after description -->
|
||||
<xpath expr="//field[@name='order_line']/list/field[@name='name']" position="after">
|
||||
<field name="x_fc_serial_number" string="S/N" optional="show"/>
|
||||
<field name="x_fc_adp_build_type" string="Build" optional="hide"
|
||||
column_invisible="not parent.x_fc_is_adp_sale"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Shorten Qty label -->
|
||||
@@ -2431,6 +2467,28 @@
|
||||
<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) -->
|
||||
|
||||
Reference in New Issue
Block a user