Browse Source

Oct 28: [ADD] Initial commit 'home_delivery_system'

pull/254/merge
Cybrosys Technologies 6 months ago
parent
commit
b8a93df925
  1. 48
      home_delivery_system/README.rst
  2. 24
      home_delivery_system/__init__.py
  3. 60
      home_delivery_system/__manifest__.py
  4. 23
      home_delivery_system/controllers/__init__.py
  5. 186
      home_delivery_system/controllers/home_delivery_system.py
  6. 83
      home_delivery_system/controllers/website_sale.py
  7. 168
      home_delivery_system/data/mail_template_data.xml
  8. 24
      home_delivery_system/data/website_data.xml
  9. 7
      home_delivery_system/doc/RELEASE_NOTES.md
  10. 22
      home_delivery_system/models/__init__.py
  11. 122
      home_delivery_system/models/stock_picking.py
  12. 18
      home_delivery_system/security/home_delivery_system_security.xml
  13. 2
      home_delivery_system/security/ir.model.access.csv
  14. BIN
      home_delivery_system/static/description/assets/icons/check.png
  15. BIN
      home_delivery_system/static/description/assets/icons/chevron.png
  16. BIN
      home_delivery_system/static/description/assets/icons/cogs.png
  17. BIN
      home_delivery_system/static/description/assets/icons/consultation.png
  18. BIN
      home_delivery_system/static/description/assets/icons/ecom-black.png
  19. BIN
      home_delivery_system/static/description/assets/icons/education-black.png
  20. BIN
      home_delivery_system/static/description/assets/icons/hotel-black.png
  21. BIN
      home_delivery_system/static/description/assets/icons/license.png
  22. BIN
      home_delivery_system/static/description/assets/icons/lifebuoy.png
  23. BIN
      home_delivery_system/static/description/assets/icons/manufacturing-black.png
  24. BIN
      home_delivery_system/static/description/assets/icons/pos-black.png
  25. BIN
      home_delivery_system/static/description/assets/icons/puzzle.png
  26. BIN
      home_delivery_system/static/description/assets/icons/restaurant-black.png
  27. BIN
      home_delivery_system/static/description/assets/icons/service-black.png
  28. BIN
      home_delivery_system/static/description/assets/icons/trading-black.png
  29. BIN
      home_delivery_system/static/description/assets/icons/training.png
  30. BIN
      home_delivery_system/static/description/assets/icons/update.png
  31. BIN
      home_delivery_system/static/description/assets/icons/user.png
  32. BIN
      home_delivery_system/static/description/assets/icons/wrench.png
  33. BIN
      home_delivery_system/static/description/assets/misc/categories.png
  34. BIN
      home_delivery_system/static/description/assets/misc/check-box.png
  35. BIN
      home_delivery_system/static/description/assets/misc/compass.png
  36. BIN
      home_delivery_system/static/description/assets/misc/corporate.png
  37. BIN
      home_delivery_system/static/description/assets/misc/customer-support.png
  38. BIN
      home_delivery_system/static/description/assets/misc/cybrosys-logo.png
  39. BIN
      home_delivery_system/static/description/assets/misc/features.png
  40. BIN
      home_delivery_system/static/description/assets/misc/logo.png
  41. BIN
      home_delivery_system/static/description/assets/misc/pictures.png
  42. BIN
      home_delivery_system/static/description/assets/misc/pie-chart.png
  43. BIN
      home_delivery_system/static/description/assets/misc/right-arrow.png
  44. BIN
      home_delivery_system/static/description/assets/misc/star.png
  45. BIN
      home_delivery_system/static/description/assets/misc/support.png
  46. BIN
      home_delivery_system/static/description/assets/misc/whatsapp.png
  47. BIN
      home_delivery_system/static/description/assets/modules/1.png
  48. BIN
      home_delivery_system/static/description/assets/modules/2.png
  49. BIN
      home_delivery_system/static/description/assets/modules/3.png
  50. BIN
      home_delivery_system/static/description/assets/modules/4.png
  51. BIN
      home_delivery_system/static/description/assets/modules/5.png
  52. BIN
      home_delivery_system/static/description/assets/modules/6.png
  53. BIN
      home_delivery_system/static/description/assets/screenshots/1.png
  54. BIN
      home_delivery_system/static/description/assets/screenshots/2.png
  55. BIN
      home_delivery_system/static/description/assets/screenshots/3.png
  56. BIN
      home_delivery_system/static/description/assets/screenshots/4.png
  57. BIN
      home_delivery_system/static/description/assets/screenshots/5.png
  58. BIN
      home_delivery_system/static/description/assets/screenshots/6.png
  59. BIN
      home_delivery_system/static/description/assets/screenshots/7.png
  60. BIN
      home_delivery_system/static/description/assets/screenshots/8.png
  61. BIN
      home_delivery_system/static/description/assets/screenshots/9.png
  62. BIN
      home_delivery_system/static/description/assets/screenshots/hero.gif
  63. BIN
      home_delivery_system/static/description/assets/screenshots/img.png
  64. BIN
      home_delivery_system/static/description/banner.png
  65. BIN
      home_delivery_system/static/description/icon.png
  66. BIN
      home_delivery_system/static/description/images/arrows-transparent.png
  67. BIN
      home_delivery_system/static/description/images/cybro_logo.png
  68. BIN
      home_delivery_system/static/description/images/icons/ecom.png
  69. BIN
      home_delivery_system/static/description/images/icons/education.png
  70. BIN
      home_delivery_system/static/description/images/icons/hotel.png
  71. BIN
      home_delivery_system/static/description/images/icons/manufacturing.png
  72. BIN
      home_delivery_system/static/description/images/icons/pos.png
  73. BIN
      home_delivery_system/static/description/images/icons/restaurant.png
  74. BIN
      home_delivery_system/static/description/images/icons/service.png
  75. BIN
      home_delivery_system/static/description/images/icons/trading.png
  76. 691
      home_delivery_system/static/description/index.html
  77. 20
      home_delivery_system/static/src/js/delivery_available.js
  78. 56
      home_delivery_system/views/broadcasted_order_templates.xml
  79. 59
      home_delivery_system/views/completed_order_templates.xml
  80. 169
      home_delivery_system/views/delivery_option_templates.xml
  81. 36
      home_delivery_system/views/delivery_templates.xml
  82. 17
      home_delivery_system/views/home_delivery_system_menus.xml
  83. 125
      home_delivery_system/views/stock_picking_views.xml
  84. 63
      home_delivery_system/views/website_open_jobs_templates.xml
  85. 22
      home_delivery_system/wizards/__init__.py
  86. 43
      home_delivery_system/wizards/delivery_person_reschedule.py
  87. 31
      home_delivery_system/wizards/delivery_person_reschedule_views.xml

48
home_delivery_system/README.rst

@ -0,0 +1,48 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Home Delivery system
====================
Home delivery system is to deliver the orders through a delivery person and then
the delivery person can make the payment at the time of delivery.
Configuration
=============
* No additional configurations needed
License
-------
Affero General Public License, Version 3 (AGPL v3).
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developers: (V15) Ammu Raj, Contacts: 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>`__

24
home_delivery_system/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 controllers
from . import models
from . import wizards

60
home_delivery_system/__manifest__.py

@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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': 'Home Delivery System',
'version': '15.0.1.0.0',
'category': 'Website,Sales',
'summary': "Home delivery system is to deliver the orders through a delivery"
"person and then the delivery person can make the payment at the"
"time of delivery.",
'description': "Home delivery system is used to deliver the orders through"
"a delivery person",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['sale_management', 'stock', 'website', 'hr', 'website_sale'],
'data': [
'security/home_delivery_system_security.xml',
'security/ir.model.access.csv',
'data/website_data.xml',
'data/mail_template_data.xml',
'views/stock_picking_views.xml',
'views/website_open_jobs_templates.xml',
'views/broadcasted_order_templates.xml',
'views/completed_order_templates.xml',
'views/delivery_option_templates.xml',
'views/delivery_templates.xml',
'views/home_delivery_system_menus.xml',
'wizards/delivery_person_reschedule_views.xml',
],
'assets': {
'web.assets_frontend': [
'home_delivery_system/static/src/js/delivery_available.js',
],
},
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': True,
}

23
home_delivery_system/controllers/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 home_delivery_system
from . import website_sale

186
home_delivery_system/controllers/home_delivery_system.py

@ -0,0 +1,186 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 http
from odoo.http import request
class WebsitePage(http.Controller):
"""Redirecting to the corresponding pages"""
@http.route('/my_jobs', type='http', auth='public', website=True)
def my_jobs(self, **kw):
"""Delivery persons jobs"""
if kw.get('order_id'):
order = request.env['stock.picking'].sudo().search(
[('sale_id', '=', int(kw.get('order_id')))])
order.write({
'is_complete': True
})
assigned_delivery_orders = request.env[
'stock.picking'].sudo().search(
[('delivery_boy_id', '!=', False),
('delivery_boy_id.user_id', '=', request.env.user.id),
('is_complete', '=', False),
('delivery_state', '!=', 'accept')])
else:
assigned_delivery_orders = request.env[
'stock.picking'].sudo().search(
[('delivery_boy_id', '!=', False),
('delivery_boy_id.user_id', '=', request.env.user.id),
('is_complete', '=', False)])
values = []
deliver_boy_jobs = {}
if not len(assigned_delivery_orders) == 0:
for rec in assigned_delivery_orders:
values.append({
'id': rec.id,
'order': rec.origin,
'customer': rec.partner_id.name,
'address': rec.partner_id.street,
'distance': rec.distance,
'price': request.env['sale.order'].sudo().search(
[('name', '=', rec.origin)]).amount_total,
})
deliver_boy_jobs['delivery'] = values
return request.render('home_delivery_system.website_my_jobs',
deliver_boy_jobs)
else:
return request.render('home_delivery_system.website_my_jobs',
deliver_boy_jobs)
@http.route('/broadcasted_order', type='http', auth='public', website=True)
def broadcasted_order(self):
"""To view broadcast orders in the website"""
broadcast_order = request.env['stock.picking'].sudo().search(
[('is_broadcast_order', '=', True)])
values = []
broadcasts_order = {}
if not len(broadcast_order) == 0:
for rec in broadcast_order:
values.append({
'id': rec.id,
'order': rec.origin,
'customer': rec.partner_id.name,
'address': rec.partner_id.street,
'distance': rec.distance,
'price': request.env['sale.order'].sudo().search(
[('name', '=', rec.origin)]).amount_total,
})
broadcasts_order['broadcast'] = values
return http.request.render(
'home_delivery_system.website_broadcast_order', broadcasts_order)
@http.route('/completed_order', type='http', auth='public', website=True)
def completed_order(self):
"""Delivery persons completed orders"""
completed_order = request.env['stock.picking'].sudo().search(
[('is_complete', '!=', False)])
values = []
completed_orders = {}
if not len(completed_order) == 0:
for rec in completed_order:
values.append({
'id': rec.id,
'order': rec.origin,
'customer': rec.partner_id.name,
'address': rec.partner_id.street,
'distance': rec.distance,
'price': request.env['sale.order'].sudo().search(
[('name', '=', rec.origin)]).amount_total,
'status': 'Paid'
})
completed_orders['completed'] = values
return http.request.render(
'home_delivery_system.website_completed_order', completed_orders)
@http.route('/delivery/option/<int:orderid>', methods=['POST', 'GET'],
type='http', auth='public', website=True)
def delivery(self, orderid):
"""The delivery person deliver the orders"""
delivery_order = request.env['stock.picking'].sudo().search(
[('id', '=', orderid)])
values = []
product = []
delivery_order_details = {}
values.append({
'id': delivery_order.sale_id.id,
'order': delivery_order.sale_id.name,
'customer': delivery_order.sale_id.partner_id.name,
'address': delivery_order.sale_id.partner_id.street,
'street': delivery_order.sale_id.partner_id.street2 or '',
'city': delivery_order.sale_id.partner_id.city or '',
'zip': delivery_order.sale_id.partner_id.zip or '',
'country': delivery_order.sale_id.partner_id.country_id.name or '',
'phone': delivery_order.sale_id.partner_id.phone,
'price': delivery_order.sale_id.amount_total,
'payment': delivery_order.payment_status,
'state': delivery_order.delivery_state,
})
for rec in delivery_order.sale_id.order_line:
product.append({
'product': rec.product_id.name,
'qty': rec.product_uom_qty,
'total': delivery_order.sale_id.amount_total
})
delivery_order_details['delivery_order'] = values
delivery_order_details['product'] = product
return http.request.render(
'home_delivery_system.website_delivery_option',
delivery_order_details)
@http.route('/delivery/issue', methods=['POST', 'GET'], type='http',
auth='public', website=True)
def issue(self, **post):
"""It returns the delivery person can post an issue,while any
issue arrived at the time of delivery"""
order = request.env['sale.order'].browse(int(post.get('id')))
order.write({
'note': post.get('message')
})
values = []
product = []
delivery_order_details = {}
values.append({
'id': order.id,
'order': order.name,
'customer': order.partner_id.name,
'address': order.partner_id.street,
'street': order.partner_id.street2 or '',
'city': order.partner_id.city or '',
'zip': order.partner_id.zip or '',
'country': order.partner_id.country_id.name or '',
'phone': order.partner_id.phone,
'price': order.amount_total,
'payment': request.env['stock.picking'].sudo().search(
[('sale_id', '=', order.id)]).payment_status,
})
for rec in order.order_line:
product.append({
'product': rec.product_id.name,
'qty': rec.product_uom_qty,
'total': order.amount_total
})
delivery_order_details['delivery_order'] = values
delivery_order_details['product'] = product
return http.request.render(
'home_delivery_system.website_delivery_option',
delivery_order_details)

83
home_delivery_system/controllers/website_sale.py

@ -0,0 +1,83 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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/>.
#
###############################################################################
import base64
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
class PaymentProcess(WebsiteSale):
"""This is used to process the payment """
@http.route('/shop/payment', type='http', auth='user', website=True,
sitemap=False)
def shop_payment(self, **post):
""" Payment step. This page proposes several payment means based on available
payment.provider"""
if post.get('order_id'):
order = request.env['sale.order'].sudo().browse(
int(post.get('order_id')))
order.write({
'website_id': request.website.id
})
request.session['sale_order_id'] = post.get('order_id')
stock_picking = request.env['stock.picking'].sudo().search(
[('sale_id', '=', int(post.get(
'order_id')))])
if order and stock_picking.is_complete:
order._force_lines_to_invoice_policy_order()
invoices = order._create_invoices()
report = request.env.ref(
'account.account_invoices').with_context(
force_report_rendering=True)._render_qweb_pdf(
invoices.id)
data_record = base64.b64encode(report[0])
ir_values = {
'name': 'Invoice Report',
'type': 'binary',
'datas': data_record,
'store_fname': data_record,
'mimetype': 'application/pdf',
'res_model': 'account.move',
}
report_attachment = request.env['ir.attachment'].sudo().create(
ir_values)
email_template = request.env.ref(
'home_delivery_system.email_template_invoiced')
if email_template:
email_template.attachment_ids = [(4, report_attachment.id)]
email_template.sudo().send_mail(stock_picking.id,
force_send=True)
email_template.attachment_ids = [(5, 0, 0)]
else:
order = request.website.sale_get_order()
redirection = self.checkout_redirection(
order) or self.checkout_check_address(order)
if redirection:
return redirection
render_values = self._get_shop_payment_values(order, **post)
render_values['only_services'] = order and order.only_services or False
if render_values['errors']:
render_values.pop('providers', '')
render_values.pop('tokens', '')
request.session['sale_last_order_id'] = order.id
return request.render("website_sale.payment", render_values)

168
home_delivery_system/data/mail_template_data.xml

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data noupdate="1">
<!--Email template for cancel information-->
<record id="email_template_cancel_delivery_order" model="mail.template">
<field name="name">Delivery Order: Cancel</field>
<field name="model_id"
ref="home_delivery_system.model_stock_picking"/>
<field name="email_from">{{ (object.company_id.email) }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="subject">{{ object.partner_id.name }} Order (Ref {{ object.name or 'n/a' }})</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.partner_id.name">
<t t-out="object.partner_id.name or ''"/>
</t>
<t t-else="">
<t t-out="object.partner_id.name or ''"/>,
</t>
<br/>
<br/>
Here is your
<t t-if="object.name">
order
<span style="font-weight:bold;"
t-out="object.name or ''"/>
</t>
<t t-else="">
Order
</t>
<t t-if="object.origin">
(with reference:<t t-out="object.origin or ''"/>)
</t>
from <t t-out="object.company_id.name or ''">
YourCompany</t>.
this order is cancelled.
<br/>
<br/>
Do not hesitate to contact us if you have any questions.
<span>Address</span>
<t t-out="object.company_id.street or ''">--
</t>
<br/>
<span>Phone</span>
<t t-out="object.company_id.phone or ''">--
</t>
<br/>
<span>Email</span>
<t t-out="object.company_id.email or ''">--
</t>
<br/>
</p>
</div>
</field>
</record>
<!-- Mail that send after Pick-->
<record id="email_template_cancel_delivery_picking"
model="mail.template">
<field name="name">Picking Order: Sending</field>
<field name="model_id"
ref="home_delivery_system.model_stock_picking"/>
<field name="email_from">{{ (object.company_id.email) }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="subject">{{ object.partner_id.name }} Invoice (Ref {{ object.name or 'n/a' }})</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.partner_id.name">
<t t-out="object.partner_id.name or ''"/>
</t>
<t t-else="">
<t t-out="object.partner_id.name or ''"/>,
</t>
<br/>
<br/>
Here is your
<t t-if="object.name">
order
<span style="font-weight:bold;"
t-out="object.name or ''"/>
</t>
<t t-else="">
Order
</t>
<t t-if="object.origin">
(with reference:<t t-out="object.origin or ''"/>)
</t>
from <t t-out="object.company_id.name or ''">
YourCompany</t>.
this order is picked.
<br/>
<br/>
<n/>
Do not hesitate to contact us if you have any questions.
<span>Address</span>
<t t-out="object.company_id.street or ''">
</t>
<br/>
<span>Phone</span>
<t t-out="object.company_id.phone or ''">
</t>
<br/>
<span>Email</span>
<t t-out="object.company_id.email or ''">
</t>
<br/>
</p>
</div>
</field>
</record>
<!-- Email that send after Payment with Invoice-->
<record id="email_template_invoiced" model="mail.template">
<field name="name">Invoice For Order: Sending</field>
<field name="model_id"
ref="home_delivery_system.model_stock_picking"/>
<field name="email_from">{{ (object.company_id.email) }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="subject">{{ object.partner_id.name }} Invoice (Ref {{ object.name or 'n/a' }})</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.partner_id.name">
<t t-out="object.partner_id.name or ''"/>
</t>
<t t-else="">
<t t-out="object.partner_id.name or ''"/>,
</t>
<br/>
<br/>
Here is your
<t t-if="object.name">
order
<span style="font-weight:bold;"
t-out="object.name or ''"/>
</t>
<t t-else="">
Order
</t>
<t t-if="object.origin">
(with reference:<t t-out="object.origin or ''"/>)
</t>
from <t t-out="object.company_id.name or ''">
YourCompany</t>.
this order is delivered.
<br/>
<br/>
Do not hesitate to contact us if you have any questions.
<span>Address</span>
<t t-out="object.company_id.street or ''">--
</t>
<br/>
<span>Phone</span>
<t t-out="object.company_id.phone or ''">--
</t>
<br/>
<span>Email</span>
<t t-out="object.company_id.email or ''">--
</t>
</p>
</div>
</field>
</record>
</data>
</odoo>

24
home_delivery_system/data/website_data.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data noupdate="1">
<!-- Website menus -->
<record id="website_menu_jobs" model="website.menu">
<field name="name">MyJobs</field>
<field name="url">/my_jobs</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence">50</field>
</record>
<record id="website_menu_broadcast" model="website.menu">
<field name="name">BroadcastOrder</field>
<field name="url">/broadcasted_order</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence">51</field>
</record>
<record id="website_menu_completed_order" model="website.menu">
<field name="name">CompletedOrder</field>
<field name="url">/completed_order</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence">52</field>
</record>
</data>
</odoo>

7
home_delivery_system/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <home_delivery_system>
#### 10.06.2024
#### Version 15.0.1.0.0
##### ADD
- Initial Commit for Home Delivery system

22
home_delivery_system/models/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 stock_picking

122
home_delivery_system/models/stock_picking.py

@ -0,0 +1,122 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 fields, models, _
from odoo import exceptions
class StockPicking(models.Model):
"""inheriting stock.picking to add additional fields"""
_inherit = 'stock.picking'
delivery_boy_id = fields.Many2one('hr.employee', string='Delivery Boy',
help="The Person who deliver the goods")
is_cancel_visibility = fields.Boolean(string='Cancel Button Visibility',
default=False,
help="Cancel button visibility field")
is_assign_visibility = fields.Boolean(string='Assign Button Visibility',
default=False,
help="Assign button visibility field")
is_broadcast_order = fields.Boolean(string='Broadcast Order',
help="Checking is it broadcast order or"
"not")
order_source = fields.Char(string='Source', default='sales',
help="The order source")
delivery_assign_date = fields.Date(string='Assign Date',
help="Delivery assigned date")
delivery_state = fields.Selection(
[('draft', 'Draft'), ('assigned', 'Assigned'),
('accept', 'Accept The Delivery'),
('picked', 'Picked'), ('reject', 'Reject The Delivery'),
('cancel', 'Canceled')], help="Different states of delivery",
string='State', readonly=True, default='draft')
payment_status = fields.Selection([('paid', 'Paid'), ('unpaid', 'Unpaid'),
], string='Payment Status',
default='unpaid',
help="The status of payment")
distance = fields.Float(string='Distance', help="The distance for deliver"
"the goods")
reschedule_reason = fields.Text(string='Reschedule Reason',
help="The reason behind reschedule.")
is_complete = fields.Boolean(default=False, string='Is Complete',
help="For updating Delivery complete status")
def reset_to_draft(self):
"""Reset to draft"""
self.delivery_state = 'draft'
self.delivery_boy_id = False
self.is_broadcast_order = False
self.order_source = False
self.delivery_assign_date = False
self.distance = False
self.payment_status = False
self.is_complete = False
def assign_delivery(self):
"""Assign delivery to the delivery person from order"""
self.is_assign_visibility = True
if len(self.delivery_boy_id):
self.delivery_state = 'assigned'
else:
raise exceptions.ValidationError(_(
"Please select a Delivery Person."
))
def reschedule_delivery_person(self):
"""Reassigning the delivery person"""
return {
'res_model': 'delivery.person.reschedule',
'type': 'ir.actions.act_window',
'view_mode': 'form',
'target': 'new',
'context': {'default_model_id': self.id}
}
def cancel_delivery(self):
"""Home delivery is cancelled and informing the customer by a mail"""
self.delivery_state = 'cancel'
self.is_cancel_visibility = True
self.env.ref(
'home_delivery_system.email_template_cancel_delivery_order').send_mail(
self.id, force_send=True)
def picking_delivery(self):
"""Changes the state while delivery is picked the person"""
self.delivery_state = 'picked'
self.env.ref(
'home_delivery_system.email_template_cancel_delivery_picking').send_mail(
self.id, force_send=True)
def delivery_available(self):
"""Writing the state of delivery orders while the delivery accept"""
assigned_delivery_orders = self.env['stock.picking'].search(
[('delivery_boy_id', '!=', False),
('delivery_boy_id.user_id', '=', self.env.user.id)])
if len(assigned_delivery_orders) > 1:
for rec in assigned_delivery_orders:
rec.write({
'delivery_state': 'accept'
})
else:
assigned_delivery_orders.write({
'delivery_state': 'accept'
})
return True

18
home_delivery_system/security/home_delivery_system_security.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- Creating security groups-->
<record id="module_category_home_delivery_system"
model="ir.module.category">
<field name="name">Delivery User Group</field>
<field name="description">User Can Manage Delivery Information
</field>
</record>
<record id="home_delivery_system_group_delivery_user"
model="res.groups">
<field name="name">Delivery User</field>
<field name="category_id"
ref="module_category_home_delivery_system"/>
</record>
</data>
</odoo>

2
home_delivery_system/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_delivery_person_reschedule,delivery.person.reschedule,model_delivery_person_reschedule,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_delivery_person_reschedule delivery.person.reschedule model_delivery_person_reschedule base.group_user 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
home_delivery_system/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
home_delivery_system/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
home_delivery_system/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
home_delivery_system/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

BIN
home_delivery_system/static/description/assets/screenshots/img.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
home_delivery_system/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
home_delivery_system/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
home_delivery_system/static/description/images/arrows-transparent.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
home_delivery_system/static/description/images/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
home_delivery_system/static/description/images/icons/ecom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
home_delivery_system/static/description/images/icons/education.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
home_delivery_system/static/description/images/icons/hotel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
home_delivery_system/static/description/images/icons/manufacturing.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
home_delivery_system/static/description/images/icons/pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
home_delivery_system/static/description/images/icons/restaurant.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
home_delivery_system/static/description/images/icons/service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
home_delivery_system/static/description/images/icons/trading.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

691
home_delivery_system/static/description/index.html

@ -0,0 +1,691 @@
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div
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: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div
style="color: #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 -->
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Home Delivery System</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
The Home Delivery System which is used to deliver the Orders through a
Delivery Person.</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif"
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/>
</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">
Home Delivery System is used to Deliver the Order .The Orders can assign
to a Delivery Person ,The Person can get
the orders through Website , the Delivery Person Deliver the order and
also the Person can process the payment at the time of delivery.
</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;">Assign Orders to Delivery Persons.</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 Person can see the orders through website.</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;">Delivery Person can Deliver the Orders and also do the Payment.</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 broadcast orders and completed orders are shown in the Website.</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;">Emails are send to Customers in different Levels of Delivery.</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;">
The Orders in the Home Delivery System
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/1.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Assign Delivery Persons
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/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;">
Add delivery User in User Settings.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/img.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
The Person can see their Assigned Jobs through Website and need to click Available.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/3.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
After Accepting the delivery need to Pick the Products.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/4.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Clicking on the required delivery leads to its form view with many options.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"></p>
<img src="assets/screenshots/5.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;">
Clicking on the Pay Now Button allows to Payment through Website.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
</p>
<img src="assets/screenshots/6.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;">
After Payment Click on the 'Deliver Products' from here.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
</p>
<img src="assets/screenshots/7.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
</p>
<img src="assets/screenshots/8.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
The completed job will be reduced from the delivery person's job.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
</p>
<img src="assets/screenshots/9.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/custom_gantt_view/"
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/15.0/access_restriction_by_ip"
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/15.0/inventory_stock_dashboard_odoo"
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/15.0/user_warehouse_restriction"
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/15.0/merge_picking_orders"
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/15.0/gatepass_slip"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/6.png"></div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="width:35px; color:#000"> <span
class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo1"
data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
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"
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 -->

20
home_delivery_system/static/src/js/delivery_available.js

@ -0,0 +1,20 @@
odoo.define('home_delivery_system.available', function(require) {
'use strict';
var publicWidget = require('web.public.widget');
var rpc = require('web.rpc');
publicWidget.registry.DeliveryWidget = publicWidget.Widget.extend({
selector: ".available",
events: {
'click .delivery_available': 'onClickAvailable',
},
//When the delivery person accepts the delivery.
onClickAvailable(ev) {
var result = rpc.query({
model: 'stock.picking',
method: 'delivery_available',
args: [, ],
});
},
});
return publicWidget.registry.DeliveryWidget;
});

56
home_delivery_system/views/broadcasted_order_templates.xml

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--The template for broadcast orders -->
<template id="website_broadcast_order" name="My Jobs">
<t t-call="website.layout">
<form style="background-color:pink;">
<h3 align="center">
Broadcast Order
</h3>
<br/>
<t t-if="broadcast">
<table class="table table-bordered mb64">
<thead>
<tr>
<th>Order No</th>
<th>Customer</th>
<th>Address</th>
<th>Distance</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<br/>
<br/>
<br/>
<tr t-foreach="broadcast" t-as="order">
<td>
<t t-esc="order['order']"/>
</td>
<td>
<t t-esc="order['customer']"/>
</td>
<td>
<t t-esc="order['address']"/>
</td>
<td>
<t t-esc="order['distance']"/>
</td>
<td>
<t t-esc="order['price']"/>
</td>
</tr>
</tbody>
</table>
</t>
<t t-else="">
<span>
<h2 align="center">
<b>There is no broadcast orders</b>
</h2>
</span>
</t>
</form>
</t>
</template>
</odoo>

59
home_delivery_system/views/completed_order_templates.xml

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Template for completed orders-->
<template id="website_completed_order" name="My Jobs">
<t t-call="website.layout">
<form>
<h3 align="center">
Completed Orders
</h3>
<t t-if="completed">
<table class="table table-bordered mb64">
<thead>
<tr>
<th>Order No</th>
<th>Customer</th>
<th>Address</th>
<th>Distance</th>
<th>Price</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<br/>
<br/>
<br/>
<tr t-foreach="completed" t-as="order">
<td>
<t t-esc="order['order']"/>
</td>
<td>
<t t-esc="order['customer']"/>
</td>
<td>
<t t-esc="order['address']"/>
</td>
<td>
<t t-esc="order['distance']"/>
</td>
<td>
<t t-esc="order['price']"/>
</td>
<td>
<t t-esc="order['status']"/>
</td>
</tr>
</tbody>
</table>
</t>
<t t-else="">
<span>
<h2 align="center">
<b>There is no completed orders</b>
</h2>
</span>
</t>
</form>
</t>
</template>
</odoo>

169
home_delivery_system/views/delivery_option_templates.xml

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--The delivery template for delivery person-->
<template id="website_delivery_option" name="My Jobs">
<t t-call="website.layout">
<form style="background-color:gainsboro;width:70%;">
<table class="table">
<t t-foreach="delivery_order" t-as="order">
<thead>
<tr style="text-align:center;">
<th>
<h3>
<b>
<t t-esc="order['order']"/>
</b>
</h3>
</th>
</tr>
<tr/>
<tr>
<th>Customer Name</th>
<th>Order Source</th>
<th>Customer Phone</th>
<th>Payment Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<t t-esc="order['customer']"/>
</td>
<td>
<span>Web</span>
</td>
<td>
<t t-esc="order['phone']"/>
</td>
<td>
<t t-esc="order['payment']"/>
</td>
</tr>
</tbody>
</t>
</table>
<br/>
<h3 align="left">
<b>Product Details</b>
</h3>
<br/>
<br/>
<table class="table">
<thead>
<tr>
<th class="col-8">Product Name</th>
<th class="col-4">Quantity</th>
</tr>
</thead>
<tbody>
<t t-foreach="product" t-as="pro">
<tr>
<td>
<t t-esc="pro['product']"/>
</td>
<td>
<t t-esc="pro['qty']"/>
</td>
</tr>
</t>
</tbody>
</table>
<br/>
<br/>
<br/>
<div class="row">
<div class="col-9">
<span>
<b>Customer Address</b>
</span>
<br/>
<t t-esc="order['customer']"/>
<br/>
<t t-esc="order['address']"/>
<br/>
<t t-esc="order['street']"/>
<br/>
<t t-esc="order['country']"/>
<br/>
<t t-esc="order['city']"/>
<br/>
<t t-esc="order['zip']"/>
</div>
<div class="col-3">
<span>
<h5>
<b>Amount Total</b>
</h5>
</span>
<t t-esc="pro['total']"/>
</div>
</div>
</form>
<div style="position: absolute;right: 430px;top: 100px;"
class="payment_process">
<t t-if="order['state'] == 'picked'">
<a t-attf-href="/shop/payment?order_id={{order['id']}}">
<input type="button" value="Pay Now"
style="width:100%;"
class="payment_submit_button"/>
</a>
</t>
<br/>
<br/>
<br/>
<input type="button" value="Issue" style="width:100%;"
data-bs-toggle="modal"
data-bs-target="#myModal"/>
<br/>
<br/>
<br/>
<a href="/my_jobs">
<input type="button" t-attf-href="/my_jobs" value="Back"
style="width:100%;"/>
</a>
<br/>
<br/>
<br/>
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Please Text Your
Issue
</h4>
</div>
<div class="modal-body">
<form action="/delivery/issue"
method="post">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"/>
<textarea name="message"
t-att-value="message"
class="form-control"
placeholder="Explain your note"/>
<input type="hidden" name="id"
t-att-value="order['id']"
class="form-control"
placeholder="Explain your note"/>
<div class="modal-footer">
<button type="button"
class="btn btn-default"
data-bs-dismiss="modal">
Cancel
</button>
<button type="submit"
class="btn btn-default">
Submit
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
</odoo>

36
home_delivery_system/views/delivery_templates.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Adding the button after the payment confirmation page-->
<template id="delivery_product" name="Delivery Product"
inherit_id="website_sale.confirmation">
<xpath expr="//div[hasclass('oe_website_sale')]" position="after">
<div>
<div>
<input type="button" value="Deliver Products"
style="width:100%;" data-toggle="modal"
data-target="#deliverModal"/>
</div>
<div id="deliverModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Deliver Order</h4>
</div>
<div class="modal-body">
<p>Your Delivery is Successfully Completed</p>
</div>
<div class="modal-footer">
<a t-attf-href="/my_jobs?order_id={{ website_sale_order.id }}">
<button type="button"
class="btn btn-default"
data-bs-dismiss="modal">Close
</button>
</a>
</div>
</div>
</div>
</div>
</div>
</xpath>
</template>
</odoo>

17
home_delivery_system/views/home_delivery_system_menus.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Menus for the module-->
<menuitem id="home_delivery_system_menu"
name="Home Delivery"
groups="home_delivery_system.home_delivery_system_group_delivery_user"
web_icon="home_delivery_system,static/description/icon.png"/>
<menuitem id="home_delivery_system_sale_orders_menu"
name="Home Delivery"
parent="home_delivery_system_menu"
sequence="1"/>
<menuitem id="home_delivery_system_orders_menu"
name="All Pickings"
parent="home_delivery_system_sale_orders_menu"
action="home_delivery_system_action"
sequence="1"/>
</odoo>

125
home_delivery_system/views/stock_picking_views.xml

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Inherited view for pickings-->
<record id="stock_picking_view_form" model="ir.ui.view">
<field name="name">stock.picking.view.form.inherit.home.delivery.system
</field>
<field name="model">stock.picking</field>
<field name="arch" type="xml">
<form>
<header>
<field name="delivery_state" widget="statusbar"/>
<button name="cancel_delivery"
attrs="{'invisible':[('is_cancel_visibility','!=',False)]}"
string="Cancel"
type="object" class="oe_highlight"
/>
<button name="reset_to_draft"
attrs="{'invisible':[('delivery_state','!=','cancel')]}"
string="Reset to Draft"
type="object" class="oe_highlight"
/>
<button name="assign_delivery"
attrs="{'invisible':[('is_assign_visibility','!=',False)]}"
string="Assign" type="object"
class="oe_highlight"/>
<button name="picking_delivery"
string="Picked" type="object"
attrs="{'invisible':[('delivery_state','!=','accept')]}"
class="oe_highlight"/>
<button name="reschedule_delivery_person"
string="Reschedule" type="object"
groups="home_delivery_system.home_delivery_system_delivery_manager"
class="oe_highlight"/>
</header>
<sheet>
<widget name="web_ribbon" title="Paid"
attrs="{'invisible': [('is_complete', '=', False)]}"/>
<h1>
<field name="origin" readonly="1" string="Order"/>
</h1>
<group>
<group>
<field name="name"/>
<field name="is_cancel_visibility" invisible="1"/>
<field name="is_assign_visibility" invisible="1"/>
<field name="delivery_boy_id" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="is_broadcast_order" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="order_source" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
</group>
<group>
<field name="delivery_assign_date" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="payment_status" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="distance" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="partner_id" string="Customer" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="company_id" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
<field name="is_complete" attrs="{'readonly': [('delivery_state', '=', 'accept')]}"/>
</group>
</group>
<notebook>
<page string="Products" name="operations">
<field name="move_ids_without_package">
<tree>
<field name="product_id" required="1" readonly="1"
context="{'default_detailed_type': 'product'}"
/>
<field name="product_uom_qty" readonly="1"/>
</tree>
</field>
</page>
<page string="Reschedule Reason"
groups="home_delivery_system.home_delivery_system_delivery_manager">
<field name="reschedule_reason">
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"
options="{'open_attachments': True}"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- Inherited tree view-->
<record id="stock_picking_view_tree" model="ir.ui.view">
<field name="name">
stock.picking.view.tree.inherit.home.delivery.system
</field>
<field name="model">stock.picking</field>
<field name="inherit_id" eval="False"/>
<field name="arch" type="xml">
<tree>
<field name="origin" readonly="1"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Action for the view-->
<record id="home_delivery_system_action" model="ir.actions.act_window">
<field name="name">Orders</field>
<field name="res_model">stock.picking</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">tree,kanban,form,calendar</field>
<field name="domain">[('sale_id','!=',False)]</field>
<field name="context">{'contact_display': 'partner_address',
'create':False, 'default_company_id': allowed_company_ids[0]}
</field>
<field name="view_ids"
eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('home_delivery_system.stock_picking_view_tree')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('home_delivery_system.stock_picking_view_form')})]"/>
<field name="search_view_id" ref="stock.view_picking_internal_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No orders were found. Let's create one!
</p>
<p>
Transfers allow you to move products from one location to
another.
</p>
</field>
</record>
</odoo>

63
home_delivery_system/views/website_open_jobs_templates.xml

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- delivery persons job template-->
<template id="website_my_jobs" name="My Jobs">
<t t-call="website.layout">
<div class="test">
<form>
<h3 align="center" style="padding: 10px;">
My Jobs
</h3>
<t t-if="delivery">
<div align="right" class="available">
<input type="button" value="Available"
style="width:15%;"
class="delivery_available"/>
</div>
<table class="table table-bordered mb64">
<thead>
<tr>
<th>Order No</th>
<th>Customer</th>
<th>Address</th>
<th>Distance</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<br/>
<br/>
<tr t-foreach="delivery" t-as="order">
<td>
<a t-attf-href="/delivery/option/#{order['id']}">
<t t-esc="order['order']"/>
</a>
</td>
<td>
<t t-esc="order['customer']"/>
</td>
<td>
<t t-esc="order['address']"/>
</td>
<td>
<t t-esc="order['distance']"/>
</td>
<td>
<t t-esc="order['price']"/>
</td>
</tr>
</tbody>
</table>
</t>
<t t-else="">
<span>
<h2 align="center">
<b>There is no jobs</b>
</h2>
</span>
</t>
</form>
</div>
</t>
</template>
</odoo>

22
home_delivery_system/wizards/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 delivery_person_reschedule

43
home_delivery_system/wizards/delivery_person_reschedule.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-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 fields, models
class DeliveryPersonReschedule(models.TransientModel):
"""Reassigning delivery person"""
_name = 'delivery.person.reschedule'
_description = 'Reschedule delivery person'
delivery_boy_id = fields.Many2one('hr.employee', string='Delivery Boy',
help="The person who deliver the goods",
required=True)
reschedule_reason = fields.Text(string='Reschedule Reason',
help="Reason for re-assigning the person",
required=True)
def reschedule_action(self):
"""Reassigning the delivery person to the order"""
self.env['stock.picking'].browse(
self.env.context.get('params')['id']).write({
'delivery_boy_id': self.delivery_boy_id,
'reschedule_reason': self.reschedule_reason
})

31
home_delivery_system/wizards/delivery_person_reschedule_views.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Xml for rescheduling the delivery person -->
<record id="delivery_person_reschedule_action" model="ir.actions.act_window">
<field name="name">Delivery Person Reschedule</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">delivery.person.reschedule</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="delivery_person_reschedule_view_form" model="ir.ui.view">
<field name="name">delivery.person.reschedule.view.form</field>
<field name="model">delivery.person.reschedule</field>
<field name="arch" type="xml">
<form string="wizard">
<group>
<group>
<field name="delivery_boy_id"/>
<field name="reschedule_reason"/>
</group>
</group>
<footer>
<button name="reschedule_action" class="btn-primary"
string="Reschedule" type="object"/>
<button class="btn-secondary"
string="Cancel" special="cancel"/>
</footer>
</form>
</field>
</record>
</odoo>
Loading…
Cancel
Save