Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions meta_whatsapp/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
=======================
Meta WhatsApp Connector
=======================

This module allows you to send WhatsApp messages using the official Meta API (v25.0).

Features
========

* Template synchronization from Meta Business Manager
* Sending template messages with parameters
* Integration with Odoo models (Contacts, Sales, etc.)

Configuration
=============

1. Go to Settings > General Settings > WhatsApp.
2. Enter your Meta API credentials.
3. Click on "Sync Templates" to fetch templates from Meta.

Usage
=====

1. Go to a Contact or any enabled model.
2. Click on "Send WhatsApp" in the action menu.
3. Select a template and send.

Authors
=======

* Your Name
* Odoo Community Association (OCA)
2 changes: 2 additions & 0 deletions meta_whatsapp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
22 changes: 22 additions & 0 deletions meta_whatsapp/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Meta WhatsApp Connector",
"version": "13.0.1.1.1",
"category": "Marketing/WhatsApp",
"summary": "Send WhatsApp messages using Meta API v25.0",
"author": "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"depends": ["base", "mail", "phone_validation"],
"data": [
"security/ir.model.access.csv",
"wizard/whatsapp_preview_views.xml",
"views/whatsapp_template_views.xml",
"views/whatsapp_message_views.xml",
"views/res_config_settings_views.xml",
"views/res_partner_views.xml",
"wizard/whatsapp_preview_views.xml",
"wizard/whatsapp_composer_views.xml",
],
"installable": True,
"application": True,
"license": "LGPL-3",
}
3 changes: 3 additions & 0 deletions meta_whatsapp/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import res_config_settings
from . import whatsapp_template
from . import whatsapp_message
29 changes: 29 additions & 0 deletions meta_whatsapp/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

meta_api_url = fields.Char(
string="Meta API URL",
config_parameter="meta_whatsapp.api_url",
default="https://graph.facebook.com",
)
meta_api_version = fields.Char(
string="Meta API Version",
config_parameter="meta_whatsapp.api_version",
default="v25.0",
)
meta_access_token = fields.Char(
string="Access Token", config_parameter="meta_whatsapp.access_token",
)
meta_phone_number_id = fields.Char(
string="Phone Number ID", config_parameter="meta_whatsapp.phone_number_id",
)
meta_waba_id = fields.Char(
string="WhatsApp Business Account ID", config_parameter="meta_whatsapp.waba_id",
)

def action_sync_whatsapp_templates(self):
"""Bridge method to sync templates from settings."""
return self.env["whatsapp.template"].action_sync_templates()
Loading
Loading