diff --git a/pos_book_order/README.rst b/pos_book_order/README.rst
new file mode 100644
index 000000000..6f03208de
--- /dev/null
+++ b/pos_book_order/README.rst
@@ -0,0 +1,48 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+POS Booking Order
+=================
+The module helps you to book orders from Shop,Bar/Restaurant in POS.User can create pickup or delivery orders,later confirm booked orders to POS orders
+
+Configuration
+=============
+No additional configuration required
+
+Company
+-------
+* `Cybrosys Techno Solutions `__
+
+License
+-------
+GNU Affero General Public License v3.0 (AGPL v3)
+(http://www.gnu.org/licenses/agpl-3.0-standalone.html)
+
+Credits
+-------
+Developer: (v16) Raneesha M K @cybrosys
+ (v12) Varsha Vivek @cybrosys
+
+Contacts
+--------
+* Mail Contact : odoo@cybrosys.com
+* Website : https://cybrosys.com
+
+Bug Tracker
+-----------
+Bugs are tracked on GitHub Issues. In case of trouble, please check there if
+your issue has already been reported.
+
+Maintainer
+==========
+.. image:: https://cybrosys.com/images/logo.png
+ :target: https://cybrosys.com
+
+This module is maintained by Cybrosys Technologies.
+
+For support and more information, please visit `Our Website `__
+
+Further information
+===================
+HTML Description: ``__
\ No newline at end of file
diff --git a/pos_book_order/__init__.py b/pos_book_order/__init__.py
new file mode 100644
index 000000000..084f44af0
--- /dev/null
+++ b/pos_book_order/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+from . import models
diff --git a/pos_book_order/__manifest__.py b/pos_book_order/__manifest__.py
new file mode 100644
index 000000000..da407fafe
--- /dev/null
+++ b/pos_book_order/__manifest__.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+{
+ 'name': 'POS Booking Order',
+ 'version': '16.0.1.0.0',
+ 'summary': """From a POS session, users can create pickup or
+ delivery orders, which they can then confirm as POS orders.""",
+ 'description': """The module helps you to book orders from Shop,
+ Bar/Restaurant in POS.User can create pickup or delivery
+ orders,later confirm booked orders to POS orders.""",
+ 'category': 'Point of Sale',
+ 'author': 'Cybrosys Techno Solutions',
+ 'company': 'Cybrosys Techno Solutions',
+ 'maintainer': 'Cybrosys Techno Solutions',
+ 'website': "https://www.cybrosys.com",
+ 'depends': ['base', 'point_of_sale'],
+ 'images': ['static/description/banner.png'],
+ 'data': ['security/ir.model.access.csv',
+ 'data/ir_sequence_data.xml',
+ 'views/pos_config_views.xml',
+ 'views/book_order_views.xml',
+ 'views/pos_order_views.xml'
+ ],
+ 'assets': {
+ 'point_of_sale.assets': [
+ '/pos_book_order/static/src/xml/Buttons.xml',
+ '/pos_book_order/static/src/xml/BookOrderPopup.xml',
+ '/pos_book_order/static/src/xml/BookedOrdersScreen.xml',
+ '/pos_book_order/static/src/xml/OrderReceipt.xml',
+ '/pos_book_order/static/src/js/BookOrderPopup.js',
+ '/pos_book_order/static/src/js/BookOrderButton.js',
+ '/pos_book_order/static/src/js/BookedOrdersButton.js',
+ '/pos_book_order/static/src/js/BookedOrdersScreen.js',
+ '/pos_book_order/static/src/js/models.js',
+ ],
+ },
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'application': False,
+ 'auto_install': False,
+}
diff --git a/pos_book_order/data/ir_sequence_data.xml b/pos_book_order/data/ir_sequence_data.xml
new file mode 100644
index 000000000..4b2d2165b
--- /dev/null
+++ b/pos_book_order/data/ir_sequence_data.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ Book Order
+ book.order
+ POS/BO/
+ 4
+
+
+
\ No newline at end of file
diff --git a/pos_book_order/doc/RELEASE_NOTES.md b/pos_book_order/doc/RELEASE_NOTES.md
new file mode 100644
index 000000000..b2d8f3abf
--- /dev/null
+++ b/pos_book_order/doc/RELEASE_NOTES.md
@@ -0,0 +1,6 @@
+## Module
+
+#### 23.06.2023
+#### Version 16.0.1.0.0
+##### ADD
+- Initial Commit for POS Booking Order
diff --git a/pos_book_order/models/__init__.py b/pos_book_order/models/__init__.py
new file mode 100644
index 000000000..8863e93f7
--- /dev/null
+++ b/pos_book_order/models/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+from . import book_order
+from . import book_order_line
+from . import pos_config
+from . import pos_order
diff --git a/pos_book_order/models/book_order.py b/pos_book_order/models/book_order.py
new file mode 100644
index 000000000..0ce37c087
--- /dev/null
+++ b/pos_book_order/models/book_order.py
@@ -0,0 +1,185 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (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 .
+#
+###############################################################################
+import datetime
+from odoo import api, fields, models
+from odoo.fields import Command
+
+
+class BookOrder(models.Model):
+ """
+ Model for managing booked orders in the POS system.
+ """
+ _name = 'book.order'
+ _description = "Point of Sale Booked Orders"
+
+ @api.model
+ def _amount_line_tax(self, line, fiscal_position_id):
+ """ Calculates the tax amount of the order line.
+ :param line: Order line record
+ :param fiscal_position_id: Fiscal position account for order
+ :return float: Total tax amount as float
+ """
+ taxes = line.tax_ids.filtered(
+ lambda t: t.company_id.id == line.order_id.company_id.id)
+ taxes = fiscal_position_id.map_tax(taxes)
+ price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
+ taxes = taxes.compute_all(price,
+ line.order_id.pricelist_id.currency_id,
+ line.qty, product=line.product_id,
+ partner=line.order_id.partner_id or False)[
+ 'taxes']
+ return sum(tax.get('amount', 0.0) for tax in taxes)
+
+ name = fields.Char(string='Booking Ref', readonly=True,
+ help="Name of the booked order",
+ copy=False, default='/')
+ company_id = fields.Many2one('res.company', string='Company',
+ help="Company of the booked order",
+ default=lambda self: self.env.user.company_id)
+ date_quotation = fields.Datetime(string='Quotation Date',
+ help="Quotation created date",
+ readonly=True, index=True,
+ default=fields.Datetime.now)
+ date_order = fields.Date(string='Order Date', help="Order created date",
+ readonly=True, index=True,
+ default=fields.Date.today())
+ amount_tax = fields.Float(compute='_compute_amount_all', string='Taxes',
+ help="Tax amount for the order",
+ digits=0, default=1.2)
+ amount_total = fields.Float(compute='_compute_amount_all', string='Total',
+ help="Total amount of the order",
+ digits=0)
+ book_line_ids = fields.One2many('book.order.line', 'order_id',
+ help="Order Line of book orders",
+ string='Order Lines',
+ copy=True)
+ partner_id = fields.Many2one('res.partner', string='Customer',
+ help="Partner of the order",
+ change_default=True, index=True)
+ state = fields.Selection([('draft', 'New'), ('confirmed', 'Confirmed')],
+ 'Status', readonly=True, copy=False,
+ help="Current status of the order",
+ default='draft')
+ note = fields.Text(string='Internal Notes',
+ help="Enter any notes regarding order")
+ fiscal_position_id = fields.Many2one('account.fiscal.position',
+ help="Fiscal position account "
+ "for order",
+ string='Fiscal Position')
+ pickup_date = fields.Datetime(string='Pickup Date', readonly=True,
+ help="Picking date of the order")
+ deliver_date = fields.Datetime(string='Deliver Date', readonly=True,
+ help="Delivering date of the order")
+ phone = fields.Char('Contact no', help='Phone of customer for delivery')
+ delivery_address = fields.Char('Delivery Address',
+ help='Address of customer for delivery')
+ pricelist_id = fields.Many2one('product.pricelist', string='Pricelist',
+ help="Pricelist of the order")
+
+ @api.depends('book_line_ids.price_subtotal_incl', 'book_line_ids.discount')
+ def _compute_amount_all(self):
+ """ To compute total amount with tax and without tax """
+ for order in self:
+ order.amount_tax = 0.0
+ currency = order.pricelist_id.currency_id
+ order.amount_tax = currency.round(
+ sum(self._amount_line_tax(line, order.fiscal_position_id) for
+ line in order.book_line_ids))
+ amount_untaxed = currency.round(
+ sum(line.price_subtotal for line in order.book_line_ids))
+ order.amount_total = order.amount_tax + amount_untaxed
+
+ @api.model
+ def create(self, vals):
+ """ Inherited create function to generate sequence number
+ for booker orders
+ :return record: created record
+ """
+ if vals.get('name', '/') == '/':
+ vals['name'] = self.env['ir.sequence'].next_by_code(
+ 'book.order') or '/'
+ return super(BookOrder, self).create(vals)
+
+ @api.model
+ def create_booked_order(self, partner, phone, address, date, price_list,
+ product, note, pickup, delivery):
+ """ It creates a booked order based on the value in the booking popup
+ in PoS ui.
+ partner(int): id of partner
+ phone(string): contact number of customer
+ address(string): contact address of the customer
+ date(date): ordered date
+ price_list(int): price list id of order
+ product(dict): dictionary values with product ids and quantity
+ note(string): Order note
+ pickup(date): pickup date of the booked order
+ delivery(date): delivery date of the booked order
+ """
+ book_date = (datetime.datetime.fromisoformat(date[:-1])).strftime(
+ '%Y-%m-%d %H:%M:%S')
+ order = self.create({
+ 'partner_id': partner,
+ 'phone': phone,
+ 'delivery_address': address,
+ 'pricelist_id': price_list,
+ 'date_quotation': book_date,
+ 'book_line_ids': [Command.create({
+ 'product_id': product['product_id'][i],
+ 'qty': product['qty'][i],
+ 'price_unit':product['price'][i],
+ }) for i in range(len(product['product_id']))],
+ 'note': note,
+ })
+ if pickup:
+ order.write({'pickup_date': pickup + ' 00:00:00'})
+ if delivery:
+ order.write({'deliver_date': delivery + ' 00:00:00'})
+
+ @api.model
+ def all_orders(self):
+ """ To fetch all draft stage orders to PoS Booked orders screen
+ :return dict: A list of dictionaries containing information
+ about each order
+ """
+ values = []
+ for rec in self.search([('state', '=', 'draft')]):
+ products = []
+ for line in rec.book_line_ids:
+ products.append({
+ 'id': line.product_id.id,
+ 'qty': line.qty,
+ 'price':line.price_unit
+ })
+ values.append({'id': rec.id,
+ 'name': rec.name,
+ 'partner_id': rec.partner_id.id,
+ 'partner_name': rec.partner_id.name,
+ 'address': rec.delivery_address,
+ 'note': rec.note,
+ 'phone': rec.phone,
+ 'date': rec.date_quotation,
+ 'pickup': rec.pickup_date,
+ 'deliver': rec.deliver_date,
+ 'products': products,
+ 'total': rec.amount_total
+ })
+ return values
diff --git a/pos_book_order/models/book_order_line.py b/pos_book_order/models/book_order_line.py
new file mode 100644
index 000000000..060f66ed5
--- /dev/null
+++ b/pos_book_order/models/book_order_line.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+from odoo import api, fields, models
+
+
+class BookOrderLine(models.Model):
+ """ For managing order lines of booked order """
+ _name = "book.order.line"
+ _description = "Lines of Point of Sale Booked Order"
+ _rec_name = "product_id"
+
+ company_id = fields.Many2one('res.company', string='Company',
+ help="Company of the booked order",
+ default=lambda self: self.env.user.company_id)
+ product_id = fields.Many2one('product.product',
+ help="Select products for ordering",
+ string='Product',
+ domain=[('sale_ok', '=', True)],
+ required=True, change_default=True)
+ price_unit = fields.Float(string='Unit Price',
+ help="Unite price of selected product", digits=0)
+ qty = fields.Float('Quantity', default=1,
+ help="Enter how much quantity of product want ")
+ price_subtotal = fields.Float(compute='_compute_amount_line_all',
+ digits=0,
+ help="Sub total amount of each orderline"
+ "without tax",
+ string='Subtotal w/o Tax')
+ price_subtotal_incl = fields.Float(compute='_compute_amount_line_all',
+ digits=0,
+ help="Sub total amount of each orderline"
+ "with tax",
+ string='Subtotal')
+ discount = fields.Float(string='Discount (%)', digits=0, default=0.0,
+ help="You can apply discount for each product")
+ order_id = fields.Many2one('book.order', string='Order Ref',
+ help="Relation to book order field",
+ ondelete='cascade')
+ tax_ids = fields.Many2many('account.tax', string='Taxes', readonly=True,
+ help="Taxes for each line")
+ tax_after_fiscal_position_ids = fields.Many2many('account.tax',
+ 'account_tax_rel', 'uid',
+ 'tag_id', string='Taxes',
+ help="Fiscal position "
+ "after entering the "
+ "tax")
+
+ @api.depends('price_unit', 'tax_ids', 'qty', 'discount', 'product_id')
+ def _compute_amount_line_all(self):
+ """ To compute tax included and excluded subtotal in each line"""
+ for line in self:
+ currency = line.order_id.pricelist_id.currency_id
+ taxes = line.tax_ids.filtered(
+ lambda tax: tax.company_id.id == line.order_id.company_id.id)
+ fiscal_position_id = line.order_id.fiscal_position_id
+ if fiscal_position_id:
+ taxes = fiscal_position_id.map_tax(taxes, line.product_id,
+ line.order_id.partner_id)
+ price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
+ line.price_subtotal = line.price_subtotal_incl = price * line.qty
+ if taxes:
+ taxes = taxes.compute_all(price, currency, line.qty,
+ product=line.product_id,
+ partner=line.order_id.partner_i or False)
+ line.price_subtotal = taxes['total_excluded']
+ line.price_subtotal_incl = taxes['total_included']
+
+ line.price_subtotal = currency.round(line.price_subtotal)
+ line.price_subtotal_incl = currency.round(line.price_subtotal_incl)
diff --git a/pos_book_order/models/pos_config.py b/pos_book_order/models/pos_config.py
new file mode 100644
index 000000000..18c9b7d3d
--- /dev/null
+++ b/pos_book_order/models/pos_config.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+from odoo import fields, models
+
+
+class PosConfig(models.Model):
+ """POS configuration settings"""
+ _inherit = 'pos.config'
+
+ enable = fields.Boolean("Enable Book Orders",
+ help="Enable if you want to book order from pos")
diff --git a/pos_book_order/models/pos_order.py b/pos_book_order/models/pos_order.py
new file mode 100644
index 000000000..703ab6fac
--- /dev/null
+++ b/pos_book_order/models/pos_order.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Raneesha M K (odoo@cybrosys.com)
+#
+# You can modify it under the terms of the GNU AFFERO
+# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
+#
+# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
+# (AGPL v3) along with this program.
+# If not, see .
+#
+###############################################################################
+from odoo import api, fields, models
+
+
+class PosOrder(models.Model):
+ """Inherited model for pos order,all confirmed booking orders are converted
+ as pos orders"""
+ _inherit = 'pos.order'
+
+ booking_ref_id = fields.Many2one('book.order', string='Booking Ref',
+ help="Booked order reference for the pos "
+ "order")
+
+ @api.model
+ def _order_fields(self, ui_order):
+ """Overriding to pass value of booked order ref to PoS order
+ ui_order(dict): dictionary of pos order field values
+ dict: returns dictionary of pos order field values
+ """
+ order_fields = super(PosOrder, self)._order_fields(ui_order)
+ if ui_order['is_booked']:
+ order_fields['booking_ref_id'] = ui_order['booked_data']['id']
+ self.env['book.order'].browse(ui_order['booked_data']['id']).write(
+ {'state': 'confirmed'})
+ return order_fields
diff --git a/pos_book_order/security/ir.model.access.csv b/pos_book_order/security/ir.model.access.csv
new file mode 100644
index 000000000..aff419253
--- /dev/null
+++ b/pos_book_order/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_book_order,access.book.order,model_book_order,point_of_sale.group_pos_user,1,1,1,1
+access_book_order_line,access.book.order.line,model_book_order_line,point_of_sale.group_pos_user,1,1,1,1
diff --git a/pos_book_order/static/description/assets/icons/check.png b/pos_book_order/static/description/assets/icons/check.png
new file mode 100644
index 000000000..c8e85f51d
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/check.png differ
diff --git a/pos_book_order/static/description/assets/icons/chevron.png b/pos_book_order/static/description/assets/icons/chevron.png
new file mode 100644
index 000000000..2089293d6
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/chevron.png differ
diff --git a/pos_book_order/static/description/assets/icons/cogs.png b/pos_book_order/static/description/assets/icons/cogs.png
new file mode 100644
index 000000000..95d0bad62
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/cogs.png differ
diff --git a/pos_book_order/static/description/assets/icons/consultation.png b/pos_book_order/static/description/assets/icons/consultation.png
new file mode 100644
index 000000000..8319d4baa
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/consultation.png differ
diff --git a/pos_book_order/static/description/assets/icons/ecom-black.png b/pos_book_order/static/description/assets/icons/ecom-black.png
new file mode 100644
index 000000000..a9385ff13
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/ecom-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/education-black.png b/pos_book_order/static/description/assets/icons/education-black.png
new file mode 100644
index 000000000..3eb09b27b
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/education-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/hotel-black.png b/pos_book_order/static/description/assets/icons/hotel-black.png
new file mode 100644
index 000000000..130f613be
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/hotel-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/license.png b/pos_book_order/static/description/assets/icons/license.png
new file mode 100644
index 000000000..a5869797e
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/license.png differ
diff --git a/pos_book_order/static/description/assets/icons/lifebuoy.png b/pos_book_order/static/description/assets/icons/lifebuoy.png
new file mode 100644
index 000000000..658d56ccc
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/lifebuoy.png differ
diff --git a/pos_book_order/static/description/assets/icons/manufacturing-black.png b/pos_book_order/static/description/assets/icons/manufacturing-black.png
new file mode 100644
index 000000000..697eb0e9f
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/manufacturing-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/pos-black.png b/pos_book_order/static/description/assets/icons/pos-black.png
new file mode 100644
index 000000000..97c0f90c1
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/pos-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/puzzle.png b/pos_book_order/static/description/assets/icons/puzzle.png
new file mode 100644
index 000000000..65cf854e7
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/puzzle.png differ
diff --git a/pos_book_order/static/description/assets/icons/restaurant-black.png b/pos_book_order/static/description/assets/icons/restaurant-black.png
new file mode 100644
index 000000000..4a35eb939
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/restaurant-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/service-black.png b/pos_book_order/static/description/assets/icons/service-black.png
new file mode 100644
index 000000000..301ab51cb
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/service-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/trading-black.png b/pos_book_order/static/description/assets/icons/trading-black.png
new file mode 100644
index 000000000..9398ba2f1
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/trading-black.png differ
diff --git a/pos_book_order/static/description/assets/icons/training.png b/pos_book_order/static/description/assets/icons/training.png
new file mode 100644
index 000000000..884ca024d
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/training.png differ
diff --git a/pos_book_order/static/description/assets/icons/update.png b/pos_book_order/static/description/assets/icons/update.png
new file mode 100644
index 000000000..ecbc5a01a
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/update.png differ
diff --git a/pos_book_order/static/description/assets/icons/user.png b/pos_book_order/static/description/assets/icons/user.png
new file mode 100644
index 000000000..6ffb23d9f
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/user.png differ
diff --git a/pos_book_order/static/description/assets/icons/wrench.png b/pos_book_order/static/description/assets/icons/wrench.png
new file mode 100644
index 000000000..6c04dea0f
Binary files /dev/null and b/pos_book_order/static/description/assets/icons/wrench.png differ
diff --git a/pos_book_order/static/description/assets/misc/categories.png b/pos_book_order/static/description/assets/misc/categories.png
new file mode 100644
index 000000000..bedf1e0b1
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/categories.png differ
diff --git a/pos_book_order/static/description/assets/misc/check-box.png b/pos_book_order/static/description/assets/misc/check-box.png
new file mode 100644
index 000000000..42caf24b9
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/check-box.png differ
diff --git a/pos_book_order/static/description/assets/misc/compass.png b/pos_book_order/static/description/assets/misc/compass.png
new file mode 100644
index 000000000..d5fed8faa
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/compass.png differ
diff --git a/pos_book_order/static/description/assets/misc/corporate.png b/pos_book_order/static/description/assets/misc/corporate.png
new file mode 100644
index 000000000..2eb13edbf
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/corporate.png differ
diff --git a/pos_book_order/static/description/assets/misc/customer-support.png b/pos_book_order/static/description/assets/misc/customer-support.png
new file mode 100644
index 000000000..79efc72ed
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/customer-support.png differ
diff --git a/pos_book_order/static/description/assets/misc/cybrosys-logo.png b/pos_book_order/static/description/assets/misc/cybrosys-logo.png
new file mode 100644
index 000000000..cc3cc0ccf
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/cybrosys-logo.png differ
diff --git a/pos_book_order/static/description/assets/misc/features.png b/pos_book_order/static/description/assets/misc/features.png
new file mode 100644
index 000000000..b41769f77
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/features.png differ
diff --git a/pos_book_order/static/description/assets/misc/logo.png b/pos_book_order/static/description/assets/misc/logo.png
new file mode 100644
index 000000000..478462d3e
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/logo.png differ
diff --git a/pos_book_order/static/description/assets/misc/pictures.png b/pos_book_order/static/description/assets/misc/pictures.png
new file mode 100644
index 000000000..56d255fe9
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/pictures.png differ
diff --git a/pos_book_order/static/description/assets/misc/pie-chart.png b/pos_book_order/static/description/assets/misc/pie-chart.png
new file mode 100644
index 000000000..426e05244
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/pie-chart.png differ
diff --git a/pos_book_order/static/description/assets/misc/right-arrow.png b/pos_book_order/static/description/assets/misc/right-arrow.png
new file mode 100644
index 000000000..730984a06
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/right-arrow.png differ
diff --git a/pos_book_order/static/description/assets/misc/star.png b/pos_book_order/static/description/assets/misc/star.png
new file mode 100644
index 000000000..2eb9ab29f
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/star.png differ
diff --git a/pos_book_order/static/description/assets/misc/support.png b/pos_book_order/static/description/assets/misc/support.png
new file mode 100644
index 000000000..4f18b8b82
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/support.png differ
diff --git a/pos_book_order/static/description/assets/misc/whatsapp.png b/pos_book_order/static/description/assets/misc/whatsapp.png
new file mode 100644
index 000000000..d513a5356
Binary files /dev/null and b/pos_book_order/static/description/assets/misc/whatsapp.png differ
diff --git a/pos_book_order/static/description/assets/modules/m1.png b/pos_book_order/static/description/assets/modules/m1.png
new file mode 100644
index 000000000..5ecc4d883
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m1.png differ
diff --git a/pos_book_order/static/description/assets/modules/m2.png b/pos_book_order/static/description/assets/modules/m2.png
new file mode 100644
index 000000000..89ff6c635
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m2.png differ
diff --git a/pos_book_order/static/description/assets/modules/m3.png b/pos_book_order/static/description/assets/modules/m3.png
new file mode 100644
index 000000000..fd1f87699
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m3.png differ
diff --git a/pos_book_order/static/description/assets/modules/m4.png b/pos_book_order/static/description/assets/modules/m4.png
new file mode 100644
index 000000000..5514bb8d4
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m4.png differ
diff --git a/pos_book_order/static/description/assets/modules/m5.png b/pos_book_order/static/description/assets/modules/m5.png
new file mode 100644
index 000000000..38ea1f663
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m5.png differ
diff --git a/pos_book_order/static/description/assets/modules/m6.png b/pos_book_order/static/description/assets/modules/m6.png
new file mode 100644
index 000000000..f52b99646
Binary files /dev/null and b/pos_book_order/static/description/assets/modules/m6.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot1.png b/pos_book_order/static/description/assets/screenshots/Screenshot1.png
new file mode 100644
index 000000000..6322698b6
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot1.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot10.png b/pos_book_order/static/description/assets/screenshots/Screenshot10.png
new file mode 100644
index 000000000..aaa78c871
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot10.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot2.png b/pos_book_order/static/description/assets/screenshots/Screenshot2.png
new file mode 100644
index 000000000..4bd8868ec
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot2.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot3.png b/pos_book_order/static/description/assets/screenshots/Screenshot3.png
new file mode 100644
index 000000000..19082282b
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot3.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot4.png b/pos_book_order/static/description/assets/screenshots/Screenshot4.png
new file mode 100644
index 000000000..4ae11265f
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot4.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot5.png b/pos_book_order/static/description/assets/screenshots/Screenshot5.png
new file mode 100644
index 000000000..7ceebe38d
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot5.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot6.png b/pos_book_order/static/description/assets/screenshots/Screenshot6.png
new file mode 100644
index 000000000..673b22451
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot6.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot7.png b/pos_book_order/static/description/assets/screenshots/Screenshot7.png
new file mode 100644
index 000000000..fb975a85c
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot7.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot8.png b/pos_book_order/static/description/assets/screenshots/Screenshot8.png
new file mode 100644
index 000000000..eef2f5a54
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot8.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/Screenshot9.png b/pos_book_order/static/description/assets/screenshots/Screenshot9.png
new file mode 100644
index 000000000..66fa9925e
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/Screenshot9.png differ
diff --git a/pos_book_order/static/description/assets/screenshots/hero.gif b/pos_book_order/static/description/assets/screenshots/hero.gif
new file mode 100644
index 000000000..573ba4872
Binary files /dev/null and b/pos_book_order/static/description/assets/screenshots/hero.gif differ
diff --git a/pos_book_order/static/description/banner.jpg b/pos_book_order/static/description/banner.jpg
new file mode 100644
index 000000000..d79685570
Binary files /dev/null and b/pos_book_order/static/description/banner.jpg differ
diff --git a/pos_book_order/static/description/cybro_logo.png b/pos_book_order/static/description/cybro_logo.png
new file mode 100644
index 000000000..bb309114c
Binary files /dev/null and b/pos_book_order/static/description/cybro_logo.png differ
diff --git a/pos_book_order/static/description/icon.png b/pos_book_order/static/description/icon.png
new file mode 100644
index 000000000..d2fb84b18
Binary files /dev/null and b/pos_book_order/static/description/icon.png differ
diff --git a/pos_book_order/static/description/index.html b/pos_book_order/static/description/index.html
new file mode 100644
index 000000000..6606009d3
--- /dev/null
+++ b/pos_book_order/static/description/index.html
@@ -0,0 +1,707 @@
+
+ The module facilitates seamless booking of orders from shops, bars, and
+ restaurants in the Point of Sale (POS) system. Users have the
+ flexibility to create pickup or delivery orders, and subsequently
+ confirm the booked orders into POS orders.
+
+
+
+
+
+
+
+
+
+
+ Features
+
+
+
+
+
+
+ POS booking orders for both Odoo 16 community and enterprise editions.
+
+
+
+ Booking orders from Shop,Bar/Restaurant in POS.
+
+
+
+ Available both pickup and delivery options.
+
+
+
+ Shows booked order details in order receipt and order.
+
+
+
+
+
+
+
+
+
+
+
+ Screenshots
+
+
+
+
+
+
+
+ Enable Booking Orders
+ from the POS settings
+
+ Go to PoS Settings ->
+ Enable Booking orders. After enabling this, the options to book
+ orders and screen of booked orders will show in POS
+ session.
+
+
+
+
+
+ Booking Order button and Booked orders Screen
+
+ While clicking the booking order button it will open a
+ popup,that will book the order.
+
+
+
+
+
+ Booking Order Popup
+
+ We have two options for the booking order are picking or
+ delivery.Upon selecting the pickup option,
+ it shows a field to enter pickup date.
+
+
+
+
+
+ Fields to enter delivery date & address
+
+ When selected deliver option, it displays two fields to
+ enter delivery date and delivery address.
+
+
+
+
+
+ Booked Orders Screen
+
+ Not confirmed booked orders are can see here.
+
+
+
+
+ Can view order lines & customer assigned with order details
+ on confirming POS order
+
+
+
+
+ Order Receipt for pickup orders
+
+ In the case of picking order, the order receipt will be
+ shown as below.
+
+
+
+
+ Order Receipt for delivery orders
+
+ In the case of delivery order, the order receipt will be
+ shown as below. Delivery date and address are specified
+
+
+
+
+ The Backend view of the booked orders
+
+ Confirmed or paid booked orders are highlighted.
+
\ No newline at end of file
diff --git a/pos_book_order/static/src/js/BookOrderButton.js b/pos_book_order/static/src/js/BookOrderButton.js
new file mode 100644
index 000000000..9294b2f0e
--- /dev/null
+++ b/pos_book_order/static/src/js/BookOrderButton.js
@@ -0,0 +1,36 @@
+/** @odoo-module **/
+/*
+ * This file is used to register the a new button for booking orders with selected partner and products.
+ */
+import PosComponent from 'point_of_sale.PosComponent';
+import Registries from 'point_of_sale.Registries';
+import ProductScreen from 'point_of_sale.ProductScreen';
+
+class BookOrderButton extends PosComponent {
+ onClick() {
+ // by clicking the booking order button, it will check whether at least one product and the selected customer or not, after that it will display popup.
+ var order_lines = this.env.pos.get_order().orderlines;
+ var partner = this.env.pos.get_order().get_partner()
+ if (partner == null) {
+ this.showPopup('ErrorPopup', {
+ 'title': "Please Select the Customer",
+ 'body': "You need to select a customer for using this option",
+ });
+ } else if (order_lines.length == 0) {
+ this.showPopup('ErrorPopup', {
+ 'title': "Order line is empty",
+ 'body': "Please select at least one product",
+ });
+ } else {
+ this.showPopup('BookOrderPopup', {
+ partner: partner,
+ });
+ }
+ }
+}
+BookOrderButton.template = 'BookOrderButton';
+ProductScreen.addControlButton({
+ component: BookOrderButton,
+ condition: () => true,
+});
+Registries.Component.add(BookOrderButton);
\ No newline at end of file
diff --git a/pos_book_order/static/src/js/BookOrderPopup.js b/pos_book_order/static/src/js/BookOrderPopup.js
new file mode 100644
index 000000000..969456563
--- /dev/null
+++ b/pos_book_order/static/src/js/BookOrderPopup.js
@@ -0,0 +1,45 @@
+/** @odoo-module **/
+/*
+ * This file is used to register the a new popup to book pickup and deliver orders.
+ */
+import AbstractAwaitablePopup from 'point_of_sale.AbstractAwaitablePopup';
+import Registries from 'point_of_sale.Registries';
+const rpc = require('web.rpc');
+
+class BookOrderPopup extends AbstractAwaitablePopup {
+ setup() {
+ super.setup()
+ this.order = this.env.pos.selectedOrder
+ }
+ async onConfirm() {
+ // on clicking confirm button of popup a new book order with draft stage will created from the backend
+ var pickup_date = this.el.querySelector('#pickup_date').value;
+ var delivery_date = this.el.querySelector('#deliver_date').value;
+ var order_note = this.el.querySelector('.order_note').value;
+ var partner = this.order.partner.id;
+ var address = this.el.querySelector('#delivery_address').value;
+ var phone = this.el.querySelector('#phone').value;
+ var date = this.order.creation_date;
+ var line = this.order.orderlines;
+ var price_list = this.order.pricelist.id;
+ var product = {
+ 'product_id': [],
+ 'qty': [],
+ 'price':[]
+ };
+ for (var i = 0; i < line.length; i++) {
+ product['product_id'].push(line[i].product.id)
+ product['qty'].push(line[i].quantity)
+ product['price'].push(line[i].price)
+ };
+ await rpc.query({
+ // this call for is creating a book order in the backend based on the value in popup
+ model: 'book.order',
+ method: 'create_booked_order',
+ args: [partner, phone, address, date, price_list, product, order_note, pickup_date, delivery_date]
+ })
+ this.cancel();
+ }
+}
+BookOrderPopup.template = 'BookOrderPopup';
+Registries.Component.add(BookOrderPopup);
\ No newline at end of file
diff --git a/pos_book_order/static/src/js/BookedOrdersButton.js b/pos_book_order/static/src/js/BookedOrdersButton.js
new file mode 100644
index 000000000..9243f3c42
--- /dev/null
+++ b/pos_book_order/static/src/js/BookedOrdersButton.js
@@ -0,0 +1,29 @@
+/** @odoo-module **/
+/*
+ * This file is used to register the a new button to see booked orders data.
+ */
+import PosComponent from 'point_of_sale.PosComponent';
+import Registries from 'point_of_sale.Registries';
+import ProductScreen from 'point_of_sale.ProductScreen';
+const rpc = require('web.rpc');
+
+class BookedOrdersButton extends PosComponent {
+ async onClick() {
+ // fetch all booked order in draft stage to screen
+ var self = this
+ await rpc.query({
+ model: 'book.order',
+ method: 'all_orders',
+ }).then(function(result) {
+ self.showScreen('BookedOrdersScreen', {
+ data: result
+ });
+ })
+ }
+}
+BookedOrdersButton.template = 'BookedOrdersButton';
+ProductScreen.addControlButton({
+ component: BookedOrdersButton,
+ condition: () => true
+})
+Registries.Component.add(BookedOrdersButton);
\ No newline at end of file
diff --git a/pos_book_order/static/src/js/BookedOrdersScreen.js b/pos_book_order/static/src/js/BookedOrdersScreen.js
new file mode 100644
index 000000000..e6749d184
--- /dev/null
+++ b/pos_book_order/static/src/js/BookedOrdersScreen.js
@@ -0,0 +1,39 @@
+/** @odoo-module **/
+/*
+ * This file is used to register a new screen for Booked orders.
+ */
+import Registries from 'point_of_sale.Registries';
+import TicketScreen from 'point_of_sale.TicketScreen';
+import {useListener} from "@web/core/utils/hooks";
+
+class BookedOrdersScreen extends TicketScreen {
+ setup() {
+ super.setup();
+ useListener('click-confirm', this._Confirm);
+ }
+ back() {
+ // on clicking the back button it will redirected Product screen
+ this.showScreen('ProductScreen');
+ }
+ _Confirm(ev) {
+ // On clicking confirm button on each order a order will create with corresponding partner and products,user can do the payment
+ var self = this
+ var data = ev.detail
+ this.env.pos.add_new_order();
+ for (var i of data.products) {
+ var product = self.env.pos.db.get_product_by_id(i['id'])
+ var qty = i['qty']
+ this.env.pos.get_order().add_product(product, {
+ quantity: qty,
+ price: i['price']
+ })
+ }
+ var partner_id = data.partner_id
+ this.env.pos.get_order().set_partner(this.env.pos.db.get_partner_by_id(partner_id));
+ this.env.pos.selectedOrder.is_booked = true
+ this.env.pos.selectedOrder.booked_data = data
+ this.showScreen('ProductScreen');
+ }
+}
+BookedOrdersScreen.template = 'BookedOrdersScreen';
+Registries.Component.add(BookedOrdersScreen);
\ No newline at end of file
diff --git a/pos_book_order/static/src/js/models.js b/pos_book_order/static/src/js/models.js
new file mode 100644
index 000000000..b942e64b4
--- /dev/null
+++ b/pos_book_order/static/src/js/models.js
@@ -0,0 +1,31 @@
+/** @odoo-module **/
+/*
+ * This file is used to add some fields to order class for some reference.
+ */
+import Registries from 'point_of_sale.Registries';
+import {Order} from 'point_of_sale.models'
+
+const BookedOrder = (Order) => class BookedOrder extends Order {
+ constructor(obj, options) {
+ // this function is overrided for adding two fields to order and assign value to them
+ super(...arguments);
+ if (options.json) {
+ this.is_booked = options.json.is_booked || false;
+ this.booked_data = options.json.booked_data || undefined;
+ }
+ }
+ init_from_JSON(json) {
+ // this function is overrided for assigning json value to this
+ super.init_from_JSON(...arguments);
+ this.is_booked = json.is_booked;
+ this.booked_data = json.booked_data
+ }
+ export_as_JSON() {
+ // this function is overrided for assign this to json for new field
+ const json = super.export_as_JSON(...arguments);
+ json.booked_data = this.booked_data;
+ json.is_booked = this.is_booked;
+ return json;
+ }
+}
+Registries.Model.extend(Order, BookedOrder);
\ No newline at end of file
diff --git a/pos_book_order/static/src/xml/BookOrderPopup.xml b/pos_book_order/static/src/xml/BookOrderPopup.xml
new file mode 100644
index 000000000..bc807514e
--- /dev/null
+++ b/pos_book_order/static/src/xml/BookOrderPopup.xml
@@ -0,0 +1,150 @@
+
+
+
+
+