Browse Source

[ADD] Initial Commit 'whatsapp_mail_messaging'

pull/168/head
Ajmal Cybro 4 years ago
parent
commit
37033bcdf4
  1. 22
      whatsapp_mail_messaging/__init__.py
  2. 49
      whatsapp_mail_messaging/__manifest__.py
  3. 10
      whatsapp_mail_messaging/doc/changelog.md
  4. 3
      whatsapp_mail_messaging/security/ir.model.access.csv
  5. BIN
      whatsapp_mail_messaging/static/description/banner.jpg
  6. BIN
      whatsapp_mail_messaging/static/description/icon.png
  7. BIN
      whatsapp_mail_messaging/static/description/images/mail_1.png
  8. BIN
      whatsapp_mail_messaging/static/description/images/mail_2.png
  9. BIN
      whatsapp_mail_messaging/static/description/images/mail_3.png
  10. BIN
      whatsapp_mail_messaging/static/description/images/screen.gif
  11. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_1.png
  12. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_2.png
  13. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_3.png
  14. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_4.png
  15. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_5.png
  16. BIN
      whatsapp_mail_messaging/static/description/images/whatsapp_6.png
  17. 791
      whatsapp_mail_messaging/static/description/index.html
  18. 24
      whatsapp_mail_messaging/static/src/js/mail_button.js
  19. 24
      whatsapp_mail_messaging/static/src/js/whatsapp_button.js
  20. 14
      whatsapp_mail_messaging/static/src/xml/mail_button.xml
  21. 14
      whatsapp_mail_messaging/static/src/xml/whatsapp_button.xml
  22. 11
      whatsapp_mail_messaging/views/assets.xml
  23. 23
      whatsapp_mail_messaging/wizard/__init__.py
  24. 55
      whatsapp_mail_messaging/wizard/wh_message_wizard.py
  25. 37
      whatsapp_mail_messaging/wizard/wh_message_wizard.xml

22
whatsapp_mail_messaging/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Sayooj A O(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import wizard

49
whatsapp_mail_messaging/__manifest__.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Sayooj A O(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Whatsapp And Mail Messaging',
'version': '14.0.1.0.0',
'category': 'Extra Tools',
'summary': """Module which allows to sent Whatsapp messages and Mails from any view of
Odoo""",
'description': """Whatsapp Odoo, Whatsapp Odoo Message, Whatsapp, Odoo Whatsapp, Module which allows to sent Whatsapp messages and Mails from any view of
Odoo""",
'author': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'depends': ['contacts', 'mail'],
'data': [
'views/assets.xml',
'wizard/wh_message_wizard.xml',
'security/ir.model.access.csv',
],
'qweb': [
'static/src/xml/whatsapp_button.xml',
'static/src/xml/mail_button.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

10
whatsapp_mail_messaging/doc/changelog.md

@ -0,0 +1,10 @@
## Module <whatsapp_mail_messaging>
#### 14.05.2021
#### Version 14.0.1.0.0
#### ADD
- Initial commit

3
whatsapp_mail_messaging/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_whatsapp_message_wizard,access.whatsapp.message.wizard,model_whatsapp_message_wizard,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_whatsapp_message_wizard access.whatsapp.message.wizard model_whatsapp_message_wizard base.group_user 1 1 1 1

BIN
whatsapp_mail_messaging/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

BIN
whatsapp_mail_messaging/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
whatsapp_mail_messaging/static/description/images/mail_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
whatsapp_mail_messaging/static/description/images/mail_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
whatsapp_mail_messaging/static/description/images/mail_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
whatsapp_mail_messaging/static/description/images/screen.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
whatsapp_mail_messaging/static/description/images/whatsapp_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

791
whatsapp_mail_messaging/static/description/index.html

@ -0,0 +1,791 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Whatsapp Mail Messaging</title>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css"
integrity="sha512-P5MgMn1jBN01asBgU0z60Qk4QxiXo86+wlFahKrsQf37c9cro517WzVSPPV1tDKzhku2iJ2FVgL67wG03SGnNA=="
crossorigin="anonymous"/>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous"/>
</head>
<!-- COLORS
red-bg: #FFECEF;
green-bg: #E4FEEE;
blue-bg: #F4F4FF;
tab-title-bg: #edf2f7
jumbotron-bg: #192a56
brand-color: #b22126
yellow-pill: #f6b93b
red-text: #F66170;
green-text: #51A26E;
blue-text: #2765FC;
grey-text: #757575;
tab-title-text: #162635;
-->
<body>
<div class="oe_styling_v8">
<section class="oe_container"
style="font-family: Roboto, 'sans-serif'; padding:2rem 3rem 1rem">
<div class="row shadow-lg"
style="max-width:1540px; margin:0 auto; border-radius: 10px;">
<!-- LEFT HERO -->
<div class="col-lg-7"
style="margin-top: 0rem; padding: 3rem 2.5rem; ">
<div style="width: 200px;">
<img src="https://www.cybrosys.com/images/logo.png"
width="150px" height="auto"/>
</div>
<h1 class="mt-4"
style="font-family: Montserrat, 'sans-serif' ; font-weight: bold;">
Whatsapp Mail Messaging</h1>
<p class="lead"
style="font-weight: 500; line-height: 1.5; color: #757575">
Send Whatsapp messages and Mails from any view of Odoo
</p>
<span class="badge px-3 py-2 depth-1"
style="background-color: #FFECEF; color: #F66170; font-weight: bold; border-radius: 1rem;"><i
class="fa fa-star mr-2"></i>Key Highlights</span>
<!-- FEATURES -->
<hr class="mt-4"
style="background: linear-gradient(to right, #e5e5e5, transparent); height: 2px; border-style: none;">
<div class="row">
<div class="col-lg-5 no-gutters">
<!-- FEATURE COLUMN LEFT -->
<ul style="list-style: none; padding: 0; font-weight: 500; line-height: 2;">
<li><i class="fa fa-check-circle mr-2"
style="color: #1abc9c;"></i>Added Whatsapp and Mail icons in Systray for easy access from any views.
</li>
<li><i class="fa fa-check-circle mr-2"
style="color: #1abc9c;"></i>Can send mails to any valid mail addresses along with attachments.
</li><li><i class="fa fa-check-circle mr-2"
style="color: #1abc9c;"></i>Can send Whatsapp messages to any valid mobile numbers.
along with country code.
</li>
<li><i class="fa fa-check-circle mr-2"
style="color: #1abc9c;"></i>After sending message from odoo then automatically
redirected to Whatsapp web with our message.
</li>
<li><i class="fa fa-check-circle mr-2"
style="color: #1abc9c;"></i>Our module also supporting the emojis along with the whatsapp messages.
</ul>
</div>
</div>
<hr class="mt-4"
style="background: linear-gradient(to right, #e5e5e5, transparent); height: 2px; border-style: none;">
<!-- END OF FEATURES -->
</div>
<!-- END OF LEFT HERO -->
<!-- RIGHT HERO -->
<div class="col-lg-5 d-flex align-items-center"
style="border-radius: 0px 10px 10px 0px; background-repeat: no-repeat; background-size: cover;">
<img src='images/screen.gif'
style="width:90%; height: auto; margin: 0 auto;"
class="shadow-lg"/>
<!-- <center>
<img src="https://i.ibb.co/Zg7Z8jT/gnatt-scrn.png"-->
<!-- style="width:90%; height: auto; margin: 0 auto;" class="shadow-lg">-->
<!-- </center> &ndash;&gt;-->
</div>
<!-- END OF RIGHT HERO -->
</div>
<section class="oe_container" style="margin-top: 4rem;">
<div class="row"
style="max-width:1540px; margin:0 auto; padding-bottom:64px;">
<div class="col-lg-12">
<!-- TAB LIST -->
<ul class="nav nav-tabs d-flex justify-content-center"
role="tablist"
style="background-color:unset; margin:0 auto;">
<li class="nav-item">
<a class="nav-link active" style="color: #000;"
data-toggle="tab" href="#tabs-1"
role="tab"><i class="fa fa-pie-chart mr-2"></i>Overview</a>
</li>
<li class="nav-item">
<a class="nav-link" style="color: #000;"
data-toggle="tab" href="#tabs-3" role="tab"><i
class="fa fa-star mr-2"></i>Features</a>
</li>
<li class="nav-item">
<a class="nav-link" style="color: #000;"
data-toggle="tab" href="#tabs-4" role="tab"><i
class="fa fa-picture-o mr-2"></i>Screenshots</a>
</li>
</ul>
</div>
<div class="col-lg-12">
<!-- Tab panes -->
<div class="tab-content" style="padding: 2rem;">
<div class="tab-pane active" id="tabs-1"
role="tabpanel">
<h3 class="text-center rounded px-3 py-2 mb-4"
style="background-color:#edf2f7; color: #162635; font-family: Roboto, 'sans-serif'; font-weight: bold;">
Overview</h3>
<p class="text-justify">In this module we have added Whatsapp and Mail icon in the systray bar which
the user can send messages through whatsapp and mail from any view using these icons.The mails will be sent from the mail
which we configured as the outgoing mail server and in case of whatsapp message, it will redirected to the whatsapp web.</p>
</div>
<div class="tab-pane" id="tabs-3" role="tabpanel">
<h3 class="text-center rounded px-3 py-2 mb-4"
style="background-color:#edf2f7; color: #162635; font-family: Roboto, 'sans-serif'; font-weight: bold;">
Features</h3>
<ul style="max-width: 1200px;">
<li>
<h5 style="font-family: Roboto, 'sans-serif';">
Added Whatsapp and Mail icons in Systray for easy access from any views.</h5>
</li>
<li>
<h5 style="font-family: Roboto, 'sans-serif';">
Can send mails to any valid mail addresses along with attachments.</h5>
</li>
<li>
<h5 style="font-family: Roboto, 'sans-serif';">
Can send Whatsapp messages to any valid mobile numbers.
along with country code.</h5>
</li>
<li>
<h5 style="font-family: Roboto, 'sans-serif';">
After sending message from odoo then automatically
redirected to Whatsapp web with our message.</h5>
</li>
<li>
<h5 style="font-family: Roboto, 'sans-serif';">
Our module also supporting the emojis along with the whatsapp messages.</h5>
</li>
</ul>
</div>
<div class="tab-pane" id="tabs-4" role="tabpanel">
<h3 class="text-center rounded px-3 py-2 mb-4"
style="background-color:#edf2f7; color: #162635; font-family: Roboto, 'sans-serif'; font-weight: bold;">
Screenshots</h3>
<div>
<section class="oe_container">
<div id="demo"
class="row carousel slide mb32"
data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>
We will have a Mail icon in the systray bar after the installation of our module.
</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/mail_1.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>
By Clicking on the Mail
icon we will have the message
composing wizard, from there we can select the recipient and can add the subject,
content and attachments.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/mail_2.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>After click on sent the recipient will receive a mail like we composed from odoo.
This mail will be sent from the outgoing mail server which we configured in the database.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/mail_3.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>We will have a Whatsapp icon in the case of sending Whatsapp messages to a number.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_1.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>In case of selecting a contact directly for sending message the we have to fill the field
mobile in the contact form.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_2.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>After clicking on the whatsapp icon, we will have the message composing
wizard from there we can select the contact, enter the mobile number along with the country code and
content of the message along with emojis.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_3.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>We can choose any of the emojis to our message listed below.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_4.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>After click on send it will redirected to the whatsapp web with our message.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_5.png">
</div>
</div>
</div>
<div class="carousel-item"
style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<i class="fa fa-check-circle-o"
style="width:40px; color:#07B700"></i>The message will available in the chat of the corresponding number in our contact.</h3>
<div style=""><img
class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/whatsapp_6.png">
</div>
</div>
</div>
</div>
</div>
<a class="carousel-control-prev"
href="#demo" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span
class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next"
href="#demo" data-slide="next"
style="right:-25px;width: 35px;color: #000;"> <span
class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</section>
</div>
</div>
</div>
<!-- END OF TAB LIST -->
</div>
</div>
</section>
<!-- Suggested Products -->
<section class="oe_container"
style="padding:2rem 3rem 1rem; max-width:1540px; margin: 0 auto; ">
<h2 style="font-weight:600; text-align:center; margin-bottom:1rem; width:100%">
Suggested Products</h2>
<hr
style="background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<div id="suggestedSlider" class="row carousel slide mt-4"
data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item" style="min-height: 191px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/12.0/accounting_dynamic_reports/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/project_task_timer.png?ae168aa">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/13.0/project_report_pdf/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/project_repo.png?ae168aa">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/project_gantt.png?ae168aa">
</div>
</a>
</div>
</div>
<div class="carousel-item active" style="min-height: 191px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/12.0/project_task_timer/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/task_image.png?ae168aa">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/base_accounting_kit/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/reminder.png?ae168aa">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/12.0/project_report_pdf/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="//apps.odoocdn.com/apps/assets/14.0/custom_gantt_view/images/project_report.png?ae168aa">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#suggestedSlider"
data-slide="prev"
style="width:35px; color:#000">
<span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span> </a> <a
class="carousel-control-next"
href="#suggestedSlider" data-slide="next"
style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</section>
<!-- End of Suggested Products -->
<!-- Our Services -->
<section class="oe_container" style="padding:2rem 3rem 1rem">
<!-- <h2 style="font-weight:600; text-align:center; margin-bottom:1rem; width:100%">Our Services</h2>
<hr
style="background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;"> -->
<div class="row mt-4 position-relative"
style="max-width:1540px; margin: 0 auto;">
<div class="col-lg-12 jumbotron text-white position-relative shadow-sm"
style="background-color: #b22126; background-image: url('https://i.ibb.co/k9GHmT0/arrows-transparent.png'); background-size: cover; background-position: bottom; border-radius: 10px;">
<span class="badge badge-pill px-3 py-2 text-dark shadow-sm font-weight-bold"
style="background-color: #f6b93b;"><i
class="fa fa-trophy mr-2"></i>Odoo Gold Partner</span>
<div class="row">
<div class="col-lg-6 mt-4">
<h1 style="font-family: Roboto, 'sans-serif'; color:#FFF;">
Our Services</h1>
<p class="lead">We provide following services</p>
<ul class="mt-4"
style="list-style: none; padding: 0; line-height: 2.8; font-weight: 500;">
<li>
<a href="https://www.cybrosys.com/odoo-customization-and-installation/"
style="color: white; text-decoration: none;"
target="_blank"><i
class="fa fa-cogs mr-2"
style="color: #f6b93b; font-size: 1.5rem"></i>Odoo
Customization</a></li>
<li>
<a href="https://www.cybrosys.com/odoo-erp-implementation/"
style="color: white; text-decoration: none;"
target="_blank"><i
class="fa fa-wrench mr-2"
style="color: #f6b93b; font-size: 1.5rem"></i>Odoo
Implementation</a></li>
<li><a href="https://www.cybrosys.com/odoo-erp-support/"
style="color: white; text-decoration: none;"
target="_blank"><i
class="fa fa-life-ring mr-2"
style="color: #f6b93b; font-size: 1.5rem"></i>Odoo
Support</a></li>
<li>
<a href="https://www.cybrosys.com/hire-odoo-developer/"
style="color: white; text-decoration: none;"
target="_blank"><i
class="fa fa-user mr-2"
style="color: #f6b93b; font-size: 1.5rem"></i>
Hire
Odoo Developers</a></li>
</ul>
</div>
</div>
</div>
<img src="https://i.ibb.co/YLRGpvL/trophy.png" width="50%" height="auto"
alt="Odoo Gold Partner"
class="position-absolute" style="right: 0; bottom: 0;">
</div>
</section>
<!-- End of Our Services -->
<!-- Our Industries -->
<section class="oe_container" style="padding:2rem 3rem 1rem">
<div class="row" style="max-width:1540px; margin: 0 auto; ">
<div class="col-lg-12">
<h2 style="font-weight:600; text-align:center; margin-bottom:1rem; width:100%">
Our
Industries</h2>
<hr
style="background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
</div>
<div class="row mt-4 position-relative"
style="max-width:1540px; margin: 0 auto;">
<!-- Left Column -->
<div class="col-lg-6">
<div class="bg-white shadow px-4 py-3 mb-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/"
target="_blank"
class="text-dark" style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/J3HsKWB/trading.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Trading</h4>
<p style="font-weight: 300;">Easily procure and
sell your products</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/"
target="_blank" class="text-dark"
style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/ssmySQK/education.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Education</h4>
<p style="font-weight: 300;">A Collaborative
platform for educational
management</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/"
target="_blank" class="text-dark"
style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/fx6j6zY/manufacturing.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Manufacturing</h4>
<p style="font-weight: 300;">Plan, track and
schedule your operations</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/"
target="_blank"
class="text-dark" style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/z6TK3yK/ecom.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
E-commerce & Website</h4>
<p style="font-weight: 300;">Mobile friendly,
awe-inspiring product pages
</p>
</div>
</div>
</a>
</div>
</div>
<!-- End of Left Column -->
<!-- Right Column -->
<div class="col-lg-6">
<div class="bg-white shadow px-4 py-3 mb-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/"
target="_blank"
class="text-dark" style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/Hh9pqjY/pos.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
POS</h4>
<p style="font-weight: 300;">Easy configuring
and convivial selling</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/"
target="_blank"
class="text-dark" style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/541x9sq/service.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Service Management</h4>
<p style="font-weight: 300;">Keep track of
services and invoice accordingly
</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/"
target="_blank" class="text-dark"
style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/wYjn3HB/restaurant.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Restaurant</h4>
<p style="font-weight: 300;">Run your bar or
restaurant methodica</p>
</div>
</div>
</a>
</div>
<div class="bg-white shadow px-4 py-3 my-3"
style="border-radius: 10px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/"
target="_blank"
class="text-dark" style="text-decoration: none;">
<div class="row">
<div class="col-lg-3 no-gutters">
<img src="https://i.ibb.co/XbkbpwV/hotel.png">
</div>
<div class="col-lg-9 no-gutters pt-3">
<h4 style="font-family: Roboto, 'sans-serif">
Hotel Management</h4>
<p style="font-weight: 300;">An all-inclusive
hotel management application
</p>
</div>
</div>
</a>
</div>
</div>
<!-- End of Right Column -->
</div>
</div>
</section>
<!-- End of Our Industries-->
<!-- Footer Section -->
<section class="oe_container" style="padding:2rem 3rem 1rem">
<div class="row" style="max-width:1540px; margin: 0 auto; ">
<div class="col-lg-12 mb-4">
<h2 style="font-weight:600; text-align:center; margin-bottom:1rem; width:100%">
Need Help?</h2>
<hr
style="background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto;">
<div class="col-lg-3 shadow mt-2"
style="padding: 5rem 2rem 2rem; border-radius: 10px; margin-right: 3rem; border-top: 7px solid #546E7A; height: 300px;">
<h5 class="font-weight-bold"
style="font-family: Roboto, 'sans-serif';">Visit us</h5>
<p class="mb-4" style="color: #808e9b; font-size: 0.9rem;">Visit our
website for more
information.</p>
<a href="https://cybrosys.com" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #546E7A; color: #FFF; border-radius: 4px;">www.cybrosys.com</a>
</div>
<div class="col-lg-3 shadow mt-2"
style="padding: 5rem 2rem 2rem; border-radius: 10px; margin-right: 3rem; border-top: 7px solid #b22126; height: 330px;">
<h5 class="font-weight-bold"
style="font-family: Roboto, 'sans-serif';">Write to us</h5>
<p class="mb-4" style="color: #808e9b; font-size: 0.9rem;">Do you
have any queries regarding our
products &amp; services? Let us know.</p>
<a href="mailto:odoo@cybrosys.com" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #b22126; color: #FFF; border-radius: 4px;">odoo@cybrosys.com</a>
<a href="mailto:info@cybrosys.com" target="_blank"
class="btn btn-block deep_hover"
style="text-decoration: none; background-color: #b22126; color: #FFF; border-radius: 4px;">info@cybrosys.com</a>
</div>
b
<div class="col-lg-3 shadow mt-2"
style="padding: 5rem 2rem 2rem; border-radius: 10px; margin-right: 3rem; border-top: 7px solid #546E7A; height: 300px;">
<h5 class="font-weight-bold"
style="font-family: Roboto, 'sans-serif';">Follow Us</h5>
<p class="mb-4" style="color: #808e9b; font-size: 0.9rem;">Follow us
on social media for latest
updates.</p>
<div class="d-flex justify-content-begin align-items-center">
<a href="https://www.facebook.com/cybrosystechnologies"
target="_blank"
class="btn mb-2 mr-2 deep_hover d-flex justify-content-center align-items-center"
style="text-decoration: none; background-color:#3b5998; color: #fff; height: 35px; width: 35px; border-radius: 4px;"><i
class="fa fa-facebook"></i></a>
<a href="https://twitter.com/cybrosys" target="_blank"
class="btn mb-2 mr-2 deep_hover d-flex justify-content-center align-items-center"
style="text-decoration: none; background-color:#00acee ; color: #fff ; height: 35px; width: 35px; border-radius: 4px;"><i
class="fa fa-twitter"></i></a>
<a href="https://www.youtube.com/channel/UCKjWLm7iCyOYINVspCSanjg"
target="_blank"
class="btn mb-2 mr-2 deep_hover d-flex justify-content-center align-items-center"
style="text-decoration: none; background-color:#FF0000 ; color: #fff ; height: 35px; width: 35px; border-radius: 4px;"><i
class="fa fa-play"></i></a>
<a href="https://medium.com/cybrosys" target="_blank"
class="btn mb-2 deep_hover d-flex justify-content-center align-items-center"
style="text-decoration: none; background-color:#000 ; color: #fff ; height: 35px; width: 35px; border-radius: 4px;"><i
class="fa fa-medium"></i></a>
</div>
</div>
<!-- End of Contact Cards -->
</div>
</section>
</div>
<!-- Footer -->
<section class="oe_container" style="padding:2rem 3rem 1rem;">
<div class="row"
style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center"
style="margin-top: 4rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px"
height="auto"/>
</div>
<!-- End of Logo -->
<div class="col-lg-12" style="margin-top: 2rem;">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"
integrity="sha512-wV7Yj1alIZDqZFCUQJy85VN+qvEIly93fIQAN7iqDFCPEucLCeNFz4r35FCo9s6WrpdDQPi80xbljXB8Bjtvcg=="
crossorigin="anonymous"></script>
</body>

24
whatsapp_mail_messaging/static/src/js/mail_button.js

@ -0,0 +1,24 @@
odoo.define('global_mail_message.mail_button', function(require) {
"use strict";
var SystrayMenu = require('web.SystrayMenu');
var Widget = require('web.Widget');
var ActionMenu = Widget.extend({
template: 'global_mail_message.mail_icon',
events: {
'click .mail_icon': 'onclick_mail_icon',
},
onclick_mail_icon: function() {
var self = this;
self.do_action({
name: 'Compose Mail',
res_model: 'mail.compose.message',
views: [[false, 'form']],
type: 'ir.actions.act_window',
view_mode: 'form',
target: 'new'
});
},
});
SystrayMenu.Items.push(ActionMenu);
return ActionMenu;
});

24
whatsapp_mail_messaging/static/src/js/whatsapp_button.js

@ -0,0 +1,24 @@
odoo.define('whatsapp_mail_messaging.whatsapp_button', function(require) {
"use strict";
var SystrayMenu = require('web.SystrayMenu');
var Widget = require('web.Widget');
var ActionMenu = Widget.extend({
template: 'whatsapp_mail_messaging.whatsapp_icon',
events: {
'click .whatsapp_icon': 'onclick_whatsapp_icon',
},
onclick_whatsapp_icon: function() {
var self = this;
self.do_action({
name: 'Compose Whatsapp Message',
res_model: 'whatsapp.message.wizard',
views: [[false, 'form']],
type: 'ir.actions.act_window',
view_mode: 'form',
target: 'new'
});
},
});
SystrayMenu.Items.push(ActionMenu);
return ActionMenu;
});

14
whatsapp_mail_messaging/static/src/xml/mail_button.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="global_mail_message.mail_icon">
<li class="new_icon">
<label class="mail_icon" style="margin-bottom:0px;" title="Send a Message Through Mail">
<div class="icon_div">
<div class="toggle-icon">
<i class="fa fa-envelope" id="fa-icon"/>
</div>
</div>
</label>
</li>
</t>
</templates>

14
whatsapp_mail_messaging/static/src/xml/whatsapp_button.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="whatsapp_mail_messaging.whatsapp_icon">
<li class="new_icon">
<label class="whatsapp_icon" style="margin-bottom:0px;" title="Send Message Through Whatsapp">
<div class="icon_div">
<div class="toggle-icon">
<i class="fa fa-whatsapp" id="fa-icon"/>
</div>
</div>
</label>
</li>
</t>
</templates>

11
whatsapp_mail_messaging/views/assets.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="systray_new_icon" inherit_id="web.assets_backend">
<xpath expr=".">
<script type="text/javascript" src="/whatsapp_mail_messaging/static/src/js/whatsapp_button.js"/>
<script type="text/javascript" src="/whatsapp_mail_messaging/static/src/js/mail_button.js"/>
</xpath>
</template>
</data>
</odoo>

23
whatsapp_mail_messaging/wizard/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Sayooj A O(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import wh_message_wizard

55
whatsapp_mail_messaging/wizard/wh_message_wizard.py

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Sayooj A O(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
class WhatsappSendMessage(models.TransientModel):
_name = 'whatsapp.message.wizard'
partner_id = fields.Many2one('res.partner', string="Recipient")
mobile = fields.Char(required=True, string="Contact Number")
message = fields.Text(string="Message", required=True)
image_1920 = fields.Binary(readonly=1)
@api.onchange('partner_id')
def _onchange_partner_id(self):
"""Function for fetching the mobile number and image of partner
in Odoo"""
self.mobile = self.partner_id.mobile
self.image_1920 = self.partner_id.image_1920
def send_message(self):
"""In this function we are redirecting to the whatsapp web
with required parameters"""
if self.message and self.mobile:
message_string = ''
message = self.message.split(' ')
for msg in message:
message_string = message_string + msg + '%20'
message_string = message_string[:(len(message_string) - 3)]
return {
'type': 'ir.actions.act_url',
'url': "https://api.whatsapp.com/send?phone=" + self.mobile + "&text=" + message_string,
'target': 'new',
'res_id': self.id,
}

37
whatsapp_mail_messaging/wizard/wh_message_wizard.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="whatsapp_message_wizard_form" model="ir.ui.view">
<field name="name">whatsapp.message.wizard.form</field>
<field name="model">whatsapp.message.wizard</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Whatsapp Message">
<script>
$(document).ready(function(){
$('.modal-dialog').css({'width': '70%', 'height': '60%'});
$('.modal-content').css({'height': '100%'});
$('.modal-body').css({'height': '100%'});
});
</script>
<group col="2" colspan="4">
<group>
<field name="partner_id"/>
<field name="mobile"/>
<field name="message" widget="text_emojis"/>
</group>
<group>
<field name="image_1920" widget='image' class="oe_avatar"
options='{"preview_image": "image", "size": [150, 150]}' nolabel="1"/>
</group>
</group>
<footer>
<button name="send_message" string="Send" type="object" class="oe_highlight"
icon="fa-whatsapp"/>
<button name="cancel" string="Cancel" special="cancel"/>
</footer>
</form>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save