Browse Source

Jul 4 : [ADD] Initial Commit 'pos_book_order'

pull/266/head
AjmalCybro 2 years ago
parent
commit
15db4da860
  1. 48
      pos_book_order/README.rst
  2. 22
      pos_book_order/__init__.py
  3. 60
      pos_book_order/__manifest__.py
  4. 11
      pos_book_order/data/ir_sequence_data.xml
  5. 6
      pos_book_order/doc/RELEASE_NOTES.md
  6. 25
      pos_book_order/models/__init__.py
  7. 185
      pos_book_order/models/book_order.py
  8. 88
      pos_book_order/models/book_order_line.py
  9. 30
      pos_book_order/models/pos_config.py
  10. 45
      pos_book_order/models/pos_order.py
  11. 3
      pos_book_order/security/ir.model.access.csv
  12. BIN
      pos_book_order/static/description/assets/icons/check.png
  13. BIN
      pos_book_order/static/description/assets/icons/chevron.png
  14. BIN
      pos_book_order/static/description/assets/icons/cogs.png
  15. BIN
      pos_book_order/static/description/assets/icons/consultation.png
  16. BIN
      pos_book_order/static/description/assets/icons/ecom-black.png
  17. BIN
      pos_book_order/static/description/assets/icons/education-black.png
  18. BIN
      pos_book_order/static/description/assets/icons/hotel-black.png
  19. BIN
      pos_book_order/static/description/assets/icons/license.png
  20. BIN
      pos_book_order/static/description/assets/icons/lifebuoy.png
  21. BIN
      pos_book_order/static/description/assets/icons/manufacturing-black.png
  22. BIN
      pos_book_order/static/description/assets/icons/pos-black.png
  23. BIN
      pos_book_order/static/description/assets/icons/puzzle.png
  24. BIN
      pos_book_order/static/description/assets/icons/restaurant-black.png
  25. BIN
      pos_book_order/static/description/assets/icons/service-black.png
  26. BIN
      pos_book_order/static/description/assets/icons/trading-black.png
  27. BIN
      pos_book_order/static/description/assets/icons/training.png
  28. BIN
      pos_book_order/static/description/assets/icons/update.png
  29. BIN
      pos_book_order/static/description/assets/icons/user.png
  30. BIN
      pos_book_order/static/description/assets/icons/wrench.png
  31. BIN
      pos_book_order/static/description/assets/misc/categories.png
  32. BIN
      pos_book_order/static/description/assets/misc/check-box.png
  33. BIN
      pos_book_order/static/description/assets/misc/compass.png
  34. BIN
      pos_book_order/static/description/assets/misc/corporate.png
  35. BIN
      pos_book_order/static/description/assets/misc/customer-support.png
  36. BIN
      pos_book_order/static/description/assets/misc/cybrosys-logo.png
  37. BIN
      pos_book_order/static/description/assets/misc/features.png
  38. BIN
      pos_book_order/static/description/assets/misc/logo.png
  39. BIN
      pos_book_order/static/description/assets/misc/pictures.png
  40. BIN
      pos_book_order/static/description/assets/misc/pie-chart.png
  41. BIN
      pos_book_order/static/description/assets/misc/right-arrow.png
  42. BIN
      pos_book_order/static/description/assets/misc/star.png
  43. BIN
      pos_book_order/static/description/assets/misc/support.png
  44. BIN
      pos_book_order/static/description/assets/misc/whatsapp.png
  45. BIN
      pos_book_order/static/description/assets/modules/m1.png
  46. BIN
      pos_book_order/static/description/assets/modules/m2.png
  47. BIN
      pos_book_order/static/description/assets/modules/m3.png
  48. BIN
      pos_book_order/static/description/assets/modules/m4.png
  49. BIN
      pos_book_order/static/description/assets/modules/m5.png
  50. BIN
      pos_book_order/static/description/assets/modules/m6.png
  51. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot1.png
  52. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot10.png
  53. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot2.png
  54. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot3.png
  55. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot4.png
  56. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot5.png
  57. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot6.png
  58. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot7.png
  59. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot8.png
  60. BIN
      pos_book_order/static/description/assets/screenshots/Screenshot9.png
  61. BIN
      pos_book_order/static/description/assets/screenshots/hero.gif
  62. BIN
      pos_book_order/static/description/banner.jpg
  63. BIN
      pos_book_order/static/description/cybro_logo.png
  64. BIN
      pos_book_order/static/description/icon.png
  65. 707
      pos_book_order/static/description/index.html
  66. 36
      pos_book_order/static/src/js/BookOrderButton.js
  67. 45
      pos_book_order/static/src/js/BookOrderPopup.js
  68. 29
      pos_book_order/static/src/js/BookedOrdersButton.js
  69. 39
      pos_book_order/static/src/js/BookedOrdersScreen.js
  70. 31
      pos_book_order/static/src/js/models.js
  71. 150
      pos_book_order/static/src/xml/BookOrderPopup.xml
  72. 102
      pos_book_order/static/src/xml/BookedOrdersScreen.xml
  73. 20
      pos_book_order/static/src/xml/Buttons.xml
  74. 44
      pos_book_order/static/src/xml/OrderReceipt.xml
  75. 103
      pos_book_order/views/book_order_views.xml
  76. 26
      pos_book_order/views/pos_config_views.xml
  77. 14
      pos_book_order/views/pos_order_views.xml

48
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 <https://cybrosys.com/>`__
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 <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

22
pos_book_order/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
from . import models

60
pos_book_order/__manifest__.py

@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
{
'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,
}

11
pos_book_order/data/ir_sequence_data.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!--this record for adding sequence to book.order-->
<record id="sequence_book_order" model="ir.sequence">
<field name="name">Book Order</field>
<field name="code">book.order</field>
<field name="prefix">POS/BO/</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
</odoo>

6
pos_book_order/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <pos_book_order>
#### 23.06.2023
#### Version 16.0.1.0.0
##### ADD
- Initial Commit for POS Booking Order

25
pos_book_order/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
from . import book_order
from . import book_order_line
from . import pos_config
from . import pos_order

185
pos_book_order/models/book_order.py

@ -0,0 +1,185 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
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

88
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(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
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)

30
pos_book_order/models/pos_config.py

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
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")

45
pos_book_order/models/pos_order.py

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################
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

3
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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_book_order access.book.order model_book_order point_of_sale.group_pos_user 1 1 1 1
3 access_book_order_line access.book.order.line model_book_order_line point_of_sale.group_pos_user 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
pos_book_order/static/description/assets/modules/m1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
pos_book_order/static/description/assets/modules/m2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
pos_book_order/static/description/assets/modules/m3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
pos_book_order/static/description/assets/modules/m4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
pos_book_order/static/description/assets/modules/m5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
pos_book_order/static/description/assets/modules/m6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
pos_book_order/static/description/assets/screenshots/Screenshot9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

BIN
pos_book_order/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
pos_book_order/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
pos_book_order/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

707
pos_book_order/static/description/index.html

@ -0,0 +1,707 @@
<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: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
POS Booking Order</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Book orders for customers in the POS</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">
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.
</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;">POS booking orders for both Odoo 16 community and enterprise editions.</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;">Booking orders from Shop,Bar/Restaurant in POS.</span>
</div>
<div class="d-flex align-items-center"
style="margin-top: 30px; margin-bottom: 30px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Available both pickup and delivery options.</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;">Shows booked order details in order receipt and order.</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Enable Booking Orders
from the POS settings</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
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. </p>
<img src="assets/screenshots/Screenshot1.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;">
Booking Order button and Booked orders Screen</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
While clicking the booking order button it will open a
popup,that will book the order. </p>
<img src="assets/screenshots/Screenshot2.png" class="img-thumbnail">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Booking Order Popup</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
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.</p>
<img src="assets/screenshots/Screenshot3.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;">
Fields to enter delivery date & address</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
When selected deliver option, it displays two fields to
enter delivery date and delivery address.</p>
<img src="assets/screenshots/Screenshot4.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;">
Booked Orders Screen</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Not confirmed booked orders are can see here.</p>
<img src="assets/screenshots/Screenshot5.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;">
Can view order lines & customer assigned with order details
on confirming POS order</h3>
<img src="assets/screenshots/Screenshot6.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;">
Order Receipt for pickup orders</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
In the case of picking order, the order receipt will be
shown as below.</p>
<img src="assets/screenshots/Screenshot7.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;">
Order Receipt for delivery orders</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
In the case of delivery order, the order receipt will be
shown as below. Delivery date and address are specified</p>
<img src="assets/screenshots/Screenshot8.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 Backend view of the booked orders</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Confirmed or paid booked orders are highlighted.</p>
<img src="assets/screenshots/Screenshot9.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 PoS Order</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
The Book order ref will be updated on PoS Order</p>
<img src="assets/screenshots/Screenshot10.png"
class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/point_of_sale_logo/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m1.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/pos_magnify_image/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/pos_product_creation/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/pos_mrp_order/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/pos_order_line_image/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/16.0/product_exchange_pos_sys/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="assets/modules/m6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="width:35px; color:#000"> <span
class="carousel-control-prev-icon"><i
class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo1"
data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i
class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png"
class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
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 -->

36
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);

45
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);

29
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);

39
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);

31
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);

150
pos_book_order/static/src/xml/BookOrderPopup.xml

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--This is used for creating a popup for booking orders-->
<t t-name="BookOrderPopup" owl="1">
<div class="modal-dialog">
<div class="popup widget order-scroller touch-scrollable"
style="width:516px;height: 545px;font-size: 13px;overflow:auto;background:#EAEDED">
<div class="title" style="font-size:22px;font-weight: bold;"> Book Your Order</div>
<br/>
<br/>
<t t-if="props.partner">
<label style="margin-right: 298px;">AMOUNT TOTAL</label>
<div>
<input class='form-control booking_field' name="amount"
type='text'
style="height:34px;border-radius:5px;"
t-att-value="env.pos.get_order().get_total_with_tax()"
readonly="1"/>
</div>
<br/>
<br/>
<label style="margin-right: 333px;">CUSTOMER</label>
<div>
<input class='form-control booking_field' name="name"
type='text'
style="height:34px;border-radius:5px;"
t-att-value="props.partner.name" readonly="1"/>
</div>
<br/>
<br/>
<label style="margin-right: 185px;">PHONE CONTACT FOR DELIVERY(*)</label>
<div>
<input class='form-control booking_field' name="phone"
type='text' id="phone"
style="height:34px;border-radius:5px;"
t-att-value="props.partner.phone"
data-is-required="true"/>
</div>
</t>
<br/>
<br/>
<div class="radio"
style="width:100%;float: left;text-align: center;font-size: 23px;">
<label>Pickup</label>
<input type="radio" name="method" id="pickup"
style="width: auto;min-height: auto;margin-right: 28px;"
checked="checked" value="pickup"/>
<label>Deliver</label>
<input type="radio" name="method" id="deliver"
style="width: auto;min-height: auto;"
value="deliver"/>
</div>
<br/>
<br/>
<br/>
<t t-if="env.pos.get_order()">
<label style="margin-right: 324px;">PRICELIST(*)</label>
<div>
<input class='form-control booking_field'
name="pricelist" type='text'
style="height:34px;border-radius:5px;"
t-att-value="env.pos.get_order().pricelist.display_name "
readonly="1"/>
</div>
<br/>
<br/>
<label style="margin-right: 293px;">BOOKING DATE(*)</label>
<div>
<input type="text" id='BookingDate' name="order_date"
class="order_date" maxlength="10"
style="height:34px;border-radius:5px; "
readonly="readonly"/>
</div>
<br/>
<br/>
<label style="margin-right: 324px;">ORDER NOTE</label>
<div>
<textarea rows="1" cols="30" name="order_note"
class="form-control order_note"
placeholder="Enter your notes here..."/>
</div>
</t>
<br/>
<br/>
<div id="Method_pickup" class="desc">
<label style="margin-right: 317px;">PICKUP DATE</label>
<div>
<input name="pickup_date"
class='form-control booking_field'
id="pickup_date" type='date'
style="height:34px;border-radius:5px;"/>
</div>
</div>
<div id="Method_deliver" class="desc" style="display: none;">
<label style="margin-right: 301px;">DELIVERY DATE</label>
<div>
<input name="deliver_date"
class='form-control booking_field'
id="deliver_date" type='date'
style="height:34px;border-radius:5px;"/>
</div>
<br/>
<br/>
<t t-if="props.partner">
<label style="margin-right: 271px;">DELIVERY ADDRESS(*)</label>
<div>
<input class='form-control booking_field'
name="delivery_address" type='text'
style="height:34px;border-radius:5px;"
id="delivery_address"
t-att-value="props.partner.address"
data-is-required="true"/>
</div>
</t>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("input[name$='method']").click(function() {
var test = $(this).val();
$("div.desc").hide();
$("#Method_" + test).show();
});
var currentDate=new Date();
$( "#BookingDate" ).datepicker({
setDate:currentDate,
beforeShow: function(i) {
if ($(i).attr('readonly')) { return false; }
}
});
$('#BookingDate').datepicker('setDate', 'today');
});
</script>
<div class="button cancel"
style="background-color: #d9534f;color: white;"
t-on-click="cancel">
Close
</div>
<div class="button confirm"
style="background-color: #6EC89B;color: white;"
t-on-click="onConfirm">
Confirm
</div>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
</t>
</templates>

102
pos_book_order/static/src/xml/BookedOrdersScreen.xml

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--This is used for creating a new screen for showing booked orders-->
<t t-name="BookedOrdersScreen" owl="1">
<div class="partnerlist-screen screen">
<div class="screen-content">
<div class="top-content">
<div class="button back" t-on-click="back">
<i class="fa fa-angle-double-left"/>
Back
</div>
</div>
<section class="full-content">
<div class="window">
<div class="screen-full-width">
<div class="orders" style="width: 100%">
<div class="header-row"
t-att-class="{ oe_hidden: env.isMobile }">
<div class="col">Order Ref.</div>
<div class="col">Customer</div>
<div class="col">Contact No.</div>
<div class="col">Order Date</div>
<div class="col">Pickup Date</div>
<div class="col">Delivery Date</div>
<div class="col wide">Address</div>
<div class="col">Total</div>
<div class="col very-narrow" name="confirm">
</div>
</div>
<t t-foreach="props.data" t-as="order"
t-key="order.id">
<div class="order-row"
t-att-class="{ highlight: isHighlighted(order) }">
<div class="col">
<div t-if="env.isMobile">Order Ref.</div>
<div>
<t t-esc="order.name"></t>
</div>
</div>
<div class="col">
<div t-if="env.isMobile">Customer</div>
<div>
<t t-esc="order.partner_name">
</t>
</div>
</div>
<div class="col">
<div t-if="env.isMobile">Contact No.</div>
<div><t t-esc="order.phone">
</t></div>
</div>
<div class="col">
<div t-if="env.isMobile">Order Date.</div>
<div><t t-esc="order.date">
</t></div>
</div>
<div class="col">
<div t-if="env.isMobile">Pickup Date</div>
<div t-if="order.pickup"><t t-esc="order.pickup"/></div>
<div> </div>
</div>
<div class="col">
<div t-if="env.isMobile">Delivery Date</div>
<div t-if="order.deliver"><t t-esc="order.deliver"/></div>
<div> </div>
</div>
<div class="col wide">
<div t-if="env.isMobile">Address</div>
<div><t t-esc="order.address"> </t></div>
</div>
<div class="col">
<div t-if="env.isMobile">Total</div>
<div><t t-esc="order.total">
</t></div>
</div>
<div class="col">
<button class="confirm-button"
name="confirm_order"
id="confirm_order"
t-on-click="() => this.trigger('click-confirm',order)">
Confirm Order
</button>
</div>
</div>
</t>
<t t-if="props.data.length==0">
<div class="empty-order-list" style="text-align: center; margin: 48px;color: #80848F;">
<i role="img" aria-label="Shopping cart"
title="Shopping cart"
class="fa fa-shopping-cart">
</i>
<h1>No orders found</h1>
</div>
</t>
</div>
</div>
</div>
</section>
</div>
</div>
</t>
</templates>

20
pos_book_order/static/src/xml/Buttons.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- this button for booking orders-->
<t t-name="BookOrderButton" owl="1">
<t t-if="env.pos.config.enable">
<div class='control-button' t-on-click="onClick">
<i class='fa fa-book'/>
<span class="label">Booking</span>
</div>
</t>
</t>
<!-- this button for seeing booked orders-->
<t t-name="BookedOrdersButton" owl="1">
<t t-if="env.pos.config.enable">
<div class='control-button' t-on-click="onClick">
Booked Orders
</div>
</t>
</t>
</templates>

44
pos_book_order/static/src/xml/OrderReceipt.xml

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<template id="receipt_template" xml:space="preserve">
<!--This is used for adding some more data to pos receipt based on the booked order-->
<t t-name="BookOrderReceipt" t-inherit="point_of_sale.OrderReceipt"
t-inherit-mode="extension" owl="1">
<xpath expr="//div[contains(text(), 'Total Taxes')]" position="after">
<t t-if="env.pos.selectedOrder.is_booked">
<hr/>
<div>
Booking Ref:
<span t-esc="env.pos.selectedOrder.booked_data.name"
class="pos-receipt-right-align"/>
</div>
<div>
Contact No.:
<span t-esc="env.pos.selectedOrder.booked_data.phone"
class="pos-receipt-right-align"/>
</div>
<div>
Order Note:
<span t-esc="env.pos.selectedOrder.booked_data.note"/>
</div>
<t t-if="env.pos.selectedOrder.booked_data.pickup">
<div>
Pickup Date:
<span t-esc="env.pos.selectedOrder.booked_data.pickup"
class="pos-receipt-right-align"/>
</div>
</t>
<t t-if="env.pos.selectedOrder.booked_data.deliver">
<div>
Delivery Date:
<span t-esc="env.pos.selectedOrder.booked_data.deliver"
class="pos-receipt-right-align"/>
</div>
<div>
Delivery address:
<span t-esc="env.pos.selectedOrder.booked_data.address"/>
</div>
</t>
</t>
</xpath>
</t>
</template>

103
pos_book_order/views/book_order_views.xml

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- this record for creating form view for book.order-->
<record id="book_order_view_form" model="ir.ui.view">
<field name="name">book.order.view.form</field>
<field name="model">book.order</field>
<field name="arch" type="xml">
<form string="Point of Sale Quotations" create="false">
<header>
<field name="state" widget="statusbar"
statusbar_visible="draft,confirmed"/>
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="date_order"/>
<field name="date_quotation"/>
<field name="pickup_date"/>
<field name="pricelist_id"/>
</group>
<group>
<field name="partner_id"/>
<field name="phone"/>
<field name="delivery_address"/>
<field name="deliver_date"/>
</group>
<notebook colspan="4">
<page string="Products">
<field name="book_line_ids" colspan="4"
nolabel="1">
<tree string="Order lines"
editable="bottom">
<field name="product_id"/>
<field name="qty"/>
<field name="price_unit"
widget="monetary"/>
<field name="discount"
widget="monetary"/>
<field name="tax_after_fiscal_position_ids"
widget="many2many_tags"/>
<field name="price_subtotal"
widget="monetary"/>
<field name="price_subtotal_incl"
widget="monetary"/>
</tree>
</field>
<group class="oe_subtotal_footer oe_right"
colspan="2" name="order_total">
<field name="amount_tax" widget="monetary"/>
<div class="oe_subtotal_footer_separator oe_inline">
<label for="amount_total"/>
</div>
<field name="amount_total" nolabel="1"
class="oe_subtotal_footer_separator"
widget="monetary"/>
</group>
</page>
<page string="Notes">
<field name="note"/>
</page>
</notebook>
</group>
</sheet>
</form>
</field>
</record>
<!-- this record for creating tree view for book.order-->
<record id="book_order_view_tree" model="ir.ui.view">
<field name="name">book.order.view.tree</field>
<field name="model">book.order</field>
<field name="arch" type="xml">
<tree string="Point of Sale Quotations" create="false"
decoration-danger="state == 'draft'"
decoration-success="state == 'confirmed'">
<field name="name"/>
<field name="partner_id"/>
<field name="pickup_date"/>
<field name="deliver_date"/>
<field name="amount_total"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- this record for creating menu action for book.order-->
<record id="book_order_menu_action" model="ir.actions.act_window">
<field name="name">Booking Orders</field>
<field name="res_model">book.order</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p>
Use this menu to browse previous booking orders and to record
new booking orders.
</p>
</field>
</record>
<menuitem id="book_order_menu"
name="Booking Orders"
parent="point_of_sale.menu_point_of_sale"
action="book_order_menu_action"
sequence="0"
groups="point_of_sale.group_pos_manager,point_of_sale.group_pos_user"/>
</odoo>

26
pos_book_order/views/pos_config_views.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- This record is for adding a field in pos configuration for allowing booking order-->
<record id="pos_config_view_form" model="ir.ui.view">
<field name="name">pos.config.view.form.inherit.book.order</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='other_devices']" position="after">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="enable"/>
</div>
<div class="o_setting_right_pane">
<label for="enable" string="Booking Orders"/>
<div class="text-muted">
Allow booking orders
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

14
pos_book_order/views/pos_order_views.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- this record for adding a booked order reference field to pos order form view -->
<record id="view_pos_pos_form" model="ir.ui.view">
<field name="name">pos.order.view.form.inherit.book.order</field>
<field name="model">pos.order</field>
<field name="inherit_id" ref="point_of_sale.view_pos_pos_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="booking_ref_id"/>
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save