diff --git a/systray_world_clock/README.rst b/systray_world_clock/README.rst new file mode 100644 index 000000000..86c8fb4d5 --- /dev/null +++ b/systray_world_clock/README.rst @@ -0,0 +1,51 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Systray World Clock +=================== +Module enables user to add world clocks of selected timezones in +the systray dropdown. + +Configuration +============= +The desired timezone and title for the clocks can be configured in +the settings page. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V15) Abhijith PG, + (V17)Busthana Shirin, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit +`Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/systray_world_clock/__init__.py b/systray_world_clock/__init__.py new file mode 100644 index 000000000..ae1d44ae0 --- /dev/null +++ b/systray_world_clock/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Busthana Shirin (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/systray_world_clock/__manifest__.py b/systray_world_clock/__manifest__.py new file mode 100644 index 000000000..dcdc492a9 --- /dev/null +++ b/systray_world_clock/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Busthana Shirin (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': "Systray World Clock", + 'version': '17.0.1.0.0', + 'category': 'Productivity', + 'summary': """Keep track of the time in different countries around the + world.""", + 'description': """This module adds a world clock in the systray which + displays the time in different countries around the world. + The time zone can be customized in the settings""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base','web'], + 'data': [ + 'security/ir.model.access.csv', + 'views/systray_world_clock_config_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'systray_world_clock/static/src/js/SystrayWorldClock.js', + 'systray_world_clock/static/src/xml/systray_world_clock.xml', + 'systray_world_clock/static/src/scss/systray_world_clock.scss' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/systray_world_clock/doc/RELEASE_NOTES.md b/systray_world_clock/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1830181d8 --- /dev/null +++ b/systray_world_clock/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.01.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for Systray World Clock diff --git a/systray_world_clock/models/__init__.py b/systray_world_clock/models/__init__.py new file mode 100644 index 000000000..8843eae57 --- /dev/null +++ b/systray_world_clock/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Busthana Shirin (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import systray_world_clock_config diff --git a/systray_world_clock/models/systray_world_clock_config.py b/systray_world_clock/models/systray_world_clock_config.py new file mode 100644 index 000000000..0b684dfec --- /dev/null +++ b/systray_world_clock/models/systray_world_clock_config.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Busthana Shirin (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import pytz +from datetime import datetime +from odoo import api, fields, models +from odoo.addons.base.models.res_partner import _tz_get + + +class SystrayWorldClockConfig(models.Model): + """A model representing the configuration of a world clock in the systray. + """ + _name = 'systray.world.clock.config' + _description = 'Systray World Clock Configuration' + + name = fields.Char(string='Location', required=True, + help='Location associated with this clock.') + tz = fields.Selection(_tz_get, required=True, string='Timezone', + help='Timezone of the clock.') + offset = fields.Float(string="Offset", + help='The time difference between the timezone and ' + 'UTC, in hours.') + + @api.onchange('tz') + def _onchange_tz(self): + """Calculate the time offset between the selected timezone and UTC. + This method is called automatically whenever the timezone field is + changed. + """ + if self.tz: + utc_dt = pytz.utc.localize(datetime.utcnow()) + tz = pytz.timezone(self.tz) + local_dt = utc_dt.astimezone(tz) + self.offset = local_dt.utcoffset().total_seconds() / 3600 diff --git a/systray_world_clock/security/ir.model.access.csv b/systray_world_clock/security/ir.model.access.csv new file mode 100644 index 000000000..d7e3a33a0 --- /dev/null +++ b/systray_world_clock/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_systray_world_clock_config_user,access.systray.world.clock.config.user,model_systray_world_clock_config,base.group_user,1,1,1,1 diff --git a/systray_world_clock/static/description/assets/icons/capture (1).png b/systray_world_clock/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/capture (1).png differ diff --git a/systray_world_clock/static/description/assets/icons/check.png b/systray_world_clock/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/check.png differ diff --git a/systray_world_clock/static/description/assets/icons/chevron.png b/systray_world_clock/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/chevron.png differ diff --git a/systray_world_clock/static/description/assets/icons/cogs.png b/systray_world_clock/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/cogs.png differ diff --git a/systray_world_clock/static/description/assets/icons/consultation.png b/systray_world_clock/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/consultation.png differ diff --git a/systray_world_clock/static/description/assets/icons/ecom-black.png b/systray_world_clock/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/ecom-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/education-black.png b/systray_world_clock/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/education-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/hotel-black.png b/systray_world_clock/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/hotel-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/img.png b/systray_world_clock/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/img.png differ diff --git a/systray_world_clock/static/description/assets/icons/license.png b/systray_world_clock/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/license.png differ diff --git a/systray_world_clock/static/description/assets/icons/lifebuoy.png b/systray_world_clock/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/lifebuoy.png differ diff --git a/systray_world_clock/static/description/assets/icons/manufacturing-black.png b/systray_world_clock/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/manufacturing-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/photo-capture.png b/systray_world_clock/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/photo-capture.png differ diff --git a/systray_world_clock/static/description/assets/icons/pos-black.png b/systray_world_clock/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/pos-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/puzzle.png b/systray_world_clock/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/puzzle.png differ diff --git a/systray_world_clock/static/description/assets/icons/restaurant-black.png b/systray_world_clock/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/restaurant-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/service-black.png b/systray_world_clock/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/service-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/trading-black.png b/systray_world_clock/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/trading-black.png differ diff --git a/systray_world_clock/static/description/assets/icons/training.png b/systray_world_clock/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/training.png differ diff --git a/systray_world_clock/static/description/assets/icons/update.png b/systray_world_clock/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/update.png differ diff --git a/systray_world_clock/static/description/assets/icons/user.png b/systray_world_clock/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/user.png differ diff --git a/systray_world_clock/static/description/assets/icons/wrench.png b/systray_world_clock/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/systray_world_clock/static/description/assets/icons/wrench.png differ diff --git a/systray_world_clock/static/description/assets/misc/Cybrosys R.png b/systray_world_clock/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/systray_world_clock/static/description/assets/misc/Cybrosys R.png differ diff --git a/systray_world_clock/static/description/assets/misc/email.svg b/systray_world_clock/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/phone.svg b/systray_world_clock/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/systray_world_clock/static/description/assets/misc/star (1) 2.svg b/systray_world_clock/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/support (1) 1.svg b/systray_world_clock/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/support-email.svg b/systray_world_clock/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/tick-mark.svg b/systray_world_clock/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/whatsapp 1.svg b/systray_world_clock/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/misc/whatsapp.svg b/systray_world_clock/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/systray_world_clock/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/systray_world_clock/static/description/assets/modules/m1.png b/systray_world_clock/static/description/assets/modules/m1.png new file mode 100644 index 000000000..5acf9a06a Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m1.png differ diff --git a/systray_world_clock/static/description/assets/modules/m2.png b/systray_world_clock/static/description/assets/modules/m2.png new file mode 100644 index 000000000..0bfce1e0a Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m2.png differ diff --git a/systray_world_clock/static/description/assets/modules/m3.jpg b/systray_world_clock/static/description/assets/modules/m3.jpg new file mode 100644 index 000000000..92e954d0e Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m3.jpg differ diff --git a/systray_world_clock/static/description/assets/modules/m4.png b/systray_world_clock/static/description/assets/modules/m4.png new file mode 100644 index 000000000..4e8874e3f Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m4.png differ diff --git a/systray_world_clock/static/description/assets/modules/m5.png b/systray_world_clock/static/description/assets/modules/m5.png new file mode 100644 index 000000000..690323d0b Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m5.png differ diff --git a/systray_world_clock/static/description/assets/modules/m6.png b/systray_world_clock/static/description/assets/modules/m6.png new file mode 100644 index 000000000..ac15216fb Binary files /dev/null and b/systray_world_clock/static/description/assets/modules/m6.png differ diff --git a/systray_world_clock/static/description/assets/screenshots/hero.gif b/systray_world_clock/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..a46ce4d00 Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/hero.gif differ diff --git a/systray_world_clock/static/description/assets/screenshots/wrld1.png b/systray_world_clock/static/description/assets/screenshots/wrld1.png new file mode 100644 index 000000000..0a108c1e6 Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/wrld1.png differ diff --git a/systray_world_clock/static/description/assets/screenshots/wrld2.png b/systray_world_clock/static/description/assets/screenshots/wrld2.png new file mode 100644 index 000000000..8877a84f4 Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/wrld2.png differ diff --git a/systray_world_clock/static/description/assets/screenshots/wrld3.png b/systray_world_clock/static/description/assets/screenshots/wrld3.png new file mode 100644 index 000000000..20961533a Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/wrld3.png differ diff --git a/systray_world_clock/static/description/assets/screenshots/wrld4.png b/systray_world_clock/static/description/assets/screenshots/wrld4.png new file mode 100644 index 000000000..721dabdba Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/wrld4.png differ diff --git a/systray_world_clock/static/description/assets/screenshots/wrld5.png b/systray_world_clock/static/description/assets/screenshots/wrld5.png new file mode 100644 index 000000000..85b28de75 Binary files /dev/null and b/systray_world_clock/static/description/assets/screenshots/wrld5.png differ diff --git a/systray_world_clock/static/description/banner.jpg b/systray_world_clock/static/description/banner.jpg new file mode 100644 index 000000000..d1c43c6b4 Binary files /dev/null and b/systray_world_clock/static/description/banner.jpg differ diff --git a/systray_world_clock/static/description/icon.png b/systray_world_clock/static/description/icon.png new file mode 100644 index 000000000..ab3c05f86 Binary files /dev/null and b/systray_world_clock/static/description/icon.png differ diff --git a/systray_world_clock/static/description/index.html b/systray_world_clock/static/description/index.html new file mode 100644 index 000000000..6a847dedc --- /dev/null +++ b/systray_world_clock/static/description/index.html @@ -0,0 +1,706 @@ + + + + + + + Systray World Clock + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Systray World Clock

+

+ The World Clock in the Systray. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Different timezones.

+

+ We can add different time zones. +

+
+
+
+
+
+
+ +
+
+

+ Digital and Analogue time.

+

It displays + both analog and digital timezone. +

+
+
+
+
+
+
+ +
+
+

+ Theme

+

Shows black theme at + night. +

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Configuration

+

+ Configure the Location and Timezone + here.

+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+

+ View for Clocks. +

+

+ he globe icon in systray opens the + interface with all the clocks configured in + the settings. The settings button opens the + configuration page.

+ +
+
+
+
+ +
+
+
+
+
+
+
    +
  • + We can see Different timezones in same page. +
  • +
  • + Both Digital and Analogue time available. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:6th January 2024 +
+

+ + Initial commit for Systray World Clock

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/systray_world_clock/static/src/js/SystrayWorldClock.js b/systray_world_clock/static/src/js/SystrayWorldClock.js new file mode 100644 index 000000000..4929868ac --- /dev/null +++ b/systray_world_clock/static/src/js/SystrayWorldClock.js @@ -0,0 +1,135 @@ +/** @odoo-module **/ + +import { Component, useState, onMounted} from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; +import { Dropdown } from "@web/core/dropdown/dropdown"; +import { registry } from "@web/core/registry"; + +export class Analogue extends Component { + static template = "systray_world_clock.AnalogueInterface"; + async setup() { + super.setup(...arguments); + onMounted(() => { + this.renderClock(); + this.intrvl = setInterval(() => { + this.renderClock(); + }, 1000); + }); + } + + calcTime(offset) { + // Calculating time based on the offset + const d = new Date(), + utc = d.getTime() + (d.getTimezoneOffset() * 60000); + const nd = new Date(utc + (3600000 * offset)); + const options = { + year: 'numeric', + month: 'numeric', + day: 'numeric', + hour: 'numeric', + minute: 'numeric', + hour12: true + }; + return [nd, nd.toLocaleString('en-US', options)]; + } + + renderClock(){ + //Update the analogue clock time + let [nd, localestring] = this.calcTime(this.props.offset); + let currentClockClass = this.props.currentClockClass; + let h = (nd.getHours() % 12) + nd.getMinutes() / 59; + let m = nd.getMinutes(); + let s = nd.getSeconds(); + h *= 30; + m *= 6; + s *= 6; + const $hoursArr = document.querySelector('.' + currentClockClass + ' .hours'); + const $minutesArr = document.querySelector('.' + currentClockClass + ' .minutes'); + const $secondsArr = document.querySelector('.' + currentClockClass + ' .seconds'); + if($hoursArr){ + $hoursArr.style.transform = `rotate(${h}deg)` + $minutesArr.style.transform = `rotate(${m}deg)` + $secondsArr.style.transform = `rotate(${s}deg)` + } + if (18 <= nd.getHours() || nd.getHours() < 6) { + $('#clocks_container .clock.' + currentClockClass).addClass('night-clock'); + } + else { + $('#clocks_container .' + currentClockClass).removeClass('night-clock'); + } + } +} + +export class WorldClock extends Component { + static components = { Dropdown, Analogue } + static template = "systray_world_clock.Systray_clock"; + async setup() { + // Initialize and fetch the data from the time zone + super.setup(...arguments); + this.orm = useService("orm"); + this.action = useService("action"); + this.state = useState({ + isOpen: false, + notes: [], + + }) + const fields = ['name', 'tz', 'offset']; + const domain = []; + const result = await this.orm.call("systray.world.clock.config", "search_read", [], { + fields: ["name", "tz", "offset"], + domain: [], + }); + this.ClockConfigIds = result; + if (result.length != 0){ + this.state.isOpen = true + } + const data = [] + for (let clock of result) { + let offsetStr = clock.offset.toString().replace('.', '_'); + let currentClockClass = 'clock' + offsetStr; + this.offset = clock.offset + let [nd, localestring] = this.calcTime(clock.offset); + data.push({ + 'id': clock.id, + 'name': clock.name, + 'offset': clock.offset, + 'tz': clock.tz, + 'currentClockClass': currentClockClass + clock.id, + 'nd': nd, + 'localestring': localestring + }); + } + this.state.notes = data; + } + // Calculating time based on the offset + calcTime(offset) { + const d = new Date(), + utc = d.getTime() + (d.getTimezoneOffset() * 60000); + const nd = new Date(utc + (3600000 * offset)); + const options = { + year: 'numeric', + month: 'numeric', + day: 'numeric', + hour: 'numeric', + minute: 'numeric', + hour12: true + }; + return [nd, nd.toLocaleString('en-US', options)]; + } + //Settings view for adding the different timezone + onClickSettings(ev) { + ev.stopPropagation(); + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Clock Settings', + res_model: 'systray.world.clock.config', + view_mode: 'list, form', + views: [[false, 'list'], [false, 'form']] + }); + } +} + +export const systrayItem = { + Component: WorldClock, +}; +registry.category("systray").add("WorldClock", systrayItem, { sequence: 0 }); diff --git a/systray_world_clock/static/src/scss/systray_world_clock.scss b/systray_world_clock/static/src/scss/systray_world_clock.scss new file mode 100644 index 000000000..f15f57325 --- /dev/null +++ b/systray_world_clock/static/src/scss/systray_world_clock.scss @@ -0,0 +1,132 @@ +.systray_clock_dropdown { + padding: 2em; + width: 1100px; +} +.settings_tz { + position: relative; + top: 0.5rem; + color: blueviolet; + background: lavender; + border: aliceblue; + } + + +#clocks_container { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + .time-info { + padding: 10px 30px; + margin: 2em 0; + min-height: 50px; + border: 1px solid #dddddd; + border-radius: 10px; + background-color: transparent; + } +} +.clocks_container:not(:last-child) { + padding: 10px; + min-height: 50px; + border-bottom: 1px solid #9DA1AA; + background-color: transparent; +} +.clocks_container > p { + font-size: 20px; +} + +//button +:root { + --primary-light: #8abdff; + --primary: #6d5dfc; + --primary-dark: #5b0eeb; + --white: #FFFFFF; + --greyLight-1: #E4EBF5; + --greyLight-2: #c8d0e7; + --greyLight-3: #bec8e4; + --greyDark: #9baacf; +} +$shadow: .3rem .3rem .6rem var(--greyLight-2), +-.2rem -.2rem .5rem var(--white); +$inner-shadow: inset .2rem .2rem .5rem var(--greyLight-2), +inset -.2rem -.2rem .5rem var(--white); + +/* CLOCK */ +.clock { + grid-column: 2 / 3; + grid-row: 1 / 3; + width: 12rem; + height: 12rem; + justify-self: center; + box-shadow: $shadow; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + position: relative; + .hand { + position: absolute; + transform-origin: bottom; + bottom: 6rem; + border-radius: .2rem; + z-index: 200; + } + .hours { + width: .4rem; + height: 3.2rem; + background: var(--greyLight-3); + + } + .minutes { + width: .4rem; + height: 4.6rem; + background: var(--greyDark); + } + .seconds { + width: .2rem; + height: 5.2rem; + background: var(--primary); + } + .point { + position: absolute; + width: .8rem; + height: .8rem; + border-radius: 50%; + background: var(--primary); + z-index: 300; + } + .in-border { + width: 95%; + height: 95%; + border-radius: 50%; + display: flex; + position: relative; + box-shadow: $inner-shadow; + .center { + width: 60%; + height: 60%; + position: absolute; + box-shadow: inset 1px 1px 1px var(--greyLight-2), + inset -1px -1px 1px var(--white); + border-radius: 50%; + top: 20%; + left: 20%; + filter: blur(1px); + } + div.digit { + position: absolute; + inset: 1px; + text-align: center; + transform: rotate(calc(var(--i) * (360deg / 12))); + span { + display: inline-block; + font-size: 80%; + font-weight: 600; + transform: rotate(calc(var(--i) * (-360deg / 12))); + } + } + } +} +.night-clock { + background-color: black; + color: white; +} diff --git a/systray_world_clock/static/src/xml/systray_world_clock.xml b/systray_world_clock/static/src/xml/systray_world_clock.xml new file mode 100644 index 000000000..f842e83b6 --- /dev/null +++ b/systray_world_clock/static/src/xml/systray_world_clock.xml @@ -0,0 +1,103 @@ + + + + + + + + + + +
+ + + + + + +
+ No clocks configured. Please add a clock + in the + settings. + +
+
+
+
+
+
+ + +
+
+ +

+ + +
+
+ +

+ +
+
+ + + + +
+
+ 1 +
+
+ 2 +
+
+ 3 +
+
+ 4 +
+
+ 5 +
+
+ 6 +
+
+ 7 +
+
+ 8 +
+
+ 9 +
+
+ 10 +
+
+ 11 +
+
+ 12 +
+
+
+
+
+
+ + diff --git a/systray_world_clock/views/systray_world_clock_config_views.xml b/systray_world_clock/views/systray_world_clock_config_views.xml new file mode 100644 index 000000000..e6b7f3b0a --- /dev/null +++ b/systray_world_clock/views/systray_world_clock_config_views.xml @@ -0,0 +1,15 @@ + + + + + systray.world.clock.config.view.tree + systray.world.clock.config + + + + + + + + +