Browse Source

Dec 7 : [FIX] Bug Fixed 'website_floating_whatsapp_icon'

pull/295/head
AjmalCybro 1 year ago
parent
commit
98f409a9d4
  1. 13
      website_floating_whatsapp_icon/README.rst
  2. 2
      website_floating_whatsapp_icon/__init__.py
  3. 8
      website_floating_whatsapp_icon/__manifest__.py
  4. 6
      website_floating_whatsapp_icon/doc/RELEASE_NOTES.md
  5. 2
      website_floating_whatsapp_icon/model/__init__.py
  6. 5
      website_floating_whatsapp_icon/model/website.py
  7. 4
      website_floating_whatsapp_icon/static/src/css/whatsapp.css
  8. 76
      website_floating_whatsapp_icon/views/portal_whatsapp_view.xml
  9. 2
      website_floating_whatsapp_icon/views/website_views.xml

13
website_floating_whatsapp_icon/README.rst

@ -1,6 +1,6 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/license-LGPL--3-green.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: LGPL-3
Whatsapp Floating Icon in Website Whatsapp Floating Icon in Website
================================= =================================
@ -14,6 +14,11 @@ Company
------- -------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ * `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (LGPL v3).
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Credits Credits
------- -------
* Developers: Noorjahan @cybrosys * Developers: Noorjahan @cybrosys
@ -40,5 +45,3 @@ For support and more information, please visit `Our Website <https://cybrosys.co
Further information Further information
=================== ===================
HTML Description: `<static/description/index.html>`__ HTML Description: `<static/description/index.html>`__

2
website_floating_whatsapp_icon/__init__.py

@ -3,7 +3,7 @@
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Noorjahan N A (<https://www.cybrosys.com>) # Author: Noorjahan N A (<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER

8
website_floating_whatsapp_icon/__manifest__.py

@ -3,7 +3,7 @@
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Noorjahan N A (<https://www.cybrosys.com>) # Author: Noorjahan N A (<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -22,7 +22,7 @@
{ {
'name': 'Whatsapp Floating Icon in Website', 'name': 'Whatsapp Floating Icon in Website',
'version': '16.0.1.0.0', 'version': '16.0.1.0.1',
'category': 'Extra Tools', 'category': 'Extra Tools',
'summary': """Whatsapp Floating Icon in Website""", 'summary': """Whatsapp Floating Icon in Website""",
'description': """Whatsapp Floating Icon in Website, Website Floating WhatsApp Icon, Whatsapp Odoo Website,Whatsapp Odoo Coonector, Whatsapp website, Whatsapp""", 'description': """Whatsapp Floating Icon in Website, Website Floating WhatsApp Icon, Whatsapp Odoo Website,Whatsapp Odoo Coonector, Whatsapp website, Whatsapp""",
@ -30,10 +30,10 @@
'website': "https://www.cybrosys.com", 'website': "https://www.cybrosys.com",
'company': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions', 'maintainer': 'Cybrosys Techno Solutions',
'depends': ['base','website'], 'depends': ['base', 'website'],
'data': [ 'data': [
'views/portal_whatsapp_view.xml', 'views/portal_whatsapp_view.xml',
'views/website_inherited.xml', 'views/website_views.xml',
], ],
'images': ['static/description/banner.png'], 'images': ['static/description/banner.png'],
'assets': { 'assets': {

6
website_floating_whatsapp_icon/doc/changelog.md → website_floating_whatsapp_icon/doc/RELEASE_NOTES.md

@ -3,8 +3,4 @@
#### 16.09.2022 #### 16.09.2022
#### Version 16.0.1.0.0 #### Version 16.0.1.0.0
#### ADD #### ADD
- Initial commit - Initial commit for Whatsapp Floating Icon in Website

2
website_floating_whatsapp_icon/model/__init__.py

@ -3,7 +3,7 @@
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Noorjahan N A (<https://www.cybrosys.com>) # Author: Noorjahan N A (<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER

5
website_floating_whatsapp_icon/model/website.py

@ -3,7 +3,7 @@
# #
# Cybrosys Technologies Pvt. Ltd. # Cybrosys Technologies Pvt. Ltd.
# #
# Copyright (C) 2020-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) # Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Noorjahan N A (<https://www.cybrosys.com>) # Author: Noorjahan N A (<https://www.cybrosys.com>)
# #
# You can modify it under the terms of the GNU LESSER # You can modify it under the terms of the GNU LESSER
@ -26,4 +26,5 @@ from odoo import fields, models
class Website(models.Model): class Website(models.Model):
_inherit = 'website' _inherit = 'website'
mobile_number = fields.Char(string='Mobile Number') mobile_number = fields.Char(string='Mobile Number',
help="Your WhatsApp number")

4
website_floating_whatsapp_icon/static/src/css/whatsapp.css

@ -2,8 +2,8 @@
position:fixed; position:fixed;
width:60px; width:60px;
height:60px; height:60px;
bottom:40px; bottom: 95px;
right:40px; right: 30px;
background-color:#25d366; background-color:#25d366;
color:#FFF; color:#FFF;
border-radius:50px; border-radius:50px;

76
website_floating_whatsapp_icon/views/portal_whatsapp_view.xml

@ -1,78 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<template id="ChatToCompany" name="Chat With Company" <template id="website_whatsapp_icon" name="Website WhatsApp Icon"
inherit_id="website.footer_custom"> inherit_id="portal.frontend_layout">
<xpath expr="//div[hasclass('s_social_media')]" position="inside"> <xpath expr="//div[@id='wrapwrap']" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_1" name="Chat With Company"
inherit_id="website.template_footer_descriptive">
<xpath expr="//div[hasclass('s_social_media')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_2" name="Chat With Company"
inherit_id="website.template_footer_centered">
<xpath expr="//div[hasclass('s_social_media')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_7" name="Chat With Company"
inherit_id="website.template_footer_links">
<xpath expr="//section[hasclass('s_text_block')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_3" name="Chat With Company"
inherit_id="website.template_footer_minimalist">
<xpath expr="//div[hasclass('s_social_media ')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_4" name="Chat With Company"
inherit_id="website.template_footer_contact">
<xpath expr="//div[hasclass('s_social_media ')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_5" name="Chat With Company"
inherit_id="website.template_footer_call_to_action">
<xpath expr="//section[hasclass('s_text_block')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/>
</a>
</xpath>
</template>
<template id="ChatToCompany_6" name="Chat With Company"
inherit_id="website.template_footer_headline">
<xpath expr="//div[hasclass('s_social_media ')]" position="inside">
<a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}" <a t-attf-href="https://api.whatsapp.com/send?phone=#{website.mobile_number}"
class="cy_whatsapp_web" target="_blank"> class="cy_whatsapp_web" target="_blank">
<i class="fa fa-whatsapp cy-icon"/> <i class="fa fa-whatsapp cy-icon"/>

2
website_floating_whatsapp_icon/views/website_inherited.xml → website_floating_whatsapp_icon/views/website_views.xml

@ -6,7 +6,7 @@
<field name="inherit_id" ref="website.view_website_form"/> <field name="inherit_id" ref="website.view_website_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="name" position="after"> <field name="name" position="after">
+91<field name="mobile_number" widget="phone"/> <field name="mobile_number" widget="phone"/>
</field> </field>
</field> </field>
</record> </record>
Loading…
Cancel
Save