diff --git a/easy_timesheet_add/README.rst b/easy_timesheet_add/README.rst new file mode 100755 index 000000000..e5628de53 --- /dev/null +++ b/easy_timesheet_add/README.rst @@ -0,0 +1,48 @@ +.. 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 + +Quick Add Timesheet +==================== +This module helps to add timesheets from systray by selecting Project, Task and Description for Timesheets. + +Configuration +============ +* No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL V3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V17) Mohammed Dilshad Tk, + (V18) Aysha Shalin + 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/easy_timesheet_add/__init__.py b/easy_timesheet_add/__init__.py new file mode 100644 index 000000000..6e5c2a6fd --- /dev/null +++ b/easy_timesheet_add/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 + + +def _pre_init_project(env): + """ Enable project stages settings """ + env["res.config.settings"].create({ + 'group_project_stages': True + }).execute() + return True diff --git a/easy_timesheet_add/__manifest__.py b/easy_timesheet_add/__manifest__.py new file mode 100755 index 000000000..e77b1485e --- /dev/null +++ b/easy_timesheet_add/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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': 'Quick Add Timesheet', + 'version': '18.0.1.0.0', + 'category': 'Project', + 'summary': """Easily Add Timesheets via Systray.""", + 'description': """This module helps to add timesheets from systray by + selecting Project, Task and Description for Timesheets.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['hr_timesheet', 'project'], + 'assets': { + 'web.assets_backend': [ + 'easy_timesheet_add/static/src/js/TimesheetSystray.js', + 'easy_timesheet_add/static/src/xml/TimesheetSystray.xml', + ] + }, + 'pre_init_hook': '_pre_init_project', + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/easy_timesheet_add/doc/RELEASE_NOTES.md b/easy_timesheet_add/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..f6e23348c --- /dev/null +++ b/easy_timesheet_add/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 29.01.2025 +#### Version 18.0.1.0.0 +##### ADD +- Initial commit for Quick Add Timesheet diff --git a/easy_timesheet_add/models/__init__.py b/easy_timesheet_add/models/__init__.py new file mode 100755 index 000000000..377f7eac7 --- /dev/null +++ b/easy_timesheet_add/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 account_analytic_line +from . import project_project diff --git a/easy_timesheet_add/models/account_analytic_line.py b/easy_timesheet_add/models/account_analytic_line.py new file mode 100755 index 000000000..de4778cf3 --- /dev/null +++ b/easy_timesheet_add/models/account_analytic_line.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 odoo import fields, models + + +class AccountAnalyticLine(models.Model): + """ Inherits account_analytic_line to store timesheet adding via systray """ + _inherit = 'account.analytic.line' + + start_time = fields.Datetime(help="To store start time of timesheet") + end_time = fields.Datetime(help="To store end time of timesheet") + current_state = fields.Selection([('play', 'play'), ('pause', 'pause')], + help="To manage the timesheet adding via " + "systray") + pausing_time = fields.Char(help="To store time on pausing") + is_current = fields.Boolean(help="Check is timesheet completed or not") diff --git a/easy_timesheet_add/models/project_project.py b/easy_timesheet_add/models/project_project.py new file mode 100644 index 000000000..b93118c15 --- /dev/null +++ b/easy_timesheet_add/models/project_project.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 odoo import models + + +class ProjectProject(models.Model): + """ Fetch Project Records """ + _inherit = 'project.project' + + def project_records(self): + """ Fetch all project details """ + projects = self.search_read([], ['id', 'name']) + return projects + + +class ProjectTask(models.Model): + """ Fetch task records """ + _inherit = 'project.task' + + def task_records(self): + """ Fetch all task details """ + tasks = self.search_read([], ['id', 'name']) + return tasks diff --git a/easy_timesheet_add/static/description/assets/icons/arrows-repeat.svg b/easy_timesheet_add/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-1.png b/easy_timesheet_add/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/banner-1.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/banner-2.svg b/easy_timesheet_add/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-bg.png b/easy_timesheet_add/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/banner-bg.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/banner-bg.svg b/easy_timesheet_add/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-call.svg b/easy_timesheet_add/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-mail.svg b/easy_timesheet_add/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-pattern.svg b/easy_timesheet_add/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/banner-promo.svg b/easy_timesheet_add/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/brand-pair.svg b/easy_timesheet_add/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/check.png b/easy_timesheet_add/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/check.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/chevron.png b/easy_timesheet_add/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/chevron.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/close-icon.svg b/easy_timesheet_add/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/cogs.png b/easy_timesheet_add/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/cogs.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/collabarate-icon.svg b/easy_timesheet_add/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/easy_timesheet_add/static/description/assets/icons/consultation.png b/easy_timesheet_add/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/consultation.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/cybro-logo.png b/easy_timesheet_add/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/cybro-logo.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/down.svg b/easy_timesheet_add/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/easy_timesheet_add/static/description/assets/icons/ecom-black.png b/easy_timesheet_add/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/ecom-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/education-black.png b/easy_timesheet_add/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/education-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/faq.png b/easy_timesheet_add/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/faq.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/feature-icon.svg b/easy_timesheet_add/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/feature.png b/easy_timesheet_add/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/feature.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/gear.svg b/easy_timesheet_add/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/hero.gif b/easy_timesheet_add/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/hero.gif differ diff --git a/easy_timesheet_add/static/description/assets/icons/hire-odoo.svg b/easy_timesheet_add/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/hotel-black.png b/easy_timesheet_add/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/hotel-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/license.png b/easy_timesheet_add/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/license.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/life-ring-icon.svg b/easy_timesheet_add/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/lifebuoy.png b/easy_timesheet_add/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/lifebuoy.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/mail.svg b/easy_timesheet_add/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/easy_timesheet_add/static/description/assets/icons/manufacturing-black.png b/easy_timesheet_add/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/manufacturing-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/notes.png b/easy_timesheet_add/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/notes.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/notification icon.svg b/easy_timesheet_add/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/odoo-consultancy.svg b/easy_timesheet_add/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/odoo-licencing.svg b/easy_timesheet_add/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/easy_timesheet_add/static/description/assets/icons/odoo-logo.png b/easy_timesheet_add/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/odoo-logo.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/patter.svg b/easy_timesheet_add/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/pattern1.png b/easy_timesheet_add/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/pattern1.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/pos-black.png b/easy_timesheet_add/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/pos-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/puzzle-piece-icon.svg b/easy_timesheet_add/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/puzzle.png b/easy_timesheet_add/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/puzzle.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/replace-icon.svg b/easy_timesheet_add/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/restaurant-black.png b/easy_timesheet_add/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/restaurant-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/screenshot-main.png b/easy_timesheet_add/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/screenshot-main.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/screenshot.png b/easy_timesheet_add/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/screenshot.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/service-black.png b/easy_timesheet_add/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/service-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/skype-fill.svg b/easy_timesheet_add/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/skype.png b/easy_timesheet_add/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/skype.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/skype.svg b/easy_timesheet_add/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/easy_timesheet_add/static/description/assets/icons/star-1.svg b/easy_timesheet_add/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/star-2.svg b/easy_timesheet_add/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/support.png b/easy_timesheet_add/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/support.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/test-1 - Copy.png b/easy_timesheet_add/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/test-1 - Copy.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/test-1.png b/easy_timesheet_add/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/test-1.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/test-2.png b/easy_timesheet_add/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/test-2.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/trading-black.png b/easy_timesheet_add/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/trading-black.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/training.png b/easy_timesheet_add/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/training.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/translate.svg b/easy_timesheet_add/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/update.png b/easy_timesheet_add/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/update.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/user.png b/easy_timesheet_add/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/user.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/video.png b/easy_timesheet_add/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/video.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/whatsapp.png b/easy_timesheet_add/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/whatsapp.png differ diff --git a/easy_timesheet_add/static/description/assets/icons/wrench-icon.svg b/easy_timesheet_add/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/easy_timesheet_add/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/easy_timesheet_add/static/description/assets/icons/wrench.png b/easy_timesheet_add/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/easy_timesheet_add/static/description/assets/icons/wrench.png differ diff --git a/easy_timesheet_add/static/description/assets/modules/1.png b/easy_timesheet_add/static/description/assets/modules/1.png new file mode 100644 index 000000000..0249a98f1 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/1.png differ diff --git a/easy_timesheet_add/static/description/assets/modules/2.jpg b/easy_timesheet_add/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..4beef773c Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/2.jpg differ diff --git a/easy_timesheet_add/static/description/assets/modules/3.png b/easy_timesheet_add/static/description/assets/modules/3.png new file mode 100644 index 000000000..12117c6b7 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/3.png differ diff --git a/easy_timesheet_add/static/description/assets/modules/4.png b/easy_timesheet_add/static/description/assets/modules/4.png new file mode 100644 index 000000000..f8ba1718b Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/4.png differ diff --git a/easy_timesheet_add/static/description/assets/modules/5.jpg b/easy_timesheet_add/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5d071f8ae Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/5.jpg differ diff --git a/easy_timesheet_add/static/description/assets/modules/6.jpg b/easy_timesheet_add/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..a0b756247 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/modules/6.jpg differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/1.png b/easy_timesheet_add/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..293ebe44f Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/1.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/2.png b/easy_timesheet_add/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..c6b93aa49 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/2.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/3.png b/easy_timesheet_add/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b90f0b01e Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/3.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/4.png b/easy_timesheet_add/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..537c8bd3d Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/4.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/5.png b/easy_timesheet_add/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..a93e8893c Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/5.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/6.png b/easy_timesheet_add/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..048b09d31 Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/6.png differ diff --git a/easy_timesheet_add/static/description/assets/screenshots/hero.gif b/easy_timesheet_add/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..abd491c1f Binary files /dev/null and b/easy_timesheet_add/static/description/assets/screenshots/hero.gif differ diff --git a/easy_timesheet_add/static/description/banner.jpg b/easy_timesheet_add/static/description/banner.jpg new file mode 100644 index 000000000..6f2a5fca7 Binary files /dev/null and b/easy_timesheet_add/static/description/banner.jpg differ diff --git a/easy_timesheet_add/static/description/icon.png b/easy_timesheet_add/static/description/icon.png new file mode 100644 index 000000000..ac4fc0509 Binary files /dev/null and b/easy_timesheet_add/static/description/icon.png differ diff --git a/easy_timesheet_add/static/description/index.html b/easy_timesheet_add/static/description/index.html new file mode 100644 index 000000000..cff640b12 --- /dev/null +++ b/easy_timesheet_add/static/description/index.html @@ -0,0 +1,1126 @@ + + + + + + Quick Add Timesheet + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ A Module for Easily Adding Timesheets Via Systray. +

+

Quick Add Timesheet +

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

Key + Highlights

+
+
+
+
+ +
+
+ Access Rights for Adding Timesheets +
+

+ Users with timesheet access can see the systray icon.

+
+
+
+
+
+ +
+
+ Timer for Adding Timesheets +
+

+ Time will be added by counting the starting and ending time. +

+
+
+
+
+
+ +
+
+ Time Persists After Logout +
+

+ Time remains unchanged after logout or refresh. +

+
+
+
+
+ +
+
+
+ Quick Add Timesheet +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Stopwatch icon + + in Systray +

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

+ Select + + Project and Task +

+
+
+

+ Select project, task and click + Start button to start the time. +

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

+ Time starts + Counting +

+
+
+

+ Time gets started and user can pause the time by clicking on pause button. +

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

+ Restart After + + Pause +

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

+ Add + + Description +

+
+
+

+ After completing the task add the description + about the task and click on Stop button. +

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

+ Timesheet + + Added +

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

+ Add Timesheets easily from the Systray.

+
+ +
+
+
+
+
+
+ +
+

+ Able to Count the Time.

+
+
+
+
+
+
+
+ +
+

+ Able to Pause the Counting Time.

+
+
+
+
+
+
+
+ +
+

+ Time remains unchanged after logout or refresh.

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

+ While configuring a + backup, selecting + the Zip option will + include the + filestore in the + backup, while + choosing the Dump + option will create a + backup without the + filestore. +

+
+
+ +
+ +
+

+ Enable the "Remove + Old Backups" option + in the backup + creation view to + automatically delete + previous backups + based on the number + of days specified. +

+
+
+ +
+ +
+

+ Enable the "Notify + User" option and + specify a contact to + receive an email + containing a + detailed report with + the failure reason + and backup details. + This option will + also send an email + upon successful + backup. +

+
+
+ +
+ +
+

+ Select the backup + destination as local + storage and specify + a backup path to a + location on the + system to create + backups on your own + system. +

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

+ Latest Release 18.0.1.0.0 +

+ + 16th November, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/easy_timesheet_add/static/src/img/stopwatch.svg b/easy_timesheet_add/static/src/img/stopwatch.svg new file mode 100644 index 000000000..e3029fe83 --- /dev/null +++ b/easy_timesheet_add/static/src/img/stopwatch.svg @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/easy_timesheet_add/static/src/js/TimesheetSystray.js b/easy_timesheet_add/static/src/js/TimesheetSystray.js new file mode 100644 index 000000000..1605b6f86 --- /dev/null +++ b/easy_timesheet_add/static/src/js/TimesheetSystray.js @@ -0,0 +1,194 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dropdown } from "@web/core/dropdown/dropdown"; +import { user } from "@web/core/user"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +/** @extends Component to add methods of timesheet view */ +export class TimesheetSystray extends Component { + static template = "TimesheetSystray"; + static components = { Dropdown }; + async setup() { + this.orm = useService("orm"); + this.notification = useService("notification") + this.timesheet = useRef("Timesheet") + this.user = user; + this.state = useState({ + project: [], + task: [], + start: false, + WorkTime: null, + timer: false, + Project: 0, + Task: 0, + time: '', + paused: null, + pausedTime: null, + distance: null, + current_task : [], + Access : null + }) + if (await user.hasGroup('hr_timesheet.group_hr_timesheet_user') || + await user.hasGroup('hr_timesheet.group_hr_timesheet_approver') || + await user.hasGroup('hr_timesheet.group_timesheet_manager')) { + this.state.Access = true + this.SearchReadTimeSheet() + this.state.project = await this.orm.call('project.project', 'project_records', [[]]) + this.state.Task = await this.orm.call('project.task', 'task_records', [[]]) + } else { + this.state.Access = false + } + if (user) { + this.state.Access = true + this.SearchReadTimeSheet() + this.state.project = await this.orm.searchRead('project.project', []) + this.state.Task = await this.orm.searchRead('project.task', []) + } + else{ + this.state.Access = false + } + } + currentDT(){ + const currentDT = new Date(); + const year = currentDT.getFullYear().toString().padStart(4, '0'); + const month = String(currentDT.getMonth() + 1).padStart(2, '0'); //Months are zero-indexed. so,add 1 + const day = currentDT.getDate().toString().padStart(2, '0'); + const hours = currentDT.getHours().toString().padStart(2, '0'); + const minutes = currentDT.getMinutes().toString().padStart(2, '0'); + const seconds = currentDT.getSeconds().toString().padStart(2, '0'); + return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + } + async SearchReadTimeSheet(){ + this.user = await this.orm.searchRead('res.users', + [["id", "=", user.userId]]) + this.state.current_task = await this.orm.searchRead('account.analytic.line', + [["employee_id", "=", this.user[0].employee_id[0]], + ['is_current', '=', true]]) + if(this.state.current_task[0]){ + if(this.state.current_task[0]['end_time']){ + if(this.state.current_task[0]['current_state'] == 'pause'){ + var datetime = new Date(new Date().getTime()) + this.state.time = this.state.current_task[0]['pausing_time'] + this.state.paused = true; + this.state.WorkTime = true + }else { + this.state.WorkTime = true + this.state.time = this.state.current_task[0]['pausing_time'] + const newDate = new Date() + const timeParts = this.state.time.split(/[hms\s]+/); + this.state.paused = false; + newDate.setHours(newDate.getHours() - parseInt(timeParts[0])); + newDate.setMinutes(newDate.getMinutes() - parseInt(timeParts[1])); + newDate.setSeconds(newDate.getSeconds() - parseInt(timeParts[2])); + this.StartCountTime(new Date(newDate).getTime()) + } + }else { + this.current_time = new Date(this.state.current_task[0]['start_time']) + this.state.WorkTime = true + this.StartCountTime(this.current_time.getTime()) + } + }else { + return + } + } + /** Start counting the time **/ + async StartTime() { + this.SearchReadTimeSheet() + this.MainDiv = this.timesheet.el + if (!this.MainDiv.querySelector(".Project").value || + !this.MainDiv.querySelector(".Task").value) { + return this.notification.add(_t("Choose Project and Task"), { type:'warning'}) + } + this.state.start = true; + this.state.WorkTime = true; + this.state.time = this.MainDiv.querySelector(".time").innerHTML; + this.state.Project = this.MainDiv.querySelector(".Project").value + this.state.Task = this.MainDiv.querySelector(".Task").value + this.state.timer = new Date().getTime() + await this.orm.create("account.analytic.line", [{ + project_id: parseInt(this.state.Project), + task_id: parseInt(this.state.Task), + start_time: await this.currentDT(), + name: " ", + is_current: true + }]); + this.SearchReadTimeSheet() + } + /** Pause the time and store the time **/ + async PauseTime(){ + await this.orm.write("account.analytic.line", [this.state.current_task[0].id], { + end_time: await this.currentDT(), + pausing_time: this.state.time, + current_state: 'pause' + }) + await clearInterval(this.StopWatch); + this.state.paused = true; + this.StopWatch = null + this.SearchReadTimeSheet(); + window.location.reload(); + } + /** Start after pause and change the state **/ + async PlayTime() { + this.state.pausedTime = this.state.current_task[0].pausing_time + await this.orm.write("account.analytic.line", [this.state.current_task[0].id], { + current_state: 'play' + }) + this.SearchReadTimeSheet() + } + /** Add timesheet based on project, task and time **/ + async AddTimesheet() { + if (!this.timesheet.el.querySelector(".Description").value) { + return this.notification.add(_t("Add a Description"), { type: 'warning'}); + }else { + /** Convert 02h 30m format time => 02:30 and create timesheet**/ + const timeParts = this.state.time.split(/h |m/); + const hours = Number(timeParts[0]); + const minutes = Number(timeParts[1]); + await this.orm.write("account.analytic.line", [this.state.current_task[0].id], { + end_time: await this.currentDT(), + unit_amount: hours + minutes / 60, + name: this.timesheet.el.querySelector(".Description").value, + is_current : false + }) + } + clearInterval(this.StopWatch); + this.state.time = '' + this.state.WorkTime = false; + window.location.reload(); + } + /** Running the count down using setInterval function */ + StartCountTime(start_time) { + var self = this + self.StopWatch = setInterval(function() { + var currentTime = new Date().getTime() + self.state.distance = currentTime - start_time + var days = Math.floor(self.state.distance / (1000 * 60 * 60 * 24)); + var hours = Math.floor((self.state.distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + var minutes = Math.floor((self.state.distance % (1000 * 60 * 60)) / (1000 * 60)); + var seconds = Math.floor((self.state.distance % (1000 * 60)) / 1000); + self.state.time = [hours ? hours + 'h' : '00h', minutes ? minutes + 'm' : '00m', seconds ? seconds + 's' : '00s'].join(' '); + self.orm.write("account.analytic.line", [self.state.current_task[0].id], { + pausing_time: self.state.time + }) + }, 1000); + } + /** Filter the tasks bases on selected project **/ + async ChangeProject(project_id) { + if (project_id){ + this.state.Task = await this.orm.searchRead('project.task', + [["project_id", "=", parseInt(project_id)]]) + } + } + /** Filter the tasks bases on selected project **/ + async ChangeTask(task_id) { + if(task_id){ + var project = await this.orm.searchRead('project.project', [["task_ids", "in", [parseInt(task_id)]]]) + this.timesheet.el.querySelector(".Project").value = project[0].id + } + } +} +export const systrayItem = { + Component: TimesheetSystray, +}; +registry.category("systray").add("TimesheetSystray", systrayItem, { sequence: 105 }); diff --git a/easy_timesheet_add/static/src/xml/TimesheetSystray.xml b/easy_timesheet_add/static/src/xml/TimesheetSystray.xml new file mode 100644 index 000000000..80dd7247e --- /dev/null +++ b/easy_timesheet_add/static/src/xml/TimesheetSystray.xml @@ -0,0 +1,92 @@ + +