# abdelrahmanshahrour/odoo_whatsapp_redirect architecture

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

- Interactive diagram: https://gitdiagram.com/abdelrahmanshahrour/odoo_whatsapp_redirect
- Repository: https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect

## Overview

This is a small Odoo addon for a WhatsApp redirect link and a custom phone field. The visible workflow is an Odoo phone field enhanced with a send button that reads the field value and removes whitespace before formatting it. The README identifies the redirect capability, but the button’s XML template is not shown, so its exact link behavior cannot be verified. The manifest registers the component assets; no server-side processing or persistent storage is evidenced.

Main entry points: [`static/src/components/wa_button/wa_button.js`](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.js) (WhatsApp button logic), [`static/src/components/phone_field/phone_field.js`](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/phone_field/phone_field.js) (Phone field patch), [`__manifest__.py`](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/__manifest__.py) (Asset registration), [`static/src/components/wa_button/wa_button.xml`](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.xml) (Button template)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Odoo user"))
node_phone_field["Phone field patch<br/>[phone_field.js]"]
node_wa_button["WhatsApp button logic<br/>[wa_button.js]"]
node_wa_template["Button template<br/>[wa_button.xml]"]
node_whatsapp["WhatsApp redirect"]
node_manifest["Asset registration<br/>[__manifest__.py]"]

node_user -->|"uses"| node_phone_field
node_phone_field -->|"adds component"| node_wa_button
node_wa_button -->|"selects template"| node_wa_template
node_wa_button -.->|"redirects to"| node_whatsapp
node_manifest -->|"registers assets"| node_phone_field
node_manifest -->|"registers assets"| node_wa_button

click node_phone_field "https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/phone_field/phone_field.js"
click node_wa_button "https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.js"
click node_wa_template "https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.xml"
click node_manifest "https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/__manifest__.py"

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_user toneBlue
class node_phone_field,node_wa_button,node_wa_template,node_manifest toneTeal
class node_whatsapp toneIndigo
```

## Components

### Other components

- **Odoo user**
- [Phone field patch](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/phone_field/phone_field.js): `static/src/components/phone_field/phone_field.js`
- [WhatsApp button logic](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.js): `static/src/components/wa_button/wa_button.js`
- [Button template](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/static/src/components/wa_button/wa_button.xml): `static/src/components/wa_button/wa_button.xml`
- **WhatsApp redirect**
- [Asset registration](https://github.com/abdelrahmanshahrour/odoo_whatsapp_redirect/blob/main/__manifest__.py): `__manifest__.py`

## Connections

- Odoo user → Phone field patch: uses (evidence: `README.md`)
- Phone field patch → WhatsApp button logic: adds component (evidence: `static/src/components/phone_field/phone_field.js`)
- WhatsApp button logic → Button template: selects template (evidence: `static/src/components/wa_button/wa_button.js`)
- WhatsApp button logic → WhatsApp redirect: redirects to (evidence: `README.md`)
- Asset registration → Phone field patch: registers assets (evidence: `__manifest__.py`)
- Asset registration → WhatsApp button logic: registers assets (evidence: `__manifest__.py`)
