# fractal-solutions/uber_carrier architecture

> Architecture diagram of the GitHub repository fractal-solutions/uber_carrier, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fractal-solutions/uber_carrier
- Repository: https://github.com/fractal-solutions/uber_carrier

## Overview

This Odoo addon integrates Uber Direct last-mile delivery with stock pickings: staff configure delivery details, obtain quotes, create and update deliveries, and track progress from webhook events or a manual sync. It also exposes checkout quote and frontend routes, and maintains delivery-detail and barcode records. The sampled source shows webhook-to-picking updates, picking-to-carrier API calls, and the sync button’s model call; quote routing and several UI capabilities are represented from the tree or manifest, so uncertain runtime links are omitted or marked unverified.

Main entry points: [`models/uber_base_api.py`](https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_base_api.py) (Carrier API operations), [`models/request_uber_pickup.py`](https://github.com/fractal-solutions/uber_carrier/blob/main/models/request_uber_pickup.py) (Stock picking), [`controllers/main.py`](https://github.com/fractal-solutions/uber_carrier/blob/main/controllers/main.py) (Checkout quote routes), [`static/src/js/list_sync_button.js`](https://github.com/fractal-solutions/uber_carrier/blob/main/static/src/js/list_sync_button.js) (Delivery sync button)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Delivery workflow"]
  node_picking["Stock picking"]
  node_barcode["Barcode requirements"]
end

subgraph group_integration["Uber integration"]
  node_carrier_api["Carrier API operations<br/>[uber_base_api.py]"]
  node_webhook_controller["Delivery webhooks<br/>[main.py]"]
end

subgraph group_tracking["Tracking and records"]
  node_delivery_records[("Delivery records<br/>[uber_details.py]")]
  node_odoo_records[("Odoo delivery records")]
end

subgraph group_interfaces["Checkout and interface"]
  node_quote_controller["Checkout quote routes<br/>[main.py]"]
  node_quote_page["Quote page"]
  node_sync_button["Delivery sync button"]
  node_views["Delivery configuration views"]
  node_security["Access controls"]
end

node_staff(("Odoo staff"))
node_checkout(("Online checkout"))
node_uber{{"Uber Direct API"}}
node_webhook_sender(("Uber webhook"))

node_staff -->|"manages"| node_picking
node_picking -->|"stores requirements"| node_barcode
node_picking -->|"requests updates"| node_carrier_api
node_carrier_api -->|"requests delivery service"| node_uber
node_carrier_api -->|"writes delivery data"| node_odoo_records
node_checkout -.->|"requests rates"| node_quote_controller
node_quote_controller -.->|"requests quote"| node_carrier_api
node_quote_controller -.->|"returns rates"| node_checkout
node_staff -->|"starts sync"| node_sync_button
node_sync_button -->|"calls refresh"| node_delivery_records
node_webhook_sender -.->|"sends events"| node_webhook_controller
node_webhook_controller -->|"finds and updates picking"| node_odoo_records
node_staff -.->|"configures delivery"| node_views
node_staff -->|"opens quote page"| node_quote_page

click node_picking "https://github.com/fractal-solutions/uber_carrier/blob/main/models/request_uber_pickup.py"
click node_barcode "https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_delivery_barcode.py"
click node_carrier_api "https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_base_api.py"
click node_quote_controller "https://github.com/fractal-solutions/uber_carrier/blob/main/controllers/main.py"
click node_webhook_controller "https://github.com/fractal-solutions/uber_carrier/blob/main/controllers/main.py"
click node_quote_page "https://github.com/fractal-solutions/uber_carrier/blob/main/static/uber_quote_frontend.html"
click node_delivery_records "https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_details.py"
click node_sync_button "https://github.com/fractal-solutions/uber_carrier/blob/main/static/src/js/list_sync_button.js"
click node_views "https://github.com/fractal-solutions/uber_carrier/tree/main/views"
click node_security "https://github.com/fractal-solutions/uber_carrier/tree/main/security"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_picking,node_barcode toneBlue
class node_carrier_api,node_webhook_controller toneAmber
class node_delivery_records,node_odoo_records,node_uber,node_webhook_sender toneMint
class node_quote_controller,node_quote_page,node_sync_button,node_views,node_security toneRose
class node_staff,node_checkout toneIndigo
```

## Components

### Delivery workflow

- [Stock picking](https://github.com/fractal-solutions/uber_carrier/blob/main/models/request_uber_pickup.py): `models/request_uber_pickup.py`
- [Barcode requirements](https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_delivery_barcode.py): `models/uber_delivery_barcode.py`

### Uber integration

- [Carrier API operations](https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_base_api.py): `models/uber_base_api.py`
- [Delivery webhooks](https://github.com/fractal-solutions/uber_carrier/blob/main/controllers/main.py): `controllers/main.py`

### Tracking and records

- [Delivery records](https://github.com/fractal-solutions/uber_carrier/blob/main/models/uber_details.py): `models/uber_details.py`
- **Odoo delivery records**

### Checkout and interface

- [Checkout quote routes](https://github.com/fractal-solutions/uber_carrier/blob/main/controllers/main.py): `controllers/main.py`
- [Quote page](https://github.com/fractal-solutions/uber_carrier/blob/main/static/uber_quote_frontend.html): `static/uber_quote_frontend.html`
- [Delivery sync button](https://github.com/fractal-solutions/uber_carrier/blob/main/static/src/js/list_sync_button.js): `static/src/js/list_sync_button.js`
- [Delivery configuration views](https://github.com/fractal-solutions/uber_carrier/tree/main/views): `views`
- [Access controls](https://github.com/fractal-solutions/uber_carrier/tree/main/security): `security`

### Other components

- **Odoo staff**
- **Online checkout**
- **Uber Direct API**
- **Uber webhook**

## Connections

- Odoo staff → Stock picking: manages (evidence: `models/request_uber_pickup.py`)
- Stock picking → Barcode requirements: stores requirements (evidence: `models/request_uber_pickup.py`)
- Stock picking → Carrier API operations: requests updates (evidence: `models/request_uber_pickup.py`)
- Carrier API operations → Uber Direct API: requests delivery service (evidence: `models/uber_base_api.py`)
- Carrier API operations → Odoo delivery records: writes delivery data (evidence: `models/uber_base_api.py`)
- Online checkout → Checkout quote routes: requests rates
- Checkout quote routes → Carrier API operations: requests quote
- Checkout quote routes → Online checkout: returns rates
- Odoo staff → Delivery sync button: starts sync (evidence: `static/src/js/list_sync_button.js`)
- Delivery sync button → Delivery records: calls refresh (evidence: `static/src/js/list_sync_button.js`)
- Uber webhook → Delivery webhooks: sends events
- Delivery webhooks → Odoo delivery records: finds and updates picking (evidence: `controllers/main.py`)
- Odoo staff → Delivery configuration views: configures delivery
- Odoo staff → Quote page: opens quote page
