Browse Source

[ADD] Initial Commit

pull/195/head
Ajmal Cybro 3 years ago
parent
commit
d925a3454e
  1. 20
      dashboard_pos/README.rst
  2. 23
      dashboard_pos/__init__.py
  3. 53
      dashboard_pos/__manifest__.py
  4. 7
      dashboard_pos/doc/RELEASE_NOTES.md
  5. 23
      dashboard_pos/models/__init__.py
  6. 227
      dashboard_pos/models/pos_dashboard.py
  7. BIN
      dashboard_pos/static/description/assets/icons/check.png
  8. BIN
      dashboard_pos/static/description/assets/icons/chevron.png
  9. BIN
      dashboard_pos/static/description/assets/icons/cogs.png
  10. BIN
      dashboard_pos/static/description/assets/icons/consultation.png
  11. BIN
      dashboard_pos/static/description/assets/icons/ecom-black.png
  12. BIN
      dashboard_pos/static/description/assets/icons/education-black.png
  13. BIN
      dashboard_pos/static/description/assets/icons/hotel-black.png
  14. BIN
      dashboard_pos/static/description/assets/icons/license.png
  15. BIN
      dashboard_pos/static/description/assets/icons/lifebuoy.png
  16. BIN
      dashboard_pos/static/description/assets/icons/manufacturing-black.png
  17. BIN
      dashboard_pos/static/description/assets/icons/pos-black.png
  18. BIN
      dashboard_pos/static/description/assets/icons/puzzle.png
  19. BIN
      dashboard_pos/static/description/assets/icons/restaurant-black.png
  20. BIN
      dashboard_pos/static/description/assets/icons/service-black.png
  21. BIN
      dashboard_pos/static/description/assets/icons/trading-black.png
  22. BIN
      dashboard_pos/static/description/assets/icons/training.png
  23. BIN
      dashboard_pos/static/description/assets/icons/update.png
  24. BIN
      dashboard_pos/static/description/assets/icons/user.png
  25. BIN
      dashboard_pos/static/description/assets/icons/wrench.png
  26. BIN
      dashboard_pos/static/description/assets/modules/1.png
  27. BIN
      dashboard_pos/static/description/assets/modules/2.png
  28. BIN
      dashboard_pos/static/description/assets/modules/3.png
  29. BIN
      dashboard_pos/static/description/assets/modules/4.png
  30. BIN
      dashboard_pos/static/description/assets/modules/5.png
  31. BIN
      dashboard_pos/static/description/assets/modules/6.png
  32. BIN
      dashboard_pos/static/description/assets/modules/approval_image.png
  33. BIN
      dashboard_pos/static/description/assets/modules/dynamic_image.png
  34. BIN
      dashboard_pos/static/description/assets/modules/list_view_image.png
  35. BIN
      dashboard_pos/static/description/assets/modules/multiple_ref_image.png
  36. BIN
      dashboard_pos/static/description/assets/modules/print_image.png
  37. BIN
      dashboard_pos/static/description/assets/modules/product_return_image.png
  38. BIN
      dashboard_pos/static/description/assets/screenshots/hero.png
  39. BIN
      dashboard_pos/static/description/assets/screenshots/screenshot1.png
  40. BIN
      dashboard_pos/static/description/assets/screenshots/screenshot2.png
  41. BIN
      dashboard_pos/static/description/assets/screenshots/screenshot3.png
  42. BIN
      dashboard_pos/static/description/assets/screenshots/screenshot4.png
  43. BIN
      dashboard_pos/static/description/banner.png
  44. BIN
      dashboard_pos/static/description/icon.png
  45. 632
      dashboard_pos/static/description/index.html
  46. 1009
      dashboard_pos/static/src/css/pos_dashboard.css
  47. 544
      dashboard_pos/static/src/js/pos_dashboard.js
  48. 305
      dashboard_pos/static/src/xml/pos_dashboard.xml
  49. 14
      dashboard_pos/views/dashboard_views.xml
  50. 24
      project_report_pdf/README.rst
  51. 24
      project_report_pdf/__init__.py
  52. 47
      project_report_pdf/__manifest__.py
  53. 1
      project_report_pdf/controllers/__init__.py
  54. 56
      project_report_pdf/controllers/main.py
  55. 7
      project_report_pdf/doc/RELEASE_NOTES.md
  56. 22
      project_report_pdf/report/__init__.py
  57. 77
      project_report_pdf/report/project_report_pdf.py
  58. 46
      project_report_pdf/report/project_report_pdf_view.xml
  59. 2
      project_report_pdf/security/ir.model.access.csv
  60. BIN
      project_report_pdf/static/description/assets/icons/check.png
  61. BIN
      project_report_pdf/static/description/assets/icons/chevron.png
  62. BIN
      project_report_pdf/static/description/assets/icons/cogs.png
  63. BIN
      project_report_pdf/static/description/assets/icons/consultation.png
  64. BIN
      project_report_pdf/static/description/assets/icons/ecom-black.png
  65. BIN
      project_report_pdf/static/description/assets/icons/education-black.png
  66. BIN
      project_report_pdf/static/description/assets/icons/hotel-black.png
  67. BIN
      project_report_pdf/static/description/assets/icons/license.png
  68. BIN
      project_report_pdf/static/description/assets/icons/lifebuoy.png
  69. BIN
      project_report_pdf/static/description/assets/icons/manufacturing-black.png
  70. BIN
      project_report_pdf/static/description/assets/icons/pos-black.png
  71. BIN
      project_report_pdf/static/description/assets/icons/puzzle.png
  72. BIN
      project_report_pdf/static/description/assets/icons/restaurant-black.png
  73. BIN
      project_report_pdf/static/description/assets/icons/service-black.png
  74. BIN
      project_report_pdf/static/description/assets/icons/trading-black.png
  75. BIN
      project_report_pdf/static/description/assets/icons/training.png
  76. BIN
      project_report_pdf/static/description/assets/icons/update.png
  77. BIN
      project_report_pdf/static/description/assets/icons/user.png
  78. BIN
      project_report_pdf/static/description/assets/icons/wrench.png
  79. BIN
      project_report_pdf/static/description/assets/modules/approval_image.png
  80. BIN
      project_report_pdf/static/description/assets/modules/dynamic_image.png
  81. BIN
      project_report_pdf/static/description/assets/modules/list_view_image.png
  82. BIN
      project_report_pdf/static/description/assets/modules/multiple_ref_image.png
  83. BIN
      project_report_pdf/static/description/assets/modules/print_image.png
  84. BIN
      project_report_pdf/static/description/assets/modules/product_return_image.png
  85. BIN
      project_report_pdf/static/description/assets/screenshots/hero.png
  86. BIN
      project_report_pdf/static/description/assets/screenshots/screenshot1.png
  87. BIN
      project_report_pdf/static/description/assets/screenshots/screenshot2.png
  88. BIN
      project_report_pdf/static/description/assets/screenshots/screenshot3.png
  89. BIN
      project_report_pdf/static/description/assets/screenshots/screenshot4.png
  90. BIN
      project_report_pdf/static/description/banner.png
  91. BIN
      project_report_pdf/static/description/icon.png
  92. 606
      project_report_pdf/static/description/index.html
  93. 21
      project_report_pdf/static/src/js/action_manager.js
  94. 10
      project_report_pdf/views/action_manager.xml
  95. 12
      project_report_pdf/views/project_report.xml
  96. 16
      project_report_pdf/views/project_report_button.xml
  97. 21
      project_report_pdf/wizard/__init__.py
  98. 182
      project_report_pdf/wizard/project_report_wizard.py
  99. 36
      project_report_pdf/wizard/project_report_wizard_view.xml

20
dashboard_pos/README.rst

@ -0,0 +1,20 @@
POS Dashboard v15
=================
POS Dashboard
Installation
============
- www.odoo.com/documentation/14.0/setup/install.html
- Install our custom addon
Configuration
=============
No additional configurations needed
Credits
=======
Developer: Irfan v13 @ cybrosys, Contact: odoo@cybrosys.com
Jibin James V14 @ cybrosys, Contact: odoo@cybrosys.com
Irfan V15 @ cybrosys, Contact: odoo@cybrosys.com

23
dashboard_pos/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Irfan (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

53
dashboard_pos/__manifest__.py

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Irfan (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': "POS Dashboard",
'version': '15.0.1.0.0',
'summary': """POS Dashboard""",
'description': """POS Dashboard""",
'category': 'Point of Sale',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['hr', 'point_of_sale'],
'external_dependencies': {
'python': ['pandas'],
},
'data': [
'views/dashboard_views.xml'
],
'assets': {
'web.assets_backend': [
'dashboard_pos/static/src/js/pos_dashboard.js',
'dashboard_pos/static/src/css/pos_dashboard.css',
'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.js',
],
'web.assets_qweb': [
'dashboard_pos/static/src/xml/pos_dashboard.xml',
],
},
'images': ['static/description/banner.png'],
'license': "AGPL-3",
'installable': True,
'application': False,
}

7
dashboard_pos/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <pos_dashboard>
#### 09.10.2021
#### Version 15.0.1.0.0
##### Initial Commit for pos_dashboard

23
dashboard_pos/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Irfan (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import pos_dashboard

227
dashboard_pos/models/pos_dashboard.py

@ -0,0 +1,227 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Irfan (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
import pytz
from odoo import models, fields, api
from datetime import timedelta, datetime, date
class PosDashboard(models.Model):
_inherit = 'pos.order'
@api.model
def get_department(self, option):
company_id = self.env.company.id
if option == 'pos_hourly_sales':
user_tz = self.env.user.tz if self.env.user.tz else pytz.UTC
query = '''select EXTRACT(hour FROM date_order at time zone 'utc' at time zone '{}')
as date_month,sum(amount_total) from pos_order where
EXTRACT(month FROM date_order::date) = EXTRACT(month FROM CURRENT_DATE)
AND pos_order.company_id = ''' + str(
company_id) + ''' group by date_month '''
query = query.format(user_tz)
label = 'HOURS'
elif option == 'pos_monthly_sales':
query = '''select date_order::date as date_month,sum(amount_total) from pos_order where
EXTRACT(month FROM date_order::date) = EXTRACT(month FROM CURRENT_DATE) AND pos_order.company_id = ''' + str(
company_id) + ''' group by date_month '''
label = 'DAYS'
else:
query = '''select TO_CHAR(date_order,'MON')date_month,sum(amount_total) from pos_order where
EXTRACT(year FROM date_order::date) = EXTRACT(year FROM CURRENT_DATE) AND pos_order.company_id = ''' + str(
company_id) + ''' group by date_month'''
label = 'MONTHS'
self._cr.execute(query)
docs = self._cr.dictfetchall()
order = []
for record in docs:
order.append(record.get('sum'))
today = []
for record in docs:
today.append(record.get('date_month'))
final = [order, today, label]
return final
@api.model
def get_details(self):
company_id = self.env.company.id
cr = self._cr
cr.execute(
"""select pos_payment_method.name,sum(amount) from pos_payment inner join pos_payment_method on
pos_payment_method.id=pos_payment.payment_method_id group by pos_payment_method.name ORDER
BY sum(amount) DESC; """)
payment_details = cr.fetchall()
cr.execute(
'''select hr_employee.name,sum(pos_order.amount_paid) as total,count(pos_order.amount_paid) as orders
from pos_order inner join hr_employee on pos_order.user_id = hr_employee.user_id
where pos_order.company_id =''' + str(company_id) + '''GROUP BY hr_employee.name order by total DESC;''')
salesperson = cr.fetchall()
total_sales = []
for rec in salesperson:
rec = list(rec)
sym_id = rec[1]
company = self.env.company
if company.currency_id.position == 'after':
rec[1] = "%s %s" % (sym_id, company.currency_id.symbol)
else:
rec[1] = "%s %s" % (company.currency_id.symbol, sym_id)
rec = tuple(rec)
total_sales.append(rec)
cr.execute(
'''select DISTINCT(product_template.name) as product_name,sum(qty) as total_quantity from
pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join
product_template on product_product.product_tmpl_id = product_template.id where pos_order_line.company_id =''' + str(
company_id) + ''' group by product_template.id ORDER
BY total_quantity DESC Limit 10 ''')
selling_product = cr.fetchall()
sessions = self.env['pos.config'].search([])
sessions_list = []
dict = {
'closing_control': 'Closed',
'opened': 'Opened',
'new_session': 'New Session',
'opening_control': "Opening Control"
}
for session in sessions:
sessions_list.append({
'session': session.name,
'status': dict.get(session.pos_session_state)
})
payments =[]
for rec in payment_details:
rec = list(rec)
sym_id = rec[1]
company = self.env.company
if company.currency_id.position == 'after':
rec[1] = "%s %s" % (sym_id, company.currency_id.symbol)
else:
rec[1] = "%s %s" % (company.currency_id.symbol, sym_id)
rec = tuple(rec)
payments.append(rec)
return {
'payment_details': payments,
'salesperson': total_sales,
'selling_product': sessions_list,
}
@api.model
def get_refund_details(self):
default_date = datetime.today().date()
pos_order = self.env['pos.order'].search([])
total = 0
today_refund_total = 0
total_order_count = 0
total_refund_count = 0
today_sale = 0
a = 0
for rec in pos_order:
if rec.amount_total < 0.0 and rec.date_order.date() == default_date:
today_refund_total = today_refund_total + 1
total_sales = rec.amount_total
total = total + total_sales
total_order_count = total_order_count + 1
if rec.date_order.date() == default_date:
today_sale = today_sale + 1
if rec.amount_total < 0.0:
total_refund_count = total_refund_count + 1
magnitude = 0
while abs(total) >= 1000:
magnitude += 1
total /= 1000.0
# add more suffixes if you need them
val = '%.2f%s' % (total, ['', 'K', 'M', 'G', 'T', 'P'][magnitude])
pos_session = self.env['pos.session'].search([])
total_session = 0
for record in pos_session:
total_session = total_session + 1
return {
'total_sale': val,
'total_order_count': total_order_count,
'total_refund_count': total_refund_count,
'total_session': total_session,
'today_refund_total': today_refund_total,
'today_sale': today_sale,
}
@api.model
def get_the_top_customer(self, ):
company_id = self.env.company.id
query = '''select res_partner.name as customer,pos_order.partner_id,sum(pos_order.amount_paid) as amount_total from pos_order
inner join res_partner on res_partner.id = pos_order.partner_id where pos_order.company_id = ''' + str(
company_id) + ''' GROUP BY pos_order.partner_id,
res_partner.name ORDER BY amount_total DESC LIMIT 10;'''
self._cr.execute(query)
docs = self._cr.dictfetchall()
print(docs)
order = []
for record in docs:
order.append(record.get('amount_total'))
day = []
for record in docs:
day.append(record.get('customer'))
final = [order, day]
return final
@api.model
def get_the_top_products(self):
company_id = self.env.company.id
query = '''select DISTINCT(product_template.name) as product_name,sum(qty) as total_quantity from
pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join
product_template on product_product.product_tmpl_id = product_template.id where pos_order_line.company_id = ''' + str(
company_id) + ''' group by product_template.id ORDER
BY total_quantity DESC Limit 10 '''
self._cr.execute(query)
top_product = self._cr.dictfetchall()
total_quantity = []
for record in top_product:
# if record.get('total_quantity') != 0:
# print(total_quantity.append(record.get('total_quantity')))
total_quantity.append(record.get('total_quantity'))
product_name = []
for record in top_product:
product_name.append(record.get('product_name'))
final = [total_quantity, product_name]
return final
@api.model
def get_the_top_categories(self):
company_id = self.env.company.id
query = '''select DISTINCT(product_category.complete_name) as product_category,sum(qty) as total_quantity
from pos_order_line inner join product_product on product_product.id=pos_order_line.product_id inner join
product_template on product_product.product_tmpl_id = product_template.id inner join product_category on
product_category.id =product_template.categ_id where pos_order_line.company_id = ''' + str(
company_id) + ''' group by product_category ORDER BY total_quantity DESC '''
self._cr.execute(query)
top_product = self._cr.dictfetchall()
total_quantity = []
for record in top_product:
total_quantity.append(record.get('total_quantity'))
product_categ = []
for record in top_product:
product_categ.append(record.get('product_category'))
final = [total_quantity, product_categ]
return final

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
dashboard_pos/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
dashboard_pos/static/description/assets/modules/dynamic_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
dashboard_pos/static/description/assets/modules/list_view_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
dashboard_pos/static/description/assets/modules/multiple_ref_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
dashboard_pos/static/description/assets/modules/print_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
dashboard_pos/static/description/assets/modules/product_return_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
dashboard_pos/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
dashboard_pos/static/description/assets/screenshots/screenshot1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
dashboard_pos/static/description/assets/screenshots/screenshot2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
dashboard_pos/static/description/assets/screenshots/screenshot3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
dashboard_pos/static/description/assets/screenshots/screenshot4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
dashboard_pos/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
dashboard_pos/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

632
dashboard_pos/static/description/index.html

@ -0,0 +1,632 @@
<div class="container" style="padding: 4rem 1.5rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
POS Dashboard</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Detailed Dashboard View for POS
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module helps you to see the Overview of POS, here You can see the total orders, sessions, top
customers, top products etc.</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Total POS Orders</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
View total POS order count.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Session Details</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
See session details.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Refund Details</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
View refund details.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Sale Details </h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
View sale details.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Sale Report Charts</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
View Sale Report Charts.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Top Products</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
View top products.</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Open POS</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
After installation, open POS</p>
<img src="assets/screenshots/screenshot1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Order and Session details.</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Order and Session counts are displayed in the dashboard.
</p>
<img src="assets/screenshots/screenshot2.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Details in Charts</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Possible to see the POS details in different charts.</p>
<img src="assets/screenshots/screenshot3.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Bank, session &amp; salesperson details</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Details like bank, session status, salesperson details are listed.</p>
<img src="assets/screenshots/screenshot4.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sales_credit_limit/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./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/15.0/product_to_quotation/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./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/15.0/dynamic_accounts_report/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/hr_payroll_community/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./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/15.0/product_barcode/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./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/15.0/inventory_barcode_scanning/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a
class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</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: #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>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-4">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-4">
<a href="https://api.WhatsApp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-WhatsApp mr-2"></i>WhatsApp</a>
</div>
<div class="col-lg-4">
<a href="mailto:info@cybrosys.com" target="_blank" class="btn btn-block deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>info@cybrosys.com</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

1009
dashboard_pos/static/src/css/pos_dashboard.css

File diff suppressed because it is too large

544
dashboard_pos/static/src/js/pos_dashboard.js

@ -0,0 +1,544 @@
odoo.define('dashboard_pos.Dashboard', function (require) {
"use strict";
var AbstractAction = require('web.AbstractAction');
var ajax = require('web.ajax');
var core = require('web.core');
var rpc = require('web.rpc');
var session = require('web.session');
var web_client = require('web.web_client');
var _t = core._t;
var QWeb = core.qweb;
var PosDashboard = AbstractAction.extend({
template: 'PosDashboard',
events: {
'click .pos_order_today':'pos_order_today',
'click .pos_order':'pos_order',
'click .pos_total_sales':'pos_order',
'click .pos_session':'pos_session',
'click .pos_refund_orders':'pos_refund_orders',
'click .pos_refund_today_orders':'pos_refund_today_orders',
'change #pos_sales': 'onclick_pos_sales',
},
init: function(parent, context) {
this._super(parent, context);
this.dashboards_templates = ['PosOrders','PosChart','PosCustomer'];
this.payment_details = [];
this.top_salesperson = [];
this.selling_product = [];
this.total_sale = [];
this.total_order_count = [];
this.total_refund_count = [];
this.total_session = [];
this.today_refund_total = [];
this.today_sale = [];
},
willStart: function() {
var self = this;
return $.when(ajax.loadLibs(this), this._super()).then(function() {
return self.fetch_data();
});
},
start: function() {
var self = this;
this.set("title", 'Dashboard');
return this._super().then(function() {
self.render_dashboards();
self.render_graphs();
self.$el.parent().addClass('oe_background_grey');
});
},
fetch_data: function() {
var self = this;
var def1 = this._rpc({
model: 'pos.order',
method: 'get_refund_details'
}).then(function(result) {
self.total_sale = result['total_sale'],
self.total_order_count = result['total_order_count']
self.total_refund_count = result['total_refund_count']
self.total_session = result['total_session']
self.today_refund_total = result['today_refund_total']
self.today_sale = result['today_sale']
});
var def2 = self._rpc({
model: "pos.order",
method: "get_details",
})
.then(function (res) {
self.payment_details = res['payment_details'];
self.top_salesperson = res['salesperson'];
self.selling_product = res['selling_product'];
});
return $.when(def1,def2);
},
render_dashboards: function() {
var self = this;
_.each(this.dashboards_templates, function(template) {
self.$('.o_pos_dashboard').append(QWeb.render(template, {widget: self}));
});
},
render_graphs: function(){
var self = this;
self.render_top_customer_graph();
self.render_top_product_graph();
self.render_product_category_graph();
},
// get_emp_image_url: function(employee){
// return window.location.origin + '/web/image?model=pos.order&field=image&id='+employee;
// },
pos_order_today: function(e){
var self = this;
var date = new Date();
var yesterday = new Date(date.getTime());
yesterday.setDate(date.getDate() - 1);
console.log(yesterday)
e.stopPropagation();
e.preventDefault();
session.user_has_group('hr.group_hr_user').then(function(has_group){
if(has_group){
var options = {
on_reverse_breadcrumb: self.on_reverse_breadcrumb,
};
self.do_action({
name: _t("Today Order"),
type: 'ir.actions.act_window',
res_model: 'pos.order',
view_mode: 'tree,form,calendar',
view_type: 'form',
views: [[false, 'list'],[false, 'form']],
domain: [['date_order','<=', date],['date_order', '>=', yesterday]],
target: 'current'
}, options)
}
});
},
pos_refund_orders: function(e){
var self = this;
var date = new Date();
// alert(date,"date")
var yesterday = new Date(date.getTime());
yesterday.setDate(date.getDate() - 1);
console.log(yesterday)
e.stopPropagation();
e.preventDefault();
session.user_has_group('hr.group_hr_user').then(function(has_group){
if(has_group){
var options = {
on_reverse_breadcrumb: self.on_reverse_breadcrumb,
};
self.do_action({
name: _t("Refund Orders"),
type: 'ir.actions.act_window',
res_model: 'pos.order',
view_mode: 'tree,form,calendar',
view_type: 'form',
views: [[false, 'list'],[false, 'form']],
domain: [['amount_total', '<', 0.0]],
// domain: [['date_order', '=', date]],
target: 'current'
}, options)
}
});
},
pos_refund_today_orders: function(e){
var self = this;
var date = new Date();
// alert(date,"date")
var yesterday = new Date(date.getTime());
yesterday.setDate(date.getDate() - 1);
console.log(yesterday)
e.stopPropagation();
e.preventDefault();
session.user_has_group('hr.group_hr_user').then(function(has_group){
if(has_group){
var options = {
on_reverse_breadcrumb: self.on_reverse_breadcrumb,
};
self.do_action({
name: _t("Refund Orders"),
type: 'ir.actions.act_window',
res_model: 'pos.order',
view_mode: 'tree,form,calendar',
view_type: 'form',
views: [[false, 'list'],[false, 'form']],
domain: [['amount_total', '<', 0.0],['date_order','<=', date],['date_order', '>=', yesterday]],
// domain: [['date_order', '=', date]],
target: 'current'
}, options)
}
});
},
pos_order: function(e){
var self = this;
var date = new Date();
var yesterday = new Date(date.getTime());
yesterday.setDate(date.getDate() - 1);
console.log(yesterday)
e.stopPropagation();
e.preventDefault();
session.user_has_group('hr.group_hr_user').then(function(has_group){
if(has_group){
var options = {
on_reverse_breadcrumb: self.on_reverse_breadcrumb,
};
self.do_action({
name: _t("Total Order"),
type: 'ir.actions.act_window',
res_model: 'pos.order',
view_mode: 'tree,form,calendar',
view_type: 'form',
views: [[false, 'list'],[false, 'form']],
// domain: [['amount_total', '<', 0.0]],
target: 'current'
}, options)
}
});
},
pos_session: function(e){
var self = this;
e.stopPropagation();
e.preventDefault();
session.user_has_group('hr.group_hr_user').then(function(has_group){
if(has_group){
var options = {
on_reverse_breadcrumb: self.on_reverse_breadcrumb,
};
self.do_action({
name: _t("sessions"),
type: 'ir.actions.act_window',
res_model: 'pos.session',
view_mode: 'tree,form,calendar',
view_type: 'form',
views: [[false, 'list'],[false, 'form']],
// domain: [['state','=', In Progress]],
target: 'current'
}, options)
}
});
},
onclick_pos_sales:function(events){
var option = $(events.target).val();
console.log('came monthly')
var self = this
var ctx = self.$("#canvas_1");
rpc.query({
model: "pos.order",
method: "get_department",
args: [option],
}).then(function (arrays) {
console.log(arrays)
var data = {
labels: arrays[1],
datasets: [
{
label: arrays[2],
data: arrays[0],
backgroundColor: [
"rgba(255, 99, 132,1)",
"rgba(54, 162, 235,1)",
"rgba(75, 192, 192,1)",
"rgba(153, 102, 255,1)",
"rgba(10,20,30,1)"
],
borderColor: [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(10,20,30,0.3)"
],
borderWidth: 1
},
]
};
//options
var options = {
responsive: true,
title: {
display: true,
position: "top",
text: "SALE DETAILS",
fontSize: 18,
fontColor: "#111"
},
legend: {
display: true,
position: "bottom",
labels: {
fontColor: "#333",
fontSize: 16
}
},
scales: {
yAxes: [{
ticks: {
min: 0
}
}]
}
};
//create Chart class object
if (window.myCharts != undefined)
window.myCharts.destroy();
window.myCharts = new Chart(ctx, {
// var chart = new Chart(ctx, {
type: "bar",
data: data,
options: options
});
});
},
render_top_customer_graph:function(){
var self = this
var ctx = self.$(".top_customer");
rpc.query({
model: "pos.order",
method: "get_the_top_customer",
}).then(function (arrays) {
var data = {
labels: arrays[1],
datasets: [
{
label: "",
data: arrays[0],
backgroundColor: [
"rgb(148, 22, 227)",
"rgba(54, 162, 235)",
"rgba(75, 192, 192)",
"rgba(153, 102, 255)",
"rgba(10,20,30)"
],
borderColor: [
"rgba(255, 99, 132,)",
"rgba(54, 162, 235,)",
"rgba(75, 192, 192,)",
"rgba(153, 102, 255,)",
"rgba(10,20,30,)"
],
borderWidth: 1
},
]
};
//options
var options = {
responsive: true,
title: {
display: true,
position: "top",
text: " Top Customer",
fontSize: 18,
fontColor: "#111"
},
legend: {
display: true,
position: "bottom",
labels: {
fontColor: "#333",
fontSize: 16
}
},
scales: {
yAxes: [{
ticks: {
min: 0
}
}]
}
};
//create Chart class object
var chart = new Chart(ctx, {
type: "pie",
data: data,
options: options
});
});
},
render_top_product_graph:function(){
var self = this
var ctx = self.$(".top_selling_product");
rpc.query({
model: "pos.order",
method: "get_the_top_products",
}).then(function (arrays) {
var data = {
labels: arrays[1],
datasets: [
{
label: "Quantity",
data: arrays[0],
backgroundColor: [
"rgba(255, 99, 132,1)",
"rgba(54, 162, 235,1)",
"rgba(75, 192, 192,1)",
"rgba(153, 102, 255,1)",
"rgba(10,20,30,1)"
],
borderColor: [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(10,20,30,0.3)"
],
borderWidth: 1
},
]
};
//options
var options = {
responsive: true,
title: {
display: true,
position: "top",
text: " Top products",
fontSize: 18,
fontColor: "#111"
},
legend: {
display: true,
position: "bottom",
labels: {
fontColor: "#333",
fontSize: 16
}
},
scales: {
yAxes: [{
ticks: {
min: 0
}
}]
}
};
//create Chart class object
var chart = new Chart(ctx, {
type: "horizontalBar",
data: data,
options: options
});
});
},
render_product_category_graph:function(){
var self = this
var ctx = self.$(".top_product_categories");
rpc.query({
model: "pos.order",
method: "get_the_top_categories",
}).then(function (arrays) {
var data = {
labels: arrays[1],
datasets: [
{
label: "Quantity",
data: arrays[0],
backgroundColor: [
"rgba(255, 99, 132,1)",
"rgba(54, 162, 235,1)",
"rgba(75, 192, 192,1)",
"rgba(153, 102, 255,1)",
"rgba(10,20,30,1)"
],
borderColor: [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(10,20,30,0.3)"
],
borderWidth: 1
},
]
};
//options
var options = {
responsive: true,
title: {
display: true,
position: "top",
text: " Top product categories",
fontSize: 18,
fontColor: "#111"
},
legend: {
display: true,
position: "bottom",
labels: {
fontColor: "#333",
fontSize: 16
}
},
scales: {
yAxes: [{
ticks: {
min: 0
}
}]
}
};
//create Chart class object
var chart = new Chart(ctx, {
type: "horizontalBar",
data: data,
options: options
});
});
},
});
core.action_registry.add('pos_dashboard', PosDashboard);
return PosDashboard;
});

305
dashboard_pos/static/src/xml/pos_dashboard.xml

@ -0,0 +1,305 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="PosDashboard">
<div class="oh_dashboards">
<div class="container-fluid o_pos_dashboard">
</div>
</div>
</t>
<t t-name="PosOrders">
<div class="row main-section">
<div class="col-md-4 col-sm-6 pos_order_today oh-payslip">
<div class="oh-card" style="width: 288px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<!-- <div class="stat-icon" style="background:#5bcbd0"><t t-esc="widget.today_sale"/></div>-->
<div class="stat-icon" style="background:#5bcbd0"><i class="fa fa-shopping-bag"/></div>
<div class="stat-content">
<div class="stat-head">Today Orders</div>
<div class="stat_count"><t t-esc="widget.today_sale"/></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 pos_order oh-payslip">
<div class="oh-card" style="width: 288px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<!-- <div class="stat-icon" style="background:#645bd0"><t t-esc="widget.total_order_count"/></div>-->
<div class="stat-icon" style="background:#645bd0"><i class="fa fa-shopping-bag"/></div>
<div class="stat-content">
<div class="stat-head">Total Orders</div>
<div class="stat_count"><t t-esc="widget.total_order_count"/></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 pos_total_sales oh-payslip">
<div class="oh-card" style="width: 350px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#85d05b"><i class="fa fa-shopping-cart"/></div>
<!-- <div class="stat-icon" style="width:150px;background:##85d05b"><t t-esc="widget.total_sale"/></div>-->
<div class="stat-content">
<div class="stat-head">Total Sales</div>
<div class="stat_count"><t t-esc="widget.total_sale"/></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 pos_session oh-payslip">
<div class="oh-card" style="width: 288px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#d05bb8"><i class="fa fa-signal"/></div>
<div class="stat-content">
<div class="stat-head">Sessions</div>
<div class="stat_count"><t t-esc="widget.total_session"/></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 pos_refund_orders oh-payslip">
<div class="oh-card" style="width: 288px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#d0c35b"><i class="fa fa-minus-circle"/></div>
<div class="stat-content">
<div class="stat-head">Total Refund Orders</div>
<div class="stat_count"><t t-esc="widget.total_refund_count"/></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 pos_refund_today_orders oh-payslip">
<div class="oh-card" style="width: 350px;">
<div class="oh-card-body">
<div class="stat-widget-one">
<div class="stat-icon" style="background:#5b8ed0"><i class="fa fa-minus-circle"/></div>
<div class="stat-content">
<div class="stat-head">Today Refund Order</div>
<div class="stat_count"><t t-esc="widget.today_refund_total"/></div>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
<t t-name="PosChart">
<div class="col-xs-12 col-sm-12 col-lg-12 col-md-12">
<div class="row" style="margin:0px;">
<div class="col-md-6" id="col-graph">
<div class="card">
<div class="card-header">
<div class="card-title">
<b>
<h3 class="custom-h3">SALE REPORT</h3>
</b>
</div>
<div class="card-tools">
<select id="pos_sales">
<!-- <option value="pos_hourly_sales">Select</option>-->
<option style="display:none;"> -- select an option -- </option>
<option value="pos_hourly_sales">Hourly</option>
<option value="pos_monthly_sales">Monthly</option>
<option value="pos_year_sales">Yearly</option>
</select>
</div>
</div>
<div class="card-body mt-3" id="in_ex_body_hide">
<div class="row">
<div class="col-md-12">
<p id="myelement1"></p>
<div class="chart">
<canvas id="canvas_1" width="200" height="90"></canvas>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-6 top_customer_graph_view">
<div class="oh-card text-color">
<div class="oh-card-body pb-0">
<h4 class="mb-0">
</h4>
</div>
<canvas class="top_customer" width="200" height="120"/>
</div>
</div>
<div class="col-sm-6 col-lg-6 selling_product_graph_view">
<div class="oh-card text-color">
<div class="oh-card-body pb-0">
<h4 class="mb-0">
</h4>
</div>
<canvas class="top_selling_product" width="200" height="120"/>
</div>
</div>
<div class="col-sm-6 col-lg-6 selling_product_graph_view">
<div class="oh-card text-color">
<div class="oh-card-body pb-0">
<h4 class="mb-0">
</h4>
</div>
<canvas class="top_product_categories" width="200" height="120"/>
</div>
</div>
</div>
</div>
</t>
<t t-name="PosCustomer">
<div class="employee_dashboard_main">
<div class="row main-section">
<div class="col-md-4 col-lg-4">
<div class="hr_notification" style="background: #fff;transition: transform 0.2s ease, box-shadow 0.2s ease;will-change: transform, box-shadow;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06);
height: 316px;overflow-y: auto;margin-bottom: 15px;">
<div class="hr_notification_head"
style="font-size: 17px;text-align: center;padding: 12px 0;color: #fff;font-weight: 300;background: #de6a5e;margin-bottom: 9px;">
Sale by Salesperson
</div>
<div class="col-sm-12 col-lg-12" style="padding:0;">
<div class="text-color">
<div class="">
<div class="media">
<div class="media-body">
<table class="table table-sm">
<thead>
<tr>
<th rowspan="12">Name&#160;&#160;&#160;</th>
<th rowspan="12">orders</th>
<th rowspan="12">Amount</th>
</tr>
</thead>
<tbody>
<t t-foreach="widget.top_salesperson" t-as="salesperson">
<tr>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="salesperson[0]"/>
</h2>
</td>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="salesperson[2]"/>
</h2>
</td>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="salesperson[1]"/>
</h2>
</td>
</tr>
</t>
</tbody>
</table>
</div></div></div></div>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4">
<div class="hr_notification" style="background: #fff;transition: transform 0.2s ease, box-shadow 0.2s ease;will-change: transform, box-shadow;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06);
height: 316px;overflow-y: auto;margin-bottom: 15px;">
<div class="hr_notification_head"
style="font-size: 17px;text-align: center;padding: 12px 0;color: #fff;font-weight: 300;background:#de6a5e;;margin-bottom: 9px;">
Payment Method
</div>
<div class="col-sm-12 col-lg-12" style="padding:0;">
<div class="text-color">
<div class="">
<div class="media">
<div class="media-body">
<table class="table table-sm">
<thead>
<tr>
<th rowspan="12">Payment Method&#160;&#160;&#160;</th>
<th rowspan="12">Amount</th>
</tr>
</thead>
<tbody>
<t t-foreach="widget.payment_details" t-as="payment_method">
<tr>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="payment_method[0]"/>
</h2>
</td>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="payment_method[1]"/>
</h2>
</td>
</tr>
</t>
</tbody>
</table>
</div></div></div></div>
</div>
</div>
</div>
<div class="col-md-4 col-lg-4">
<div class="hr_notification" style="background: #fff;transition: transform 0.2s ease, box-shadow 0.2s ease;will-change: transform, box-shadow;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06);
height: 316px;overflow-y: auto;margin-bottom: 15px;">
<div class="hr_notification_head"
style="font-size: 17px;text-align: center;padding: 12px 0;color: #fff;font-weight: 300;background: #de6a5e;margin-bottom: 9px;">
Session Status
</div>
<div class="col-sm-12 col-lg-12" style="padding:0;">
<div class="text-color">
<div class="">
<div class="media">
<div class="media-body">
<table class="table table-sm">
<thead>
<tr>
<th rowspan="12">Session&#160;&#160;&#160;</th>
<th rowspan="12">Status</th>
<!-- <th rowspan="12">Amount</th>-->
</tr>
</thead>
<tbody>
<t t-foreach="widget.selling_product" t-as="session">
<tr>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="session['session']"/>
</h2>
</td>
<td>
<h2 class="text-color display-6" style="font-size: 15px;">
<t t-esc="session['status']"/>
</h2>
</td>
<!-- <td>-->
<!-- <h2 class="text-color display-6" style="font-size: 15px;">-->
<!-- <t t-esc="salesperson[1]"/>-->
<!-- </h2>-->
<!-- </td>-->
</tr>
</t>
</tbody>
</table>
</div></div></div></div>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>

14
dashboard_pos/views/dashboard_views.xml

@ -0,0 +1,14 @@
<odoo>
<data>
<record id="action_pos_dashboard" model="ir.actions.client">
<field name="name">Dashboard</field>
<field name="tag">pos_dashboard</field>
</record>
<menuitem name="Dashboard" id="pos_dashboard" parent="point_of_sale.menu_point_rep"
sequence="1"
groups="point_of_sale.group_pos_manager"
action="action_pos_dashboard"/>
</data>
</odoo>

24
project_report_pdf/README.rst

@ -0,0 +1,24 @@
Project Report v15
==================
PDF and XLS Reports for Project Module.
Features
========
* Project Task Report XLS [With advanced Filtration]
* Project Task Report PDF [With advanced Filtration]
Credits
=======
Cybrosys Techno Solutions <www.cybrosys.com>
Author
------
* Developer v9: Avinash Nk @ cybrosys
* Developer v10: Treesa @ cybrosys
* Developer V11: Akshay @ cybrosys
* Developer V12: Akshay @ cybrosys
* Developer V13: Vinaya S B @ cybrosys
* Developer V14: Muhammed P @ cybrosys
* Developer V15: IRFAN @ cybrosys

24
project_report_pdf/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import wizard
from . import controllers
from . import report

47
project_report_pdf/__manifest__.py

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Project Report XLS & PDF',
'version': '15.0.1.0.0',
"category": "Project",
'author': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'maintainer': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'summary': """Advanced PDF & XLS Reports for Project With Filtrations""",
'description': """Advanced PDF & XLS Reports for Project With Filtrations, Odoo 15, Odoo15""",
'depends': ['base', 'project'],
'license': 'AGPL-3',
'data': ['security/ir.model.access.csv',
'wizard/project_report_wizard_view.xml',
'report/project_report_pdf_view.xml',
'views/project_report_button.xml',
'views/project_report.xml'
],
'assets': {
'web.assets_backend': [
'project_report_pdf/static/src/js/action_manager.js',
],
},
'images': ['static/description/banner.png'],
'installable': True,
'auto_install': False,
}

1
project_report_pdf/controllers/__init__.py

@ -0,0 +1 @@
from . import main

56
project_report_pdf/controllers/main.py

@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
import json
from odoo import http
from odoo.http import content_disposition, request
from odoo.addons.web.controllers.main import _serialize_exception
from odoo.tools import html_escape
class XLSXReportController(http.Controller):
@http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False)
def get_report_xlsx(self, model, options, output_format, report_name, **kw):
uid = request.session.uid
report_obj = request.env[model].with_user(uid)
options = json.loads(options)
token = 'dummy-because-api-expects-one'
try:
if output_format == 'xlsx':
response = request.make_response(
None,
headers=[
('Content-Type', 'application/vnd.ms-excel'),
('Content-Disposition', content_disposition(report_name + '.xlsx'))
]
)
report_obj.get_xlsx_report(options, response)
response.set_cookie('fileToken', token)
return response
except Exception as e:
se = _serialize_exception(e)
error = {
'code': 200,
'message': 'Odoo Server Error',
'data': se
}
return request.make_response(html_escape(json.dumps(error)))

7
project_report_pdf/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <project_report_pdf>
#### 3.10.2020
#### Version 15.0.1.0.0
##### ADD
- Initial commit for project_report_pdf

22
project_report_pdf/report/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Akshay Babu(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import project_report_pdf

77
project_report_pdf/report/project_report_pdf.py

@ -0,0 +1,77 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo.http import request
from odoo import models, api
class ProjectReportParser(models.AbstractModel):
_name = 'report.project_report_pdf.project_report_template'
def _get_report_values(self, docids, data=None):
name = data['record']
wizard_record = request.env['wizard.project.report'].search([])[-1]
task_obj = request.env['project.task']
users_selected = []
stages_selected = []
for elements in wizard_record.partner_select:
users_selected.append(elements.id)
for elements in wizard_record.stage_select:
stages_selected.append(elements.id)
if wizard_record.partner_select:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('user_ids', 'in', users_selected),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name),
('user_ids', 'in', users_selected)])
else:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name)])
vals = []
for i in current_task:
vals.append({
'name': i.name,
'user_id': i.user_ids.name,
'stage_id': i.stage_id.name,
})
if current_task:
return {
'vals': vals,
'name': current_task[0].project_id.name,
'manager': current_task[0].project_id.user_id.name,
'date_start': current_task[0].project_id.date_start,
'date_end': current_task[0].project_id.date,
}
else:
return {
'vals': vals,
'name': current_task.project_id.name,
'manager': current_task.project_id.user_id.name,
'date_start': current_task.project_id.date_start,
'date_end': current_task.project_id.date,
}

46
project_report_pdf/report/project_report_pdf_view.xml

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="project_report_template">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<br/>
<div style="text-align:left;color:black!important;"><strong><h1>Project :<span
t-esc="name"/></h1></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>Project Manager:<span
t-esc="manager"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>Start Date:<span
t-esc="date_start"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><p>End Date:<span
t-esc="date_end"/></p></strong></div>
<div style="text-align:left;color:black!important;"><strong><h1>Open Tasks</h1></strong></div>
<table class="table table-condensed">
<thead>
<tr>
<th style="text-align:left;color:black!important;">Task</th>
<th style="text-align:left;color:black!important;">Assigned</th>
<th style="text-align:left;color:black!important;">Stage</th>
</tr>
</thead>
<tbody>
<t t-foreach="vals" t-as="res">
<tr>
<td>
<span t-att-style="style" t-esc="res['name']"/>
</td>
<td>
<span t-att-style="style" t-esc="res['user_id']"/>
</td>
<td>
<span t-att-style="style" t-esc="res['stage_id']"/>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>

2
project_report_pdf/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_wizard_project_report,wizard.project.report,model_wizard_project_report,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_wizard_project_report wizard.project.report model_wizard_project_report 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
project_report_pdf/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
project_report_pdf/static/description/assets/modules/dynamic_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
project_report_pdf/static/description/assets/modules/list_view_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
project_report_pdf/static/description/assets/modules/multiple_ref_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
project_report_pdf/static/description/assets/modules/print_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
project_report_pdf/static/description/assets/modules/product_return_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
project_report_pdf/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
project_report_pdf/static/description/assets/screenshots/screenshot1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
project_report_pdf/static/description/assets/screenshots/screenshot2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
project_report_pdf/static/description/assets/screenshots/screenshot3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
project_report_pdf/static/description/assets/screenshots/screenshot4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
project_report_pdf/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
project_report_pdf/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

606
project_report_pdf/static/description/index.html

@ -0,0 +1,606 @@
<div class="container" style="padding: 4rem 1.5rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Project Report PDF &amp; XLS</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Export Project Report to PDF &amp; XLS
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This module enhances the project management with intuitive reports. Reports consist of task details
with respect to the selected project. The user can use the filter facilities from report wizard to
get the optimized reports.
</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
PDF Reports</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
PDF Reports in Project.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
XLS Reports</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
XLS Reports in Project.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Detailed Reports</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Detailed Report on Tasks.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Advanced Filters</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Advanced Filters for Report</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Go to project</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
To get to the project, go to Project -> Project</p>
<img src="assets/screenshots/screenshot1.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Filter Project Reports</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
You can filter the project report via selecting the appropriate options from the wizard.</p>
<img src="assets/screenshots/screenshot2.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Export to PDF</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
PDF Report Of Data Import/Export Plugin Project. << /p>
<img src="assets/screenshots/screenshot3.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Export to Excel</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Excel Report Of Data Import/Export Plugin Project.
</p>
<img src="assets/screenshots/screenshot4.png" class="img-responsive img-thumbnail border" width="100%"
height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dynamic_accounts_report/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/dynamic_image.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/14.0/product_return_pos/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/product_return_image.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/14.0/product_approval_management/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/approval_image.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/mrp_work_order_print/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/print_image.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/14.0/list_view_sticky_header/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/list_view_image.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/14.0/multiple_reference_per_product/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/multiple_ref_image.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a
class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</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: #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>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-4">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-4">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
<div class="col-lg-4">
<a href="mailto:info@cybrosys.com" target="_blank" class="btn btn-block deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>info@cybrosys.com</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

21
project_report_pdf/static/src/js/action_manager.js

@ -0,0 +1,21 @@
/** @odoo-module */
import { registry } from "@web/core/registry";
import { download } from "@web/core/network/download";
import framework from 'web.framework';
import session from 'web.session';
registry.category("ir.actions.report handlers").add("xlsx", async (action) => {
if (action.report_type === 'xlsx') {
framework.blockUI();
var def = $.Deferred();
session.get_file({
url: '/xlsx_reports',
data: action.data,
success: def.resolve.bind(def),
error: (error) => this.call('crash_manager', 'rpc_error', error),
complete: framework.unblockUI,
});
return def;
}
});

10
project_report_pdf/views/action_manager.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend" name="xls_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/project_report_pdf/static/src/js/action_manager.js"/>
</xpath>
</template>
</data>
</odoo>

12
project_report_pdf/views/project_report.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="report_project_pdf" model="ir.actions.report">
<field name="name">Project PDF Report</field>
<field name="model">project.project</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">project_report_pdf.project_report_template</field>
<field name="report_file">project_report_pdf.project_report_template</field>
</record>
</data>
</odoo>

16
project_report_pdf/views/project_report_button.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<record id="project_report_pdf_inherited" model="ir.ui.view">
<field name="name">project_report_pdf_inherited.form</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="%(project_report_pdf.project_report_open_wizard)d" type="action" string="Print" class="oe_highlight"/>
</xpath>
</field>
</record>
</data>
</odoo>

21
project_report_pdf/wizard/__init__.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import project_report_wizard

182
project_report_pdf/wizard/project_report_wizard.py

@ -0,0 +1,182 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2020-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from datetime import datetime
import json
import datetime
import pytz
import io
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
from odoo.http import request
from odoo.tools import date_utils
try:
from odoo.tools.misc import xlsxwriter
except ImportError:
import xlsxwriter
class ProjectReportButton(models.TransientModel):
_name = 'wizard.project.report'
partner_select = fields.Many2many('res.users', string='Assigned to')
stage_select = fields.Many2many('project.task.type', string="Stage")
def print_project_report_pdf(self):
active_record = self._context['active_id']
record = self.env['project.project'].browse(active_record)
data = {
'ids': self.ids,
'model': self._name,
'record': record.id,
'partner_select': self.partner_select
}
return self.env.ref('project_report_pdf.report_project_pdf').report_action(self, data=data)
def print_project_report_xls(self):
active_record = self._context['active_id']
record = self.env['project.project'].browse(active_record)
data = {
'ids': self.ids,
'model': self._name,
'record': record.id,
}
return {
'type': 'ir.actions.report',
'data': {'model': 'wizard.project.report',
'options': json.dumps(data, default=date_utils.json_default),
'output_format': 'xlsx',
'report_name': 'Project Report',
},
'report_type': 'xlsx'
}
def get_xlsx_report(self, data, response):
output = io.BytesIO()
workbook = xlsxwriter.Workbook(output, {'in_memory': True})
name = data['record']
user_obj = self.env.user
wizard_record = request.env['wizard.project.report'].search([])[-1]
task_obj = request.env['project.task']
users_selected = []
stages_selected = []
for elements in wizard_record.partner_select:
users_selected.append(elements.id)
for elements in wizard_record.stage_select:
stages_selected.append(elements.id)
if wizard_record.partner_select:
print(name,"dfzfdsggggggggggggggggg")
print(users_selected,"dfzfdsggggggggggggggggg")
print(stages_selected,"dfzfdsggggggggggggggggg")
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('user_ids', 'in', users_selected),
('stage_id', 'in', stages_selected)])
print(current_task,"current_task")
else:
current_task = task_obj.search([('project_id', '=', name),
('user_ids', 'in', users_selected)])
else:
if wizard_record.stage_select:
current_task = task_obj.search([('project_id', '=', name),
('stage_id', 'in', stages_selected)])
else:
current_task = task_obj.search([('project_id', '=', name)])
vals = []
for i in current_task:
vals.append({
'name': i.name,
'user_id': i.user_ids.name if i.user_ids.name else '',
'stage_id': i.stage_id.name,
})
if current_task:
project_name = current_task[0].project_id.name
user = current_task[0].project_id.user_id.name
else:
project_name = current_task.project_id.name
user = current_task.project_id.user_id.name
sheet = workbook.add_worksheet("Project Report")
format1 = workbook.add_format({'font_size': 22, 'bg_color': '#D3D3D3'})
format4 = workbook.add_format({'font_size': 22})
format2 = workbook.add_format({'font_size': 12, 'bold': True, 'bg_color': '#D3D3D3'})
format3 = workbook.add_format({'font_size': 10})
format5 = workbook.add_format({'font_size': 10, 'bg_color': '#FFFFFF'})
format7 = workbook.add_format({'font_size': 10, 'bg_color': '#FFFFFF'})
format7.set_align('center')
sheet.merge_range('A1:B1', user_obj.company_id.name, format5)
sheet.merge_range('A2:B2', user_obj.company_id.street, format5)
sheet.write('A3', user_obj.company_id.city, format5)
sheet.write('B3', user_obj.company_id.zip, format5)
sheet.merge_range('A4:B4', user_obj.company_id.state_id.name, format5)
sheet.merge_range('A5:B5', user_obj.company_id.country_id.name, format5)
sheet.merge_range('C1:H5', "", format5)
sheet.merge_range(5, 0, 6, 1, "Project :", format1)
if project_name:
sheet.merge_range(5, 2, 6, 7, project_name, format1)
sheet.merge_range('A8:B8', "Project Manager :", format5)
if user:
sheet.merge_range('C8:D8', user, format5)
date_start = ''
date_end = ''
if current_task:
date_start = str(current_task[0].project_id.date_start)
if current_task:
date_end = str(current_task[0].project_id.date)
sheet.merge_range('A9:B9', "Start Date :", format5)
if not date_start:
sheet.merge_range('C9:D9', '', format5)
else:
sheet.merge_range('C9:D9', date_start, format5)
sheet.merge_range('A10:B10', "End Date :", format5)
if str(date_end):
sheet.merge_range('C10:D10', date_end, format5)
sheet.merge_range(0, 2, 4, 5, "", format5)
sheet.merge_range(1, 6, 4, 7, "", format5)
sheet.merge_range(7, 4, 9, 7, "", format5)
sheet.merge_range(10, 4, 11, 7, "", format5)
sheet.merge_range('A11:H12', 'Open Tasks', format4)
sheet.merge_range('A13:D13', "Tasks", format2)
sheet.merge_range('E13:F13', "Assigned", format2)
sheet.merge_range('G13:H13', "Stage", format2)
row_number = 13
column_number = 0
for val in vals:
sheet.merge_range(row_number, column_number, row_number, column_number + 3, val['name'], format3)
sheet.merge_range(row_number, column_number + 4, row_number, column_number + 5, val['user_id'], format3)
sheet.merge_range(row_number, column_number + 6, row_number, column_number + 7, val['stage_id'], format3)
row_number += 1
row_number += 1
sheet.merge_range(row_number, 0, row_number, 1, user_obj.company_id.phone, format7)
sheet.merge_range(row_number, 2, row_number, 4, user_obj.company_id.email, format7)
sheet.merge_range(row_number, 5, row_number, 7, user_obj.company_id.website, format7)
workbook.close()
output.seek(0)
response.stream.write(output.read())
output.close()

36
project_report_pdf/wizard/project_report_wizard_view.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="report_wizard_view_form" model="ir.ui.view">
<field name="name">report_wizard_view_form.form</field>
<field name="model">wizard.project.report</field>
<field name="arch" type="xml">
<form string="Select period">
<group>
<group >
<field name="partner_select" widget="many2many_tags"/>
</group>
<group >
<field name="stage_select" widget="many2many_tags"/>
</group>
</group>
<footer>
<button name="print_project_report_pdf" type="object" string="Print PDF" class="oe_highlight"/>
<button name="print_project_report_xls" type="object" string="Print XLS" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window
id="project_report_open_wizard"
name="Project Report"
res_model="wizard.project.report"
view_mode="form"
view_id="report_wizard_view_form"
target="new"/>
</data>
</odoo>
Loading…
Cancel
Save