194 lines
9.5 KiB
XML
194 lines
9.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2026 Nexa Systems Inc.
|
|
License OPL-1 (Odoo Proprietary License v1.0)
|
|
Part of the Fusion Plating product family.
|
|
-->
|
|
<odoo>
|
|
|
|
<record id="view_fp_pickup_request_list" model="ir.ui.view">
|
|
<field name="name">fp.pickup.request.list</field>
|
|
<field name="model">fusion.plating.pickup.request</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Pickup Requests"
|
|
decoration-muted="state == 'cancelled'"
|
|
decoration-info="state == 'new'"
|
|
decoration-success="state == 'received'">
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<field name="requested_date"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="assigned_driver_id"/>
|
|
<field name="vehicle_id"/>
|
|
<field name="destination_facility_id"/>
|
|
<field name="tdg_required" widget="boolean_toggle" optional="show"/>
|
|
<field name="state" widget="badge"
|
|
decoration-info="state == 'new'"
|
|
decoration-warning="state == 'scheduled'"
|
|
decoration-primary="state == 'en_route'"
|
|
decoration-success="state in ('picked_up','received')"
|
|
decoration-muted="state == 'cancelled'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_pickup_request_form" model="ir.ui.view">
|
|
<field name="name">fp.pickup.request.form</field>
|
|
<field name="model">fusion.plating.pickup.request</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Pickup Request">
|
|
<header>
|
|
<button name="action_schedule" string="Schedule" type="object"
|
|
class="oe_highlight" invisible="state != 'new'"/>
|
|
<button name="action_start_route" string="Start Route" type="object"
|
|
invisible="state != 'scheduled'"/>
|
|
<button name="action_mark_picked_up" string="Mark Picked Up" type="object"
|
|
invisible="state != 'en_route'"/>
|
|
<button name="action_mark_received" string="Mark Received" type="object"
|
|
class="oe_highlight" invisible="state != 'picked_up'"/>
|
|
<button name="action_cancel" string="Cancel" type="object"
|
|
invisible="state in ('received','cancelled')"/>
|
|
<button name="action_reset_to_new" string="Reset to New" type="object"
|
|
invisible="state != 'cancelled'"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="new,scheduled,en_route,picked_up,received"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<label for="name"/>
|
|
<h1><field name="name" readonly="1"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Customer">
|
|
<field name="partner_id"/>
|
|
<field name="pickup_address_id"/>
|
|
<field name="contact_name"/>
|
|
<field name="contact_phone" widget="phone"/>
|
|
</group>
|
|
<group string="Schedule">
|
|
<field name="requested_date"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="destination_facility_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<group string="Assignment">
|
|
<field name="assigned_driver_id"/>
|
|
<field name="vehicle_id"/>
|
|
</group>
|
|
<group string="Load">
|
|
<field name="estimated_weight_kg"/>
|
|
<field name="tdg_required" widget="boolean_toggle"/>
|
|
<field name="picked_up_at" readonly="1"/>
|
|
<field name="received_at" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Items">
|
|
<field name="item_description" placeholder="Describe the parts to be picked up..."/>
|
|
</page>
|
|
<page string="Notes">
|
|
<field name="notes"/>
|
|
</page>
|
|
<page string="Chain of Custody">
|
|
<field name="custody_event_ids" readonly="1">
|
|
<list>
|
|
<field name="event_datetime"/>
|
|
<field name="event_type"/>
|
|
<field name="from_party"/>
|
|
<field name="to_party"/>
|
|
<field name="recorded_by_id"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_pickup_request_kanban" model="ir.ui.view">
|
|
<field name="name">fp.pickup.request.kanban</field>
|
|
<field name="model">fusion.plating.pickup.request</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="state" class="o_fp_pickup_kanban">
|
|
<field name="id"/>
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<field name="scheduled_date"/>
|
|
<field name="assigned_driver_id"/>
|
|
<field name="vehicle_id"/>
|
|
<field name="tdg_required"/>
|
|
<field name="state"/>
|
|
<templates>
|
|
<t t-name="card">
|
|
<div class="o_fp_card">
|
|
<div class="d-flex align-items-start justify-content-between">
|
|
<div>
|
|
<strong class="o_fp_card_title"><field name="name"/></strong>
|
|
<div class="small text-muted"><field name="partner_id"/></div>
|
|
</div>
|
|
<i class="fa fa-arrow-down text-muted" aria-hidden="true"/>
|
|
</div>
|
|
<div class="mt-2 small">
|
|
<field name="scheduled_date"/>
|
|
</div>
|
|
<div class="mt-1 small text-muted">
|
|
<field name="assigned_driver_id"/>
|
|
<span t-if="record.vehicle_id.raw_value"> — <field name="vehicle_id"/></span>
|
|
</div>
|
|
<div class="mt-2" t-if="record.tdg_required.raw_value">
|
|
<span class="o_fp_badge" data-state="tdg">TDG</span>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_pickup_request_search" model="ir.ui.view">
|
|
<field name="name">fp.pickup.request.search</field>
|
|
<field name="model">fusion.plating.pickup.request</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Pickup Requests">
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<field name="assigned_driver_id"/>
|
|
<field name="vehicle_id"/>
|
|
<field name="destination_facility_id"/>
|
|
<filter name="filter_new" string="New" domain="[('state','=','new')]"/>
|
|
<filter name="filter_scheduled" string="Scheduled" domain="[('state','=','scheduled')]"/>
|
|
<filter name="filter_en_route" string="En Route" domain="[('state','=','en_route')]"/>
|
|
<filter name="filter_tdg" string="TDG Only" domain="[('tdg_required','=',True)]"/>
|
|
<group>
|
|
<filter name="group_state" string="Status" context="{'group_by':'state'}"/>
|
|
<filter name="group_driver" string="Driver" context="{'group_by':'assigned_driver_id'}"/>
|
|
<filter name="group_facility" string="Destination" context="{'group_by':'destination_facility_id'}"/>
|
|
<filter name="group_partner" string="Customer" context="{'group_by':'partner_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fp_pickup_request" model="ir.actions.act_window">
|
|
<field name="name">Pickup Requests</field>
|
|
<field name="res_model">fusion.plating.pickup.request</field>
|
|
<field name="view_mode">kanban,list,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No pickup requests yet
|
|
</p>
|
|
<p>
|
|
A pickup request is raised when a customer asks for parts
|
|
to be collected. Dispatch schedules a driver and vehicle,
|
|
and the chain of custody is logged automatically as the
|
|
request moves through its lifecycle.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|