Browse Source

NOV 10 : [ADD] Initial Commit 'lunch_order_pdf'

pull/295/head
Shijin V 1 year ago
parent
commit
77a5c7ce4d
  1. 46
      lunch_order_pdf/README.rst
  2. 23
      lunch_order_pdf/__init__.py
  3. 44
      lunch_order_pdf/__manifest__.py
  4. 7
      lunch_order_pdf/doc/RELEASE_NOTES.md
  5. 22
      lunch_order_pdf/report/__init__.py
  6. 89
      lunch_order_pdf/report/lunch_order_report.py
  7. 116
      lunch_order_pdf/report/lunch_order_report_templates.xml
  8. 11
      lunch_order_pdf/report/lunch_order_reports.xml
  9. 2
      lunch_order_pdf/security/ir.model.access.csv
  10. BIN
      lunch_order_pdf/static/description/assets/icons/check.png
  11. BIN
      lunch_order_pdf/static/description/assets/icons/chevron.png
  12. BIN
      lunch_order_pdf/static/description/assets/icons/cogs.png
  13. BIN
      lunch_order_pdf/static/description/assets/icons/consultation.png
  14. BIN
      lunch_order_pdf/static/description/assets/icons/ecom-black.png
  15. BIN
      lunch_order_pdf/static/description/assets/icons/education-black.png
  16. BIN
      lunch_order_pdf/static/description/assets/icons/hotel-black.png
  17. BIN
      lunch_order_pdf/static/description/assets/icons/license.png
  18. BIN
      lunch_order_pdf/static/description/assets/icons/lifebuoy.png
  19. BIN
      lunch_order_pdf/static/description/assets/icons/manufacturing-black.png
  20. BIN
      lunch_order_pdf/static/description/assets/icons/pos-black.png
  21. BIN
      lunch_order_pdf/static/description/assets/icons/puzzle.png
  22. BIN
      lunch_order_pdf/static/description/assets/icons/restaurant-black.png
  23. BIN
      lunch_order_pdf/static/description/assets/icons/service-black.png
  24. BIN
      lunch_order_pdf/static/description/assets/icons/trading-black.png
  25. BIN
      lunch_order_pdf/static/description/assets/icons/training.png
  26. BIN
      lunch_order_pdf/static/description/assets/icons/update.png
  27. BIN
      lunch_order_pdf/static/description/assets/icons/user.png
  28. BIN
      lunch_order_pdf/static/description/assets/icons/wrench.png
  29. BIN
      lunch_order_pdf/static/description/assets/misc/categories.png
  30. BIN
      lunch_order_pdf/static/description/assets/misc/check-box.png
  31. BIN
      lunch_order_pdf/static/description/assets/misc/compass.png
  32. BIN
      lunch_order_pdf/static/description/assets/misc/corporate.png
  33. BIN
      lunch_order_pdf/static/description/assets/misc/customer-support.png
  34. BIN
      lunch_order_pdf/static/description/assets/misc/cybrosys-logo.png
  35. BIN
      lunch_order_pdf/static/description/assets/misc/features.png
  36. BIN
      lunch_order_pdf/static/description/assets/misc/logo.png
  37. BIN
      lunch_order_pdf/static/description/assets/misc/openhrms.png
  38. BIN
      lunch_order_pdf/static/description/assets/misc/pictures.png
  39. BIN
      lunch_order_pdf/static/description/assets/misc/pie-chart.png
  40. BIN
      lunch_order_pdf/static/description/assets/misc/right-arrow.png
  41. BIN
      lunch_order_pdf/static/description/assets/misc/star.png
  42. BIN
      lunch_order_pdf/static/description/assets/misc/support.png
  43. BIN
      lunch_order_pdf/static/description/assets/misc/whatsapp.png
  44. BIN
      lunch_order_pdf/static/description/assets/modules/1.png
  45. BIN
      lunch_order_pdf/static/description/assets/modules/2.png
  46. BIN
      lunch_order_pdf/static/description/assets/modules/3.png
  47. BIN
      lunch_order_pdf/static/description/assets/modules/4.png
  48. BIN
      lunch_order_pdf/static/description/assets/modules/5.png
  49. BIN
      lunch_order_pdf/static/description/assets/modules/6.png
  50. BIN
      lunch_order_pdf/static/description/assets/screenshots/hero.gif
  51. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_1.png
  52. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_2.png
  53. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_3.png
  54. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_4.png
  55. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_5.png
  56. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_6.png
  57. BIN
      lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_7.png
  58. BIN
      lunch_order_pdf/static/description/banner.png
  59. BIN
      lunch_order_pdf/static/description/icon.png
  60. 599
      lunch_order_pdf/static/description/index.html
  61. 22
      lunch_order_pdf/wizard/__init__.py
  62. 113
      lunch_order_pdf/wizard/lunch_report.py
  63. 61
      lunch_order_pdf/wizard/lunch_report_views.xml

46
lunch_order_pdf/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Lunch Orders - PDF
==================
This module allow to print PDF report for lunch orders.
Configuration
=============
The user should be added to the security group: Administrator(Human Resources/ Lunch) inorder to get access to the new menus.
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (AGPL v3).
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
-------
Developer: (V16) Ammu Raj, Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
lunch_order_pdf/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import report
from . import wizard

44
lunch_order_pdf/__manifest__.py

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
{
'name': 'Lunch Orders - PDF',
'version': '16.0.1.0.0',
'category': 'Human Resources/Lunch',
'summary': "Custom report for Lunch module",
'description': "Create custom PDF Report for Lunch with required filters",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['lunch'],
'data': [
'security/ir.model.access.csv',
'report/lunch_order_report_templates.xml',
'report/lunch_order_reports.xml',
'wizard/lunch_report_views.xml'
],
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

7
lunch_order_pdf/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <lunch_order_pdf>
#### 10.11.2023
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Lunch Orders - PDF

22
lunch_order_pdf/report/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import lunch_order_report

89
lunch_order_pdf/report/lunch_order_report.py

@ -0,0 +1,89 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from odoo import api, fields, models
class LunchOrderReport(models.TransientModel):
"""Model for creating custom reports. Passing the values to the template"""
_name = 'report.lunch_order_pdf.report_lunch_order'
_description = 'Report for lunch orders'
@api.model
def _get_report_values(self, docids, data=None):
"""
Override the method to create custom report with custom values
:param docids: the recordset/ record from which the report action is
invoked
:param data: report data
:return: data dictionary to pass values to the report template
"""
period = None
grouped_orders = []
docs = self.env['lunch.report'].browse(
self.env.context.get('active_id'))
lang = self.env['res.lang'].search(
[('code', '=', self.env.context.get('lang'))])
order_ids = data.get('order_ids')
orders = self.env['lunch.order'].sudo().browse(order_ids)
end_date = docs.end_date
if not end_date:
end_date = fields.Date.context_today(self)
if docs.start_date:
period = "From " + docs.start_date.strftime(
lang.date_format) + " To " + end_date.strftime(lang.date_format)
if docs.group_order:
if docs.group_order == 'user_id':
users = orders.mapped('user_id').sorted(key='name')
for user in users:
grouped_orders.append([user.name, orders.filtered(
lambda order: order.user_id == user)])
elif docs.group_order == 'supplier_id':
vendors = orders.mapped('supplier_id').sorted(key='name')
for vendor in vendors:
grouped_orders.append([vendor.name, orders.filtered(
lambda order: order.supplier_id == vendor)])
elif docs.group_order == 'product_id':
products = orders.mapped('product_id').sorted(key='name')
for product in products:
grouped_orders.append([product.name, orders.filtered(
lambda order: order.product_id == product)])
elif docs.group_order == 'state':
order_states = ['new', 'ordered', 'confirmed', 'cancelled']
states = orders.mapped('state')
for state in order_states:
if state in states:
grouped_orders.append([state, orders.filtered(
lambda order: order.state == state)])
else:
companies = orders.mapped('company_id').sorted(key='name')
for company in companies:
grouped_orders.append([company.name, orders.filtered(
lambda order: order.company_id == company)])
else:
grouped_orders.append([False, orders])
return {
'doc_ids': self.ids,
'docs': docs,
'group_order': docs.group_order,
'grouped_orders': grouped_orders,
'period': period
}

116
lunch_order_pdf/report/lunch_order_report_templates.xml

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Report template -->
<template id="report_lunch_order">
<t t-call="web.html_container">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<div class="page">
<div style="padding-bottom:20px !important;"
class="oe_structure"/>
<h1 align="center">Lunch Report</h1>
<br/>
<p t-if="period" style="text-align: center;">
<strong style="text-align: right;">Period:</strong>
<span style="text-align: left;">
<span t-esc="period"/>
</span>
</p>
<t t-if="grouped_orders">
<table name="orders" class="table table-condensed">
<thead>
<tr>
<t t-if="group_order">
<th t-if="group_order == 'user_id'">
User
</th>
<th t-if="group_order == 'supplier_id'">
Vendor
</th>
<th t-if="group_order == 'product_id'">
Product
</th>
<th t-if="group_order == 'state'">
Status
</th>
<th t-if="group_order == 'company_id'">
Company
</th>
</t>
<th>Order Date</th>
<th t-if="not group_order or group_order != 'supplier_id'">
Vendor
</th>
<th t-if="not group_order or group_order != 'product_id'">
Product
</th>
<th>Extras</th>
<th t-if="not group_order or group_order != 'user_id'">
User
</th>
<th>Lunch Location</th>
<th t-if="not group_order or group_order != 'company_id'">
Company
</th>
<th>Price</th>
<th t-if="not group_order or group_order != 'state'">
Status
</th>
</tr>
</thead>
<tbody>
<t t-foreach="grouped_orders"
t-as="order_list">
<t t-if="group_order">
<td>
<t t-if="group_order == 'state'">
<span t-esc="dict(order_list[1][0].fields_get(allfields=['state'])['state']['selection'])[order_list[0]]"/>
</t>
<t t-else="">
<span t-esc="order_list[0]"/>
</t>
</td>
</t>
<tr t-foreach="order_list[1]"
t-as="order">
<td t-if="group_order"/>
<td>
<span t-esc="order.date"
t-options="{'widget': 'date'}"/>
</td>
<td t-if="not group_order or group_order != 'supplier_id'">
<span t-esc="order.supplier_id.name"/>
</td>
<td t-if="not group_order or group_order != 'product_id'">
<span t-esc="order.product_id.name"/>
</td>
<td>
<span t-esc="order.display_toppings"/>
</td>
<td t-if="not group_order or group_order != 'user_id'">
<span t-esc="order.user_id.name"/>
</td>
<td>
<span t-esc="order.lunch_location_id.name"/>
</td>
<td t-if="not group_order or group_order != 'company_id'">
<span t-esc="order.company_id.name"/>
</td>
<td>
<span t-esc="order.price"
t-options="{'widget': 'monetary', 'display_currency': order.currency_id}"/>
</td>
<td t-if="not group_order or group_order != 'state'">
<span t-esc="dict(order.fields_get(allfields=['state'])['state']['selection'])[order.state]"/>
</td>
</tr>
</t>
</tbody>
</table>
</t>
</div>
</t>
</t>
</t>
</template>
</odoo>

11
lunch_order_pdf/report/lunch_order_reports.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Report action -->
<record id="report_lunch_report_action" model="ir.actions.report">
<field name="name">Lunch Report</field>
<field name="model">lunch.report</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">lunch_order_pdf.report_lunch_order</field>
<field name="report_file">lunch_order_pdf.report_lunch_order</field>
</record>
</odoo>

2
lunch_order_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_lunch_report,access.lunch.report,model_lunch_report,lunch.group_lunch_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_lunch_report access.lunch.report model_lunch_report lunch.group_lunch_manager 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
lunch_order_pdf/static/description/assets/misc/openhrms.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
lunch_order_pdf/static/description/assets/screenshots/lunch_order_pdf_7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
lunch_order_pdf/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
lunch_order_pdf/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

599
lunch_order_pdf/static/description/index.html

@ -0,0 +1,599 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;"/>
<div>
<div
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Lunch Orders - PDF</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">This Module Allows to Generate PDF Report for Lunch Orders</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive"
style="width: 100%; margin-left: auto; margin-right: auto;"/>
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
This module crafted by Cybrosys Technologies provides an option to generate custom PDF report in
Lunch module. The lunch orders can be grouped by different fields.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features
</h2>
</div>
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center" style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Use the new wizard that can be used to generate custom report.</span>
</div>
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The PDF report that contains the details of lunch orders.</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Configuration
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">The user should be added to the security group: Administrator(Human Resources/ Lunch) inorder to get access to the new Report menus.</p>
<img src="assets/screenshots/lunch_order_pdf_1.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">New menus
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Lunch -> Report -> Lunch Report. Use this menu to open the wizard.</p>
<img src="assets/screenshots/lunch_order_pdf_2.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Wizard to create custom report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">This wizard can be used to generate a custom PDF report for Lunch Orders. We can specify Start Date
and End Date to filter the orders based on the period. The Start Date is a mandatory field. If we
don't specify an End Date, then the current date will be taken. We can use the fields Users, Vendors,
Lunch Locations, and Companies to filter the orders. If we don't set these fields, all the orders
will be included in the report.</p>
<img src="assets/screenshots/lunch_order_pdf_3.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Plain Report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">A plain report can be created if we don't select any group.</p>
<img src="assets/screenshots/lunch_order_pdf_4.png" class="img-thumbnail">
</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;">Product Filter</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
If we need to filter the lunch orders by products or products categories, choose the corresponding
option and add the products or product categories.
</p>
<img src="assets/screenshots/lunch_order_pdf_5.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;">Group Orders</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
The Group Orders field can be used to set a grouping option for the orders. We can group the orders
by User, Vendor, Product, Status, and Company.
</p>
<img src="assets/screenshots/lunch_order_pdf_6.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;">Report with Grouped Lunch Orders</h4>
<p style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
With the grouping option, we can generate a report with the lunch orders grouped by the grouping
field.
</p>
<img src="assets/screenshots/lunch_order_pdf_7.png" class="img-responsive img-thumbnail border" width="100%" height="auto" />
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/sale_report_advanced/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/1.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/manufacturing_reports/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/thermal_invoice_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/fleet_complete_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/hr_holidays_balance_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/dynamic_accounts_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="width:35px; color:#000"> <span
class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo1"
data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48" width="48" style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help? Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4 d-flex justify-content-center align-items-center"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52" width="52" style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

22
lunch_order_pdf/wizard/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import lunch_report

113
lunch_order_pdf/wizard/lunch_report.py

@ -0,0 +1,113 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Ammu Raj (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class LunchReport(models.TransientModel):
"""Creating the report for Lunch"""
_name = 'lunch.report'
_description = 'Wizard for lunch report'
start_date = fields.Date(
string='Start Date', required=True, default=fields.Date.context_today,
help='Start date to filter the records')
end_date = fields.Date(
string='End Date', default=fields.Date.context_today,
help='End date to filter the records')
user_ids = fields.Many2many('res.users', string='Users',
domain='[("share", "=", False)]',
help="Add user for filter based on user")
lunch_supplier_ids = fields.Many2many('lunch.supplier', string='Vendors',
help='Vendors/ Lunch Suppliers.')
lunch_location_ids = fields.Many2many(
'lunch.location', string='Lunch Locations',
help="The Locations allocated for lunch")
product_filter = fields.Selection(
[('product', 'Product'), ('category', 'Product Category')],
string='Product Filter',
help='Filter orders by Products or Product Categories.')
product_ids = fields.Many2many(
'lunch.product', string='Products',
domain='[("active", "=", True)]', help='Products belongs to lunch')
category_ids = fields.Many2many(
'lunch.product.category', string='Categories',
help='Lunch Product Categories.')
company_ids = fields.Many2many('res.company', string='Companies',
help='For selecting the Companies')
group_order = fields.Selection(
[('user_id', 'User'), ('supplier_id', 'Vendor'),
('product_id', 'Product'), ('state', 'Status'),
('company_id', 'Company')], string='Group Orders',
help='Group orders in the report')
@api.onchange('start_date')
def _onchange_start_date(self):
"""
Set valid start_date on changing it
"""
if not self.end_date:
if self.start_date and self.start_date > fields.Date.context_today(
self):
self.start_date = fields.Date.context_today(self)
else:
if self.start_date and self.start_date > self.end_date:
self.start_date = self.end_date
@api.onchange('end_date')
def _onchange_end_date(self):
"""
Set valid end_date on changing it
"""
if self.start_date and self.end_date and \
self.start_date > self.end_date:
self.end_date = self.start_date
if self.end_date and self.end_date > fields.Date.context_today(self):
self.end_date = fields.Date.context_today(self)
def action_print_report(self):
"""
Print PDF report for lunch based on selected data
:return: report action
"""
domain = [('date', '>=', self.start_date)]
if self.end_date:
domain += [('date', '<=', self.end_date)]
if self.user_ids:
domain += [('user_id', 'in', self.user_ids.ids)]
if self.company_ids:
domain += [('company_id', 'in', self.company_ids.ids)]
if self.lunch_supplier_ids:
domain += [('supplier_id', 'in', self.lunch_supplier_ids.ids)]
if self.lunch_location_ids:
domain += [('lunch_location_id', 'in', self.lunch_location_ids.ids)]
if self.product_filter == 'product' and self.product_ids:
domain += [('product_id', 'in', self.product_ids.ids)]
if self.product_filter == 'category' and self.category_ids:
domain += [('product_id.category_id', 'in', self.category_ids.ids)]
orders = self.env['lunch.order'].sudo().search(domain)
if not orders:
raise UserError(_('There are no lunch orders in this period!'))
data = {'order_ids': orders.ids}
return self.env.ref(
'lunch_order_pdf.report_lunch_report_action').report_action(
self, data=data)

61
lunch_order_pdf/wizard/lunch_report_views.xml

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Wizard form view -->
<record id="lunch_report_view_form" model="ir.ui.view">
<field name="name">lunch.report.view.form</field>
<field name="model">lunch.report</field>
<field name="arch" type="xml">
<form string="Lunch Report">
<group>
<group>
<field name="start_date" widget="date"/>
<field name="end_date" widget="date"/>
<field name="user_ids" widget="many2many_tags"
options="{'create': false, 'create_edit': false}"/>
<field name="lunch_supplier_ids" widget="many2many_tags"
options="{'create': false, 'create_edit': false}"/>
</group>
<group>
<field name="lunch_location_ids" widget="many2many_tags"
options="{'create': false, 'create_edit': false}"/>
<field name="company_ids" widget="many2many_tags"
options="{'create': false, 'create_edit': false}"
groups="base.group_multi_company"/>
<field name="product_filter"/>
<field name="product_ids" widget="many2many_tags"
attrs="{'invisible': [('product_filter', '!=', 'product')], 'required': [('product_filter', '=', 'product')]}"
options="{'create': false, 'create_edit': false}"/>
<field name="category_ids" widget="many2many_tags"
attrs="{'invisible': [('product_filter', '!=', 'category')], 'required': [('product_filter', '=', 'category')]}"
options="{'create': false, 'create_edit': false}"/>
</group>
</group>
<group string="Group Orders in the Report">
<field name="group_order"/>
</group>
<footer>
<button string="Print" name="action_print_report"
type="object" class="btn-primary"/>
<button string="Discard" class="btn-default"
special="cancel"/>
</footer>
</form>
</field>
</record>
<!-- Wizard action window -->
<record id="lunch_report_action" model="ir.actions.act_window">
<field name="name">Lunch Report</field>
<field name="res_model">lunch.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">form</field>
<field name="view_id" ref="lunch_report_view_form"/>
<field name="target">new</field>
</record>
<!-- Report menu -->
<menuitem name="Report" id="lunch_report_menu_root" sequence="52"
parent="lunch.menu_lunch" groups="lunch.group_lunch_manager"/>
<menuitem name="Lunch Report" id="lunch_report_menu_action"
action="lunch_report_action" sequence="5"
parent="lunch_order_pdf.lunch_report_menu_root"
groups="lunch.group_lunch_manager"/>
</odoo>
Loading…
Cancel
Save