forked from Mapan/odoo17e
114 lines
6.6 KiB
XML
114 lines
6.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<record id="whatsapp_account_view_tree" model="ir.ui.view">
|
|
<field name="name">whatsapp.account.view.tree</field>
|
|
<field name="model">whatsapp.account</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name"/>
|
|
<field name="phone_uid"/>
|
|
<field name="account_uid"/>
|
|
<field name="app_uid"/>
|
|
<field name="allowed_company_ids" widget="many2many_tags" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="whatsapp_account_view_form" model="ir.ui.view">
|
|
<field name="name">whatsapp.account.view.form</field>
|
|
<field name="model">whatsapp.account</field>
|
|
<field name="arch" type="xml">
|
|
<form string="WhatsApp Business Account">
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button type="object" name="action_open_templates" class="oe_stat_button" icon="fa-whatsapp">
|
|
<field name="templates_count" string="Templates" widget="statinfo"/>
|
|
</button>
|
|
</div>
|
|
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
|
<div class="oe_title" id='title'>
|
|
<label for="name" string="Name"/>
|
|
<h1 id="name"><field name="name" required="1" placeholder="e.g. Odoo"/></h1>
|
|
</div>
|
|
<h2>Sending messages <a href="https://www.odoo.com/documentation/17.0/applications/productivity/whatsapp.html" title="Documentation" class="o_doc_link" target="_blank"></a></h2>
|
|
<p>This configuration is for sending the WhatsApp</p>
|
|
<field name="active" invisible="1"/>
|
|
<div class="row mt16 o_settings_container" id="tosend_msg">
|
|
<setting documentation="https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#phone-number">
|
|
<field name="phone_uid" required="1" placeholder="e.g. 123456789012345"/>
|
|
</setting>
|
|
<setting>
|
|
<field name="account_uid" placeholder="e.g. 123456789012345"/>
|
|
</setting>
|
|
<setting documentation="https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#system-user-access-tokens">
|
|
<field name="token" password="True" placeholder="e.g. EGTRWHRTHETHWRBTEJETHGQEGWRHWR"/>
|
|
</setting>
|
|
<setting>
|
|
<field name="app_secret" password="True" placeholder="e.g. 00112233445566778899aabbccddeeff"/>
|
|
</setting>
|
|
<setting documentation="https://developers.facebook.com/docs/development/create-an-app">
|
|
<field name="app_uid" placeholder="e.g. 123456789012345"/>
|
|
</setting>
|
|
<div class="content-group">
|
|
<button name="button_sync_whatsapp_account_templates" type="object" string="Sync Templates" class="btn-link p-1" icon="fa-refresh"/><br/>
|
|
<button name="button_test_connection" type="object" string="Test Connection" icon="oi-arrow-right" class="btn-link p-1"/>
|
|
</div>
|
|
</div>
|
|
<h2 class="mt16">Receiving messages <a href="https://www.odoo.com/documentation/17.0/applications/productivity/whatsapp.html" title="Documentation" class="o_doc_link" target="_blank"></a></h2>
|
|
<p>This configuration is for receiving the WhatsApp messages.</p>
|
|
<div class="row mt16 o_settings_container" id="toreceive_msg">
|
|
<setting documentation="https://developers.facebook.com/docs/whatsapp/cloud-api/guides/set-up-webhooks">
|
|
<field name="callback_url" widget="CopyClipboardURL"/>
|
|
</setting>
|
|
<setting>
|
|
<field name="webhook_verify_token" widget="CopyClipboardText"/>
|
|
</setting>
|
|
</div>
|
|
<h2 class="mt16">Control</h2>
|
|
<p>Notify users and company where this account can be used</p>
|
|
<div class="row mt16 o_settings_container" id="tocontrol">
|
|
<setting>
|
|
<field name="notify_user_ids" string="Notify users" widget="many2many_tags"/>
|
|
</setting>
|
|
<setting>
|
|
<field name="allowed_company_ids" string="Allowed companies" widget="many2many_tags" groups="base.group_multi_company" required="1"/>
|
|
</setting>
|
|
</div>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" groups="base.group_user"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="whatsapp_account_view_search" model="ir.ui.view">
|
|
<field name="name">whatsapp.account.view.search</field>
|
|
<field name="model">whatsapp.account</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="phone_uid"/>
|
|
<field name="account_uid"/>
|
|
<field name="app_uid"/>
|
|
<separator/>
|
|
<filter string="Archived" name="filter_archived" domain="[('active', '=', False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<record id="whatsapp_account_action" model="ir.actions.act_window">
|
|
<field name="name">WhatsApp Business Account</field>
|
|
<field name="res_model">whatsapp.account</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
There is no WhatsApp Business Account configured.
|
|
</p>
|
|
<p>
|
|
If you have credentials for cloud api then setup here and start using WhatsApp.
|
|
You can register a WhatsApp Business Account through
|
|
<a href="https://developers.facebook.com/docs/whatsapp/cloud-api/reference/registration" target="_blank">WhatsApp cloud api</a>
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|