Browse Source

Mar 21: [ADD] Initial Commit 'pos_timesheet'

pull/278/merge
RisvanaCybro 1 year ago
parent
commit
b6bc9878e1
  1. 46
      pos_timesheet/README.rst
  2. 22
      pos_timesheet/__init__.py
  3. 57
      pos_timesheet/__manifest__.py
  4. 6
      pos_timesheet/doc/RELEASE_NOTES.md
  5. 24
      pos_timesheet/models/__init__.py
  6. 35
      pos_timesheet/models/pos_config.py
  7. 125
      pos_timesheet/models/pos_session.py
  8. 38
      pos_timesheet/models/res_config_settings.py
  9. BIN
      pos_timesheet/static/description/assets/icons/check.png
  10. BIN
      pos_timesheet/static/description/assets/icons/chevron.png
  11. BIN
      pos_timesheet/static/description/assets/icons/cogs.png
  12. BIN
      pos_timesheet/static/description/assets/icons/consultation.png
  13. BIN
      pos_timesheet/static/description/assets/icons/ecom-black.png
  14. BIN
      pos_timesheet/static/description/assets/icons/education-black.png
  15. BIN
      pos_timesheet/static/description/assets/icons/hotel-black.png
  16. BIN
      pos_timesheet/static/description/assets/icons/license.png
  17. BIN
      pos_timesheet/static/description/assets/icons/lifebuoy.png
  18. BIN
      pos_timesheet/static/description/assets/icons/manufacturing-black.png
  19. BIN
      pos_timesheet/static/description/assets/icons/pos-black.png
  20. BIN
      pos_timesheet/static/description/assets/icons/puzzle.png
  21. BIN
      pos_timesheet/static/description/assets/icons/restaurant-black.png
  22. BIN
      pos_timesheet/static/description/assets/icons/service-black.png
  23. BIN
      pos_timesheet/static/description/assets/icons/trading-black.png
  24. BIN
      pos_timesheet/static/description/assets/icons/training.png
  25. BIN
      pos_timesheet/static/description/assets/icons/update.png
  26. BIN
      pos_timesheet/static/description/assets/icons/user.png
  27. BIN
      pos_timesheet/static/description/assets/icons/wrench.png
  28. BIN
      pos_timesheet/static/description/assets/misc/categories.png
  29. BIN
      pos_timesheet/static/description/assets/misc/check-box.png
  30. BIN
      pos_timesheet/static/description/assets/misc/compass.png
  31. BIN
      pos_timesheet/static/description/assets/misc/corporate.png
  32. BIN
      pos_timesheet/static/description/assets/misc/customer-support.png
  33. BIN
      pos_timesheet/static/description/assets/misc/cybrosys-logo.png
  34. BIN
      pos_timesheet/static/description/assets/misc/features.png
  35. BIN
      pos_timesheet/static/description/assets/misc/logo.png
  36. BIN
      pos_timesheet/static/description/assets/misc/pictures.png
  37. BIN
      pos_timesheet/static/description/assets/misc/pie-chart.png
  38. BIN
      pos_timesheet/static/description/assets/misc/right-arrow.png
  39. BIN
      pos_timesheet/static/description/assets/misc/star.png
  40. BIN
      pos_timesheet/static/description/assets/misc/support.png
  41. BIN
      pos_timesheet/static/description/assets/misc/whatsapp.png
  42. BIN
      pos_timesheet/static/description/assets/modules/1.png
  43. BIN
      pos_timesheet/static/description/assets/modules/2.png
  44. BIN
      pos_timesheet/static/description/assets/modules/3.png
  45. BIN
      pos_timesheet/static/description/assets/modules/4.png
  46. BIN
      pos_timesheet/static/description/assets/modules/5.png
  47. BIN
      pos_timesheet/static/description/assets/modules/6.png
  48. BIN
      pos_timesheet/static/description/assets/screenshots/1.png
  49. BIN
      pos_timesheet/static/description/assets/screenshots/2.png
  50. BIN
      pos_timesheet/static/description/assets/screenshots/3.png
  51. BIN
      pos_timesheet/static/description/assets/screenshots/4.png
  52. BIN
      pos_timesheet/static/description/assets/screenshots/5.png
  53. BIN
      pos_timesheet/static/description/assets/screenshots/hero.gif
  54. BIN
      pos_timesheet/static/description/banner.png
  55. BIN
      pos_timesheet/static/description/icon.png
  56. 543
      pos_timesheet/static/description/index.html
  57. 15
      pos_timesheet/static/src/css/worked_hour_popup.css
  58. 35
      pos_timesheet/static/src/js/Chrome.js
  59. 24
      pos_timesheet/static/src/js/Popups/ClosePosPopup.js
  60. 114
      pos_timesheet/static/src/js/Popups/WorkedHourPopup.js
  61. 16
      pos_timesheet/static/src/js/TimeSheetButton.js
  62. 156
      pos_timesheet/static/src/js/model.js
  63. 15
      pos_timesheet/static/src/xml/CashMoveButton.xml
  64. 11
      pos_timesheet/static/src/xml/Chrome.xml
  65. 26
      pos_timesheet/static/src/xml/Popups/WorkedHourPopup.xml
  66. 10
      pos_timesheet/static/src/xml/TimeSheetButton.xml
  67. 19
      pos_timesheet/views/pos_session_views.xml
  68. 40
      pos_timesheet/views/res_config_settings_views.xml

46
pos_timesheet/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
POS Timesheet
=============
Efficiently track employees' work hours in POS.
Configuration
=============
No configuration
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (LGPL v3).
(http://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Credits
-------
Developer: (V16) Mohammed Hisam , 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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
pos_timesheet/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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 models

57
pos_timesheet/__manifest__.py

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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": "POS Timesheet",
"version": "16.0.1.0.0",
"category": "Point of Sale",
"summary": """Efficiently track employees' work hours in POS.""",
"description": """This module enhances the Point of Sale (POS) functionality by automatically
calculating timesheets for employees based on their activities in the POS.""",
"author": "Cybrosys Techno Solutions",
"company": "Cybrosys Techno Solutions",
"maintainer": "Cybrosys Techno Solutions",
"website": "https://www.cybrosys.com",
"depends": ["point_of_sale", "hr_timesheet", "project"],
"data": [
"views/res_config_settings_views.xml",
"views/pos_session_views.xml",
],
"assets": {
"point_of_sale.assets": [
"pos_timesheet/static/src/css/worked_hour_popup.css",
"pos_timesheet/static/src/js/model.js",
"pos_timesheet/static/src/js/Chrome.js",
"pos_timesheet/static/src/js/TimeSheetButton.js",
"pos_timesheet/static/src/js/Popups/ClosePosPopup.js",
"pos_timesheet/static/src/js/Popups/WorkedHourPopup.js",
"pos_timesheet/static/src/xml/Chrome.xml",
"pos_timesheet/static/src/xml/TimeSheetButton.xml",
"pos_timesheet/static/src/xml/CashMoveButton.xml",
"pos_timesheet/static/src/xml/Popups/WorkedHourPopup.xml",
],
},
"images": ["static/description/banner.png"],
"license": "LGPL-3",
"installable": True,
"auto_install": False,
"application": False,
}

6
pos_timesheet/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <pos_timesheet>
#### 20.03.2024
#### Version 16.0.1.0.0
#### ADD
- Initial commit for POS Timesheet

24
pos_timesheet/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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 res_config_settings
from . import pos_config
from . import pos_session

35
pos_timesheet/models/pos_config.py

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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 fields, models
class PosConfig(models.Model):
"""Inherits the PosConfig class for adding fields"""
_inherit = 'pos.config'
time_log = fields.Boolean(string="Time Log", default=False,
help="Track employees timesheet in pos")
project_id = fields.Many2one(
'project.project',
string="Project",
ondelete='cascade',
help="Project for the timesheet")

125
pos_timesheet/models/pos_session.py

@ -0,0 +1,125 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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 api, fields, models, _
class PosSession(models.Model):
"""Inherits the PosSession class for adding fields and functions"""
_inherit = "pos.session"
task_id = fields.Many2one(
"project.task",
string="Task",
help="Session Timesheet Task",
ondelete="cascade",
default=False,
)
@api.model_create_multi
def create(self, vals_list):
"""Create Task for add timesheet"""
result = super().create(vals_list)
if result.config_id.module_pos_hr and result.config_id.time_log:
result.task_id = self.env["project.task"].create(
{
"name": result.name,
"project_id": result.config_id.project_id.id,
"company_id": result.config_id.company_id.id,
}
)
return result
def _pos_ui_models_to_load(self):
"""loads models to the UI"""
result = super()._pos_ui_models_to_load()
result.append("account.analytic.line")
return result
def _loader_params_account_analytic_line(self):
"""Returns loader params for account"""
return {
"search_params": {
"domain": [
("task_id", "=", self.task_id.id),
("date", "=", fields.Date.context_today(self)),
],
"fields": ["employee_id", "unit_amount"],
},
}
def _get_pos_ui_account_analytic_line(self, params):
"""Returns the account analytics line for the pos"""
return (
self.env["account.analytic.line"]
.sudo()
.search_read(**params["search_params"])
)
def _loader_params_pos_session(self):
"""Loading parameters to the session"""
result = super()._loader_params_pos_session()
result["search_params"]["fields"].append("task_id")
return result
def set_timesheet(self, data):
"""Update Timesheet of the employee"""
for timesheet in data:
if timesheet["workMinutes"] > 0:
hours = timesheet["workMinutes"] / 60
session_id = self.browse(timesheet["sessionId"])
timestamp_seconds = timesheet["checkInTime"] / 1000
date_time = fields.datetime.fromtimestamp(timestamp_seconds)
date_only = date_time.date()
sudo_timesheet = self.env["account.analytic.line"].sudo()
employee_timesheet = sudo_timesheet.search(
[
("task_id", "=", session_id.task_id.id),
("date", "=", date_only),
("employee_id", "=", timesheet["cashierId"]),
],
limit=1,
)
if employee_timesheet:
employee_timesheet.unit_amount += hours
else:
sudo_timesheet.create(
{
"task_id": session_id.task_id.id,
"employee_id": timesheet["cashierId"],
"name": session_id.name,
"date": date_only,
"unit_amount": hours,
}
)
return True
def action_show_time_log(self):
"""Show the task its contained timesheet for the session"""
return {
"name": _("Time Log"),
"type": "ir.actions.act_window",
"res_model": "project.task",
"view_mode": "form",
"res_id": self.task_id.id,
}

38
pos_timesheet/models/res_config_settings.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Hisam (odoo@cybrosysy.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 fields, models
class ResConfigSettings(models.TransientModel):
"""Inherits the default settings for the ResConfig model"""
_inherit = 'res.config.settings'
pos_time_log = fields.Boolean(
related="pos_config_id.time_log",
string="Time Log",
help="Track employees timesheet in pos",
readonly=False)
pos_project_id = fields.Many2one(
related='pos_config_id.project_id',
string="Project",
help="Project for the timesheet",
readonly=False)

BIN
pos_timesheet/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
pos_timesheet/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
pos_timesheet/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
pos_timesheet/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
pos_timesheet/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
pos_timesheet/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
pos_timesheet/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
pos_timesheet/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_timesheet/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_timesheet/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
pos_timesheet/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
pos_timesheet/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
pos_timesheet/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
pos_timesheet/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
pos_timesheet/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
pos_timesheet/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
pos_timesheet/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_timesheet/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
pos_timesheet/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_timesheet/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
pos_timesheet/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_timesheet/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
pos_timesheet/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_timesheet/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
pos_timesheet/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
pos_timesheet/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
pos_timesheet/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
pos_timesheet/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
pos_timesheet/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
pos_timesheet/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
pos_timesheet/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
pos_timesheet/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
pos_timesheet/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
pos_timesheet/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
pos_timesheet/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
pos_timesheet/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
pos_timesheet/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
pos_timesheet/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
pos_timesheet/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
pos_timesheet/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
pos_timesheet/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

BIN
pos_timesheet/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

BIN
pos_timesheet/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
pos_timesheet/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
pos_timesheet/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

BIN
pos_timesheet/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
pos_timesheet/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

543
pos_timesheet/static/description/index.html

@ -0,0 +1,543 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between" style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;" />
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
POS Timesheet
</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Add Timesheet For POS</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive" style="width: 100%; margin-left: auto; margin-right: auto;" />
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center" style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center" style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center" style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
This module enhances the Point of Sale (POS) functionality by automatically
calculating timesheets for employees based on their activities in the POS.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Add Timesheet for employees based on their activities in the POS.</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">View the employees' worked hours in real-time in the POS.</span>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Track Employee activity in POS online/offline mode.</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2" />
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Using Project and Tasks makes it easier.</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Enable Multi Employee per Session, then the Time Log option will be visible in the Configuration Settings of POS and you can also set a project for the timesheet.</h3>
<img src="assets/screenshots/1.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The employee can view the total work hours, last check-in time, and time worked since the last check-in time by clicking the clock icon in the header.</h3>
<img src="assets/screenshots/2.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<img src="assets/screenshots/3.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">You can easily navigate to the task associated with the session by clicking timelog smart tab.</h3>
<img src="assets/screenshots/4.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">You can see all the employees timesheet in the task timesheet tab.</h3>
<img src="assets/screenshots/5.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/point_of_sale_logo/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/1.png">
</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/16.0/custom_receipts_for_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/2.png">
</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/16.0/pos_report_generator/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/pos_product_creation/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/4.png">
</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/16.0/multi_barcodes_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/5.png">
</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/16.0/pos_sync_orders/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" 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="#demo1"
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>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center" style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48" width="48" style="width: 42px; height: 42px;" />
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help? Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center" style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52" width="52" style="width: 52px; height: 52px;" />
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31" style="width:144px; height: 31px; margin-top: 40px;" />
</div>
</div>
</div>
<!-- END OF SUPPORT -->

15
pos_timesheet/static/src/css/worked_hour_popup.css

@ -0,0 +1,15 @@
.total-worked {
color: #714B67;
font-weight: bold;
}
.current-worked {
color: #017e84;
font-weight: bold;
margin-left: 10px;
}
.checked-in {
color: #5eb937;
}

35
pos_timesheet/static/src/js/Chrome.js

@ -0,0 +1,35 @@
/** @odoo-module **/
import Chrome from "point_of_sale.Chrome";
import Registries from "point_of_sale.Registries";
const PosTimeSheetChrome = (Chrome) =>
class extends Chrome {
/**
* @override
* Add timesheet in to server when go to backend
*/
async _closePos() {
if (this.env.pos.config.module_pos_hr & this.env.pos.config.time_log) {
return this.env.pos._handleTimesheet(() => super._closePos(...arguments));
} else {
return await super._closePos(...arguments);
}
}
/**
*@override
* Save Worked hours with CheckoutTime and WorkedMinutes in localStorage
* on beforeunload - closing the browser, reloading or going to other page.
*/
_onBeforeUnload() {
super._onBeforeUnload(...arguments);
const timesheetData = this.env.pos.prepareTimesheet();
localStorage.setItem('timesheetData', JSON.stringify(timesheetData));
}
};
Registries.Component.extend(Chrome, PosTimeSheetChrome);

24
pos_timesheet/static/src/js/Popups/ClosePosPopup.js

@ -0,0 +1,24 @@
/** @odoo-module **/
import ClosePosPopup from "point_of_sale.ClosePosPopup";
import Registries from "point_of_sale.Registries";
const NewClosePosPopup = (ClosePosPopup) =>
class extends ClosePosPopup {
/**
* @override
* Add timesheet in to server when Close Session.
*/
async closeSession() {
if (this.env.pos.config.module_pos_hr & this.env.pos.config.time_log) {
return this.env.pos._handleTimesheet(() =>
super.closeSession(...arguments)
);
} else {
return await super.closeSession(...arguments);
}
}
};
Registries.Component.extend(ClosePosPopup, NewClosePosPopup);

114
pos_timesheet/static/src/js/Popups/WorkedHourPopup.js

@ -0,0 +1,114 @@
/** @odoo-module **/
import Registries from "point_of_sale.Registries";
import AbstractAwaitablePopup from "point_of_sale.AbstractAwaitablePopup";
import { _lt } from "@web/core/l10n/translation";
const { onMounted, onWillUnmount, useState } = owl;
class WorkedHourPopup extends AbstractAwaitablePopup {
/**
* @override
* Sets up SetInterval to show realtime worked time.
*/
setup() {
super.setup(...arguments);
this.state = useState({
workedTime: '',
totalWorkedTime: ''
})
onMounted(()=> {
this.workedTime();
this.totalWorkedTime();
this.interval = setInterval(()=>{
this.workedTime();
this.totalWorkedTime();
}, 1000);
})
onWillUnmount(()=> {
clearInterval(this.interval);
})
}
/**
* Getter for the check-in time.
* @returns {string} Formatted check-in time.
*/
get checkInTime() {
const timesheetData = JSON.parse(localStorage.getItem('timesheetData'));
const checkInTime = timesheetData ? timesheetData.at(-1)['checkInTime'] : Date.now();
const formattedDate = new Intl.DateTimeFormat('en-US', {
hour: '2-digit',
minute: '2-digit',
hour12: true
}).format(checkInTime);
return formattedDate;
}
/**
* Getter for the current worked time.
* Assign {string} Formatted current worked time in to this.state.workedTime.
*/
workedTime() {
const [hours, minutes, seconds] = this.currentWorkedTime();
this.state.workedTime = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
}
/**
* Getter for the total today's worked time.
* Assign {string} Formatted total worked time in to this.state.totalWorkedTime.
*/
totalWorkedTime() {
let minutes = 0;
const workerData = this.env.pos.workedTime;
const timesheetData = JSON.parse(localStorage.getItem('timesheetData'));
const cashierId = this.env.pos.cashier.id;
if (timesheetData) {
const cashierLocalTimesheet = timesheetData.filter(data => data.cashierId === cashierId && data?.workMinutes);
minutes += cashierLocalTimesheet.reduce((sum, data) => sum + data.workMinutes, 0);
}
const cashierData = workerData.find(data => data['cashierId'] === cashierId);
minutes += cashierData ? parseInt(cashierData['minutes']) : 0;
const [currentHours, currentMinutes, seconds] = this.currentWorkedTime();
let hours = currentHours;
minutes += currentMinutes;
const extraHour = Math.floor(minutes / 60);
minutes %= 60;
hours += extraHour;
this.state.totalWorkedTime = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
}
/**
* Retrieves the current worked time.
* @returns {Array} Array containing hours and minutes of current worked time.
*/
currentWorkedTime() {
const timesheetData = JSON.parse(localStorage.getItem('timesheetData'));
const checkInTime = timesheetData ? timesheetData.at(-1)['checkInTime'] : Date.now();
const currentTime = Date.now();
const differenceMs = Math.abs(currentTime - checkInTime);
const hours = Math.floor(differenceMs / (1000 * 60 * 60));
const minutes = Math.floor((differenceMs % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((differenceMs % (1000 * 60)) / 1000);
return [hours, minutes, seconds];
}
}
WorkedHourPopup.template = "WorkedHourPopup";
WorkedHourPopup.defaultProps = {
cancelText: _lt("Cancel"),
title: _lt("Worked Hours"),
confirmKey: false,
};
Registries.Component.add(WorkedHourPopup);

16
pos_timesheet/static/src/js/TimeSheetButton.js

@ -0,0 +1,16 @@
/** @odoo-module **/
import PosComponent from "point_of_sale.PosComponent";
import Registries from "point_of_sale.Registries";
//Timesheet Button in Header of Pos
class TimeSheetButton extends PosComponent {
/**
* Show WorkedHourPopup
*/
async onClick(){
await this.showPopup('WorkedHourPopup');
}
}
TimeSheetButton.template = "TimeSheetButton";
Registries.Component.add(TimeSheetButton);

156
pos_timesheet/static/src/js/model.js

@ -0,0 +1,156 @@
/** @odoo-module **/
import { PosGlobalState } from 'point_of_sale.models';
import Registries from 'point_of_sale.Registries';
const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState {
/**
* @override
* load employees timesheet of this session
*/
async _processData(loadedData) {
await super._processData(...arguments);
if (this.config.module_pos_hr && this.config.time_log) {
this.timesheet = loadedData['account.analytic.line'];
this.workedTime = this.getWorkedTime();
}
}
/**
* Retrieves worked time data and sets it to the POS instance.
*/
getWorkedTime() {
const datas = this.timesheet;
const workedTime = datas.map(data => ({
'cashierId': data['employee_id'][0],
'minutes': Math.floor(data['unit_amount'] * 60)
}));
return workedTime;
}
/**
* @override
* If the 'Multi Employee persession' and 'Time Log' enabled in POS configuration,
* handles timesheet processing before resetting the cashier.
*/
reset_cashier() {
if (this.config.module_pos_hr && this.config.time_log) {
return this._handleTimesheet(() => super.reset_cashier(...arguments));
} else {
return super.reset_cashier(...arguments);
}
}
/**
* @override
* If the 'Multi Employee persession' and 'Time Log' enabled in POS configuration,
* handles timesheet processing before setting cashier.
* @param {Object} employee - Employee object representing the cashier.
*/
set_cashier(employee) {
if (this.config.module_pos_hr && this.config.time_log) {
return this._handleTimesheet(() => super.set_cashier(...arguments), employee);
} else {
return super.set_cashier(...arguments);
}
}
/**
* Handles timesheet processing asynchronously.
* Executes a callback function and handles timesheet operations based on the POS configuration.
* @param {Function} callback - Callback function to execute.
* @param {Object} employee - Employee object representing the cashier or null.
*/
_handleTimesheet(callback, employee = null) {
const data = this.prepareTimesheet();
return this.sendTimesheet(data)
.then(response => {
this.setTimesheet(response, employee);
})
.catch(errData => {
this.setTimesheet(errData, employee);
})
.finally(() => {
callback();
});
}
/**
* Sets the timesheet data to localStorage.
* @param {Array} timesheetData - Timesheet data to set.
* @param {Object} employee - Employee object representing the cashier.
*/
setTimesheet(timesheetData, employee = null) {
if (employee) {
const cashierData = {
cashierId: employee.id,
checkInTime: Date.now(),
sessionId: this.pos_session.id
};
if (timesheetData) {
timesheetData.push(cashierData);
} else {
timesheetData = [cashierData];
}
}
localStorage.setItem('timesheetData', JSON.stringify(timesheetData));
}
/**
* Sends timesheet data to the server.
* @param {Array} timesheetData - Timesheet data to send.
* @return {null} success or no timesheetData, if error {Object} timesheetData
*/
sendTimesheet(timesheetData) {
return new Promise((resolve, reject) => {
if (timesheetData) {
this.env.services.rpc({
model: 'pos.session',
method: 'set_timesheet',
args: [[], timesheetData],
}).then(res => {
timesheetData.forEach(data => {
let index = this.workedTime.findIndex(item => item.cashierId === data.cashierId);
if (index !== -1) {
this.workedTime[index].minutes += data.workMinutes;
} else {
this.workedTime.push({ cashierId: data.cashierId, minutes: data.workMinutes });
}
});
resolve(null);
})
.catch(err => {
reject(timesheetData);
});
} else {
resolve(null);
}
});
}
/**
* Prepares timesheet data for sending to the server.
* Checks for existing timesheet data in localStorage and adjusts work minutes.
* @returns {Array|null} Prepared timesheet data.
*/
prepareTimesheet() {
const timesheetData = JSON.parse(localStorage.getItem('timesheetData'));
if (timesheetData && timesheetData.length != 0){
if (!timesheetData.at(-1).hasOwnProperty('checkOutTime')) {
timesheetData.at(-1)['checkOutTime'] = Date.now();
const timeDiff = timesheetData.at(-1)['checkOutTime'] - timesheetData.at(-1)['checkInTime'];
timesheetData.at(-1)['workMinutes'] = Math.floor(timeDiff / (1000 * 60));
if (timesheetData.at(-1)['workMinutes'] <= 0) {
timesheetData.pop();
}
}
return timesheetData;
}
return null;
}
}
Registries.Model.extend(PosGlobalState, NewPosGlobalState);

15
pos_timesheet/static/src/xml/CashMoveButton.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- Update CashMoveButton -->
<t t-name="Chrome" t-inherit="point_of_sale.CashMoveButton"
t-inherit-mode="extension" owl="1">
<xpath expr="//div" position="replace">
<div class="cash-move-button" t-on-click="onClick">
<i class="fa fa-money" aria-hidden="true"></i>
<span t-if="!env.isMobile" style="padding-left: 10px;">Cash In/Out</span>
</div>
</xpath>
</t>
</templates>

11
pos_timesheet/static/src/xml/Chrome.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- Added TimeSheetButton in header -->
<t t-name="Chrome" t-inherit="point_of_sale.Chrome" t-inherit-mode="extension" owl="1">
<xpath expr="//SyncNotification" position="before">
<TimeSheetButton t-if="env.pos.config.module_pos_hr and env.pos.config.time_log" />
</xpath>
</t>
</templates>

26
pos_timesheet/static/src/xml/Popups/WorkedHourPopup.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- WorkedHourPopup to show worked hour -->
<t t-name="WorkedHourPopup" owl="1">
<div class="popup popup-textinput">
<header class="title">
<t t-esc="props.title" />
</header>
<div class="body">
<p>
<h2 class="total-worked" t-esc="this.state.totalWorkedTime"/>
<div class="current-wrap">
<span class="me-2">Last checked in <span class="checked-in" t-esc="checkInTime"/></span>
<span class="current-worked" t-esc="this.state.workedTime"/>
</div>
</p>
</div>
<div class="footer">
<div class="button cancel" t-on-click="cancel">
<t t-esc="props.cancelText" />
</div>
</div>
</div>
</t>
</templates>

10
pos_timesheet/static/src/xml/TimeSheetButton.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- TimeSheetButton Component -->
<t t-name="TimeSheetButton" owl="1">
<div class="header-button" t-on-click="onClick">
<span><i class="fa fa-clock-o" role="img"/></span>
</div>
</t>
</templates>

19
pos_timesheet/views/pos_session_views.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="pos_time_log_view_pos_session_form" model="ir.ui.view">
<field name="name">pos.time.log.session.form.view</field>
<field name="model">pos.session</field>
<field name="inherit_id" ref="point_of_sale.view_pos_session_form"/>
<field name="arch" type="xml">
<!-- Add time log smartTab to view current session task and its timesheet -->
<xpath expr="//button[@name='action_show_payments_list']" position="after">
<field name="task_id" invisible="1"/>
<button name="action_show_time_log" string="Time Log"
class="oe_stat_button" attrs="{'invisible': [('task_id','=',False)]}"
icon="fa-clock-o"
type="object">
</button>
</xpath>
</field>
</record>
</odoo>

40
pos_timesheet/views/res_config_settings_views.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- This setting adds time log option for track employees' work hours -->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.pos</field>
<field name="model">res.config.settings</field>
<field name="inherit_id"
ref="point_of_sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='pos_interface_section']"
position="inside">
<div class="col-12 col-lg-6 o_setting_box"
title="When starting a session, it automatically creates a task in the selected project and adds the timesheet of the employees based on their work hours automatically." attrs="{'invisible': [('pos_module_pos_hr','=',False)]}">
<div class="o_setting_left_pane">
<field name="pos_time_log"
attrs="{'readonly': [('pos_has_active_session','=', True)]}"/>
</div>
<div class="o_setting_right_pane">
<span class="o_form_label">Time Log
</span>
<div class="text-muted">
Automatically record employees' work hours in the
timesheet
</div>
<div class="content-group mt16">
<div class="row">
<label for="pos_project_id"
string="Project"
class="col-lg-3 o_light_label"/>
<field name="pos_project_id"
attrs="{'required': [('pos_time_log', '=', True)]}"
domain="[('company_id', '=', company_id)]"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save