Browse Source

Jan 15 : [UPDT] Feature Updated 'integration_whatsapp_chat_live'

pull/254/merge
RisvanaCybro 1 year ago
parent
commit
8e90e1a887
  1. 35
      integration_whatsapp_chat_live/README.rst
  2. 19
      integration_whatsapp_chat_live/__manifest__.py
  3. 4
      integration_whatsapp_chat_live/doc/RELEASE_NOTES.md
  4. 38
      integration_whatsapp_chat_live/models/res_config_settings.py
  5. BIN
      integration_whatsapp_chat_live/static/description/banner.jpg
  6. BIN
      integration_whatsapp_chat_live/static/description/banner.png
  7. 31
      integration_whatsapp_chat_live/static/description/index.html
  8. 4
      integration_whatsapp_chat_live/static/src/css/wp_msg.css
  9. 23
      integration_whatsapp_chat_live/views/integration_whatsapp_chat_live_template.xml
  10. 40
      integration_whatsapp_chat_live/views/res_config_settings_views.xml
  11. 39
      integration_whatsapp_chat_live/views/settings_whatsapp.xml
  12. 22
      integration_whatsapp_chat_live/views/views.xml

35
integration_whatsapp_chat_live/README.rst

@ -1,34 +1,32 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
Whatsapp Chat Live Order Whatsapp Live Chat In Odoo V15
======================= ==============================
* Whatsapp Chat Live Order for Odoo 15 * The Whatsapp Live Chat In Odoo app is designed to facilitate real-time communication between businesses and their customers using the popular messaging platform,WhatsApp.
Installation Configuration
============ =============
- www.odoo.com/documentation/15.0/setup/install.html * No additional configurations needed
- Install our custom addon
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License License
======= =======
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3)
(http://www.gnu.org/licenses/agpl.html) (https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Company
-------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits Credits
------- -------
* Developer: v15.0 Saleekha, odoo@cybrosys.com * Developer: (v15) Saleekha, odoo@cybrosys.com
Contacts Contacts
-------- --------
* Mail Contact : odoo@cybrosys.com * Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker Bug Tracker
----------- -----------
@ -36,9 +34,12 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you
Maintainer Maintainer
========== ==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies. This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information Further information
=================== ===================

19
integration_whatsapp_chat_live/__manifest__.py

@ -19,10 +19,16 @@
# #
############################################################################# #############################################################################
{ {
'name': 'Whatsapp Chat Live Order', 'name': 'Whatsapp Live Chat In Odoo',
'version': '15.0.1.0.0', 'version': '15.0.1.0.0',
'summary': 'Send Message to partner via Whatsapp web', 'summary': """The Whatsapp Live Chat In Odoo app is designed to facilitate
'description': 'Send Message to partner via Whatsapp web', real-time communication between businesses and their customers using the
popular messaging platform,WhatsApp.""",
'description': """This module is designed to facilitate real-time
communication between businesses and their customers using the popular
messaging platform,WhatsApp.With Whatsapp Live Chat In Odoo, businesses can
offer immediate support, answer inquiries, and provide personalized
assistance to customers through the familiar WhatsApp interface.""",
'category': 'Extra Tools', 'category': 'Extra Tools',
'author': 'Cybrosys Techno solutions', 'author': 'Cybrosys Techno solutions',
'maintainer': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions',
@ -32,16 +38,15 @@
'base', 'contacts', 'stock', 'website', 'website_sale' 'base', 'contacts', 'stock', 'website', 'website_sale'
], ],
'data': [ 'data': [
'views/settings_whatsapp.xml', 'views/res_config_settings_views.xml',
'views/views.xml', 'views/integration_whatsapp_chat_live_template.xml',
], ],
'assets': { 'assets': {
'web.assets_backend': [ 'web.assets_backend': [
'integration_whatsapp_chat_live/static/src/css/wp_msg.css', 'integration_whatsapp_chat_live/static/src/css/wp_msg.css',
] ]
}, },
'images': ['static/description/banner.jpg'],
'images': ['static/description/banner.png'],
'installable': True, 'installable': True,
'application': False, 'application': False,
'auto_install': False, 'auto_install': False,

4
integration_whatsapp_chat_live/doc/RELEASE_NOTES.md

@ -1,6 +1,6 @@
## Module <integration_whatsapp_chat_live> ## Module <integration_whatsapp_chat_live>
#### 18.2.2023 #### 27.11.2023
#### Version 15.0.1.0.0 #### Version 15.0.1.0.0
##### ADD ##### ADD
- Initial Commit for Whatsapp Chat Live Order - Initial Commit for Whatsapp Live Chat In Odoo

38
integration_whatsapp_chat_live/models/res_config_settings.py

@ -18,8 +18,7 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################# #############################################################################
from odoo import fields, models
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel): class ResConfigSettings(models.TransientModel):
@ -29,37 +28,8 @@ class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings' _inherit = 'res.config.settings'
mobile_phone_no = fields.Char(srting='Mobile Phone No:', mobile_phone_no = fields.Char(srting='Mobile Phone No:',
config_parameter="integration_whatsapp_chat_live.mobile_phone_no",
help='User Can add mobile number') help='User Can add mobile number')
custom_message = fields.Text(string="Custom Message", custom_message = fields.Char(string="Custom Message",
config_parameter="integration_whatsapp_chat_live.custom_message",
help='User Can add custom message') help='User Can add custom message')
@api.model
def get_values(self):
"""
Return values for the fields mobile number and custom messages
"""
res = super(ResConfigSettings, self).get_values()
params = self.env['ir.config_parameter'].sudo()
mobile_no_id = params.get_param(
'integration_whatsapp_chat_live.mobile_phone_no')
custom_message_id = params.get_param(
'integration_whatsapp_chat_live.custom_message')
res.update(
mobile_phone_no=mobile_no_id,
custom_message=custom_message_id,
)
return res
@api.model
def set_values(self):
"""
Set values for the fields mobile number and custom messages
"""
super(ResConfigSettings, self).set_values()
self.env['ir.config_parameter'].sudo().set_param(
"integration_whatsapp_chat_live.mobile_phone_no",
self.mobile_phone_no)
self.env['ir.config_parameter'].sudo().set_param(
"integration_whatsapp_chat_live.custom_message",
self.custom_message)

BIN
integration_whatsapp_chat_live/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
integration_whatsapp_chat_live/static/description/banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

31
integration_whatsapp_chat_live/static/description/index.html

@ -17,11 +17,22 @@
<img src="./assets/icons/logo.png" <img src="./assets/icons/logo.png"
style="width: auto !important; height: 40px !important;"> style="width: auto !important; height: 40px !important;">
</div> </div>
<div class="my-3 d-flex align-items-center"> <div>
<div <div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community <i class="fa fa-check mr-1"></i>Community
</div> </div>
<div
style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div> </div>
</div> </div>
</div> </div>
@ -33,7 +44,7 @@
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;"> style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1 <h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;"> style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
WhatsApp Chat Live Order</h1> Whatsapp Live Chat In Odoo</h1>
<p <p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;"> style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Send Message to partner via WhatsApp web Send Message to partner via WhatsApp web
@ -153,10 +164,11 @@
<div> <div>
<h4 <h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Community Support</h4> Support in Community, enterprise and Odoo.sh</h4>
<p <p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Available in Odoo 15.0 Community .</p> Available in Odoo 15.0 Community, Enterprise and
Odoo.sh</p>
</div> </div>
</div> </div>
<div class="col-md-6 pl-3 py-3 d-flex"> <div class="col-md-6 pl-3 py-3 d-flex">
@ -189,7 +201,8 @@
Setting Mobile phone numbers and adding any custom messages</h4> Setting Mobile phone numbers and adding any custom messages</h4>
<p <p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Go to Website Settings > There we can give the mobile phone number, add any custom messages and save.</p> Go to Website Settings > There we can give the mobile phone
number, add any custom messages and save.</p>
<img src="assets/screenshots/settings.png" <img src="assets/screenshots/settings.png"
class="img-responsive img-thumbnail border" width="100%" class="img-responsive img-thumbnail border" width="100%"
height="auto"/> height="auto"/>
@ -227,8 +240,10 @@
Continue Chat</h4> Continue Chat</h4>
<p <p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Click Continue Chat to be redirected to the corresponding chat form for the mobile phone specified in the website settings. Click Continue to Chat to be redirected to the corresponding chat
We can also see that personalised message as well as the product we selected. form for the mobile phone specified in the website settings.
We can also see that personalised message as well as the product we
selected.
</p> </p>
<img src="assets/screenshots/countinue.png" <img src="assets/screenshots/countinue.png"
class="img-responsive img-thumbnail border" width="100%" class="img-responsive img-thumbnail border" width="100%"

4
integration_whatsapp_chat_live/static/src/css/wp_msg.css

@ -2,6 +2,10 @@
font-size:24px; font-size:24px;
font-weight:600; font-weight:600;
} }
#wp_message1{
font-size:24px;
font-weight:600;
}
.o_form_label.col-lg-3.o_light_label { .o_form_label.col-lg-3.o_light_label {
font-weight: bold; font-weight: bold;

23
integration_whatsapp_chat_live/views/integration_whatsapp_chat_live_template.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--website_sale.product template view inherited-->
<template id="whatsapp_order" inherit_id="website_sale.product"
customize_show="True" name="Select Quantity">
<xpath expr="//div[@id='add_to_cart_wrap']" position="after">
<div id="wp_msg" class="d-inline_i">
<t t-set="whatsapp_number"
t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.mobile_phone_no')"/>
<t t-set="whatsapp_message"
t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.custom_message')"/>
<t t-set="wp_product" t-value="product.name"/>
<t t-if="whatsapp_number and whatsapp_message">
<a role="button" id="wp_msgs"
class="btn btn-success js_wp_mg"
t-attf-href="https://api.whatsapp.com/send?phone=#{whatsapp_number}&amp;text=#{whatsapp_message + ' ' + wp_product}">
<i class="fa fa-whatsapp mr-2"/>Whatsapp Order
</a>
</t>
</div>
</xpath>
</template>
</odoo>

40
integration_whatsapp_chat_live/views/res_config_settings_views.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Configuration settings form view inherited-->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.integration.whatsapp.chat.live
</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="0"/>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='website_settings']" position="after">
<div id="db_backup_settings">
<h2>Whatsapp Live Order</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<div class="text-muted content-group mt16">
<label string="Whatsapp Phone No:"
for="mobile_phone_no" id="whatsapp_1"
class="col-lg-3 o_light_label"/>
<field name="mobile_phone_no"
widget='phone'/>
</div>
</div>
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<label string="Custom Message:"
for="custom_message"
class="col-lg-3 o_light_label"/>
<field name="custom_message" widget="text"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

39
integration_whatsapp_chat_live/views/settings_whatsapp.xml

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.base.setup</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="0"/>
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='website_settings']" position="after">>
<div id="db_backup_settings">
<h2>Whatsapp Live Order</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<div class="text-muted content-group mt16">
<label string="Whatsapp Phone No:" for="mobile_phone_no" id="whatsapp_1" class="col-lg-3 o_light_label"/>
<field name="mobile_phone_no" widget='phone'/>
</div>
</div>
</div>
</div><div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<div class="text-muted content-group mt16">
<label string="Custom Message:" for="custom_message" id="wp_message1" class="col-lg-3 o_light_label"/>
<field name="custom_message" />
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

22
integration_whatsapp_chat_live/views/views.xml

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="whatsapp_order" inherit_id="website_sale.product"
customize_show="True" name="Select Quantity">
<xpath expr="//div[@id='add_to_cart_wrap']" position="after">
<div id="wp_msg" class="d-inline_i">
<t t-set="whatsapp_number"
t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.mobile_phone_no')"/>
<t t-set="whatsapp_message"
t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.custom_message')"/>
<t t-set="wp_product" t-value="product.name"/>
<a role="button" id="wp_msgs"
class="btn btn-success js_wp_mg"
t-attf-href="https://api.whatsapp.com/send?phone=#{whatsapp_number}&amp;text=#{whatsapp_message + ' ' + wp_product}">
<i class="fa fa-whatsapp mr-2"/>Whatsapp Order
</a>
</div>
</xpath>
</template>
</data>
</odoo>
Loading…
Cancel
Save