@ -0,0 +1,45 @@ |
|||
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
:alt: License: LGPL-3 |
|||
|
|||
POS Kitchen Screen |
|||
================== |
|||
* POS Kitchen Screen facilitates sending certain orders automatically to the kitchen |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL v3). |
|||
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
|||
|
|||
|
|||
Credits |
|||
------- |
|||
Developer: (V18) Busthana, |
|||
|
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>` |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from .import models |
@ -0,0 +1,79 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################ |
|||
{ |
|||
'name': 'POS Kitchen Screen', |
|||
'version': '1.0', |
|||
'category': 'Point Of Sale', |
|||
'summary': 'POS Kitchen Screen facilitates sending certain orders ' |
|||
'automatically to the kitchen.The POS Kitchen Screen allows for ' |
|||
'the customization of order views, so that staff can see the ' |
|||
'information that is most important to them.', |
|||
'description': 'The POS Kitchen Screen in Odoo 17 is a feature that ' |
|||
'allows restaurant staff to view and manage orders in ' |
|||
'real-time from the kitchen. This screen provides a clear ' |
|||
'and organized display of all active orders, enabling ' |
|||
'kitchen staff to prioritize and manage their tasks ' |
|||
'efficiently. The POS Kitchen Screen in Odoo 16 also ' |
|||
'allows for the customization of order views, so that ' |
|||
'staff can see the information that is most important to ' |
|||
'them. Additionally, this feature facilitates ' |
|||
'communication between front-end and back-end staff, ' |
|||
'enabling them to work together seamlessly and provide a ' |
|||
'better dining experience for customers.', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['web','pos_restaurant'], |
|||
'data': [ |
|||
'security/pos_kitchen_screen_groups.xml', |
|||
"security/ir.model.access.csv", |
|||
'data/kitchen_screen_data.xml', |
|||
"views/kitchen_screen_views.xml", |
|||
"views/pos_kitchen_screen_odoo_menus.xml", |
|||
"views/pos_order_views.xml", |
|||
], |
|||
'assets': { |
|||
'point_of_sale._assets_pos': [ |
|||
'pos_kitchen_screen_odoo/static/src/js/fields_load.js', |
|||
'pos_kitchen_screen_odoo/static/src/js/order_pay.js', |
|||
'pos_kitchen_screen_odoo/static/src/js/order_button.js', |
|||
], |
|||
'web.assets_backend': [ |
|||
'pos_kitchen_screen_odoo/static/src/css/kitchen_screen.css', |
|||
'pos_kitchen_screen_odoo/static/src/js/kitchen_screen.js', |
|||
'pos_kitchen_screen_odoo/static/src/xml/kitchen_screen_templates.xml', |
|||
'https://code.jquery.com/jquery-1.10.2.min.js', |
|||
'https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js', |
|||
'https://fonts.googleapis.com', |
|||
'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js', |
|||
'https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js', |
|||
], |
|||
}, |
|||
'images': [ |
|||
'static/description/banner.png', |
|||
], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<record id="kitchen_screen_sequence" model="ir.sequence"> |
|||
<field name="name">Kitchen Screen</field> |
|||
<field name="code">kitchen.screen</field> |
|||
<field name="active">True</field> |
|||
<field name="prefix">KITCHEN</field> |
|||
<field name="padding">4</field> |
|||
<field name="number_next">1</field> |
|||
<field name="number_increment">1</field> |
|||
<field name="company_id" eval="False"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
## Module <pos_kitchen_screen_odoo> |
|||
|
|||
#### 23.05.2025 |
|||
#### Version 18.0.1.0.0 |
|||
#### ADD |
|||
- Initial commit for Pos Kitchen Screen |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################ |
|||
from . import kitchen_screen |
|||
from . import pos_orders |
|||
from . import pos_session |
@ -0,0 +1,68 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################ |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class KitchenScreen(models.Model): |
|||
"""Kitchen Screen model for the cook""" |
|||
_name = 'kitchen.screen' |
|||
_description = 'Pos Kitchen Screen' |
|||
_rec_name = 'sequence' |
|||
|
|||
def _pos_shop_id(self): |
|||
"""Domain for the Pos Shop""" |
|||
kitchen = self.search([]) |
|||
if kitchen: |
|||
return [('module_pos_restaurant', '=', True), |
|||
( |
|||
'id', 'not in', [rec.id for rec in kitchen.pos_config_id])] |
|||
else: |
|||
return [('module_pos_restaurant', '=', True)] |
|||
|
|||
sequence = fields.Char(readonly=True, default='New', |
|||
copy=False, tracking=True, help="Sequence of items") |
|||
pos_config_id = fields.Many2one('pos.config', string='Allowed POS', |
|||
domain=_pos_shop_id, |
|||
help="Allowed POS for kitchen") |
|||
pos_categ_ids = fields.Many2many('pos.category', |
|||
string='Allowed POS Category', |
|||
help="Allowed POS Category" |
|||
"for the corresponding Pos") |
|||
shop_number = fields.Integer(related='pos_config_id.id', string='Customer', |
|||
help="Id of the POS") |
|||
|
|||
def kitchen_screen(self): |
|||
"""Redirect to corresponding kitchen screen for the cook""" |
|||
return { |
|||
'type': 'ir.actions.act_url', |
|||
'target': 'new', |
|||
'url': '/pos/kitchen?pos_config_id= %s' % self.pos_config_id.id, |
|||
} |
|||
|
|||
@api.model_create_multi |
|||
def create(self, vals_list): |
|||
"""Used to create sequence""" |
|||
for vals in vals_list: |
|||
if vals.get('sequence', "New") == "New": |
|||
vals['sequence'] = self.env['ir.sequence'].next_by_code( |
|||
'kitchen.screen') or "New" |
|||
return super().create(vals_list) |
@ -0,0 +1,264 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################ |
|||
from odoo import api, fields, models |
|||
from datetime import datetime |
|||
import pytz |
|||
|
|||
|
|||
class PosOrder(models.Model): |
|||
"""Inheriting the pos order model """ |
|||
_inherit = "pos.order" |
|||
|
|||
order_status = fields.Selection(string="Order Status", |
|||
selection=[("draft", "Draft"), |
|||
("waiting", "Cooking"), |
|||
("ready", "Ready"), |
|||
("cancel", "Cancel")], |
|||
default='draft', |
|||
help='To know the status of order') |
|||
order_ref = fields.Char(string="Order Reference", |
|||
help='Reference of the order') |
|||
is_cooking = fields.Boolean(string="Is Cooking", |
|||
help='To identify the order is kitchen orders') |
|||
hour = fields.Char(string="Order Time", readonly=True, |
|||
help='To set the time of each order') |
|||
minutes = fields.Char(string='order time') |
|||
floor = fields.Char(string='Floor time') |
|||
|
|||
def write(self, vals): |
|||
"""Super the write function for adding order status in vals""" |
|||
message = { |
|||
'res_model': self._name, |
|||
'message': 'pos_order_created' |
|||
} |
|||
self.env["bus.bus"]._sendone('pos_order_created', |
|||
"notification", |
|||
message) |
|||
for order in self: |
|||
if order.order_status == "waiting" and vals.get( |
|||
"order_status") != "ready": |
|||
vals["order_status"] = order.order_status |
|||
if order.order_status == "ready": |
|||
vals["order_status"] = order.order_status |
|||
return super(PosOrder, self).write(vals) |
|||
|
|||
@api.model_create_multi |
|||
def create(self, vals_list): |
|||
"""Override create function for the validation of the order""" |
|||
message = { |
|||
'res_model': self._name, |
|||
'message': 'pos_order_created' |
|||
} |
|||
self.env["bus.bus"]._sendone('pos_order_created', |
|||
"notification", |
|||
message) |
|||
|
|||
for vals in vals_list: |
|||
pos_orders = self.search( |
|||
[("pos_reference", "=", vals["pos_reference"])]) |
|||
if pos_orders: |
|||
for rec in pos_orders.lines: |
|||
for lin in vals_list[0]["lines"]: |
|||
if lin[2]["product_id"] == rec.product_id.id: |
|||
lin[2]["order_status"] = rec.order_status |
|||
vals_list[0]["order_status"] = pos_orders.order_status |
|||
return super().create(vals_list) |
|||
|
|||
else: |
|||
if vals.get('order_id') and not vals.get('name'): |
|||
# set name based on the sequence specified on the config |
|||
config = self.env['pos.order'].browse( |
|||
vals['order_id']).session_id.config_id |
|||
vals['order_status'] = 'draft' |
|||
if not vals.get('name'): |
|||
vals['order_status'] = 'draft' |
|||
return super().create(vals_list) |
|||
|
|||
def get_details(self, shop_id, order=None): |
|||
"""For getting the kitchen orders for the cook""" |
|||
dic = order |
|||
if order: |
|||
orders = self.search( |
|||
[("pos_reference", "=", order[0]['pos_reference'])]) |
|||
if orders: |
|||
orders.lines = False |
|||
orders.lines = dic[0]['lines'] |
|||
kitchen_screen = self.env["kitchen.screen"].sudo().search( |
|||
[("pos_config_id", "=", shop_id)]) |
|||
pos_orders = self.env["pos.order.line"].search( |
|||
["&", ("is_cooking", "=", True), |
|||
("product_id.pos_categ_ids", "in", |
|||
[rec.id for rec in kitchen_screen.pos_categ_ids])]) |
|||
pos = self.env["pos.order"].search( |
|||
[("lines", "in", [rec.id for rec in pos_orders])], |
|||
order="date_order") |
|||
pos_lines = pos.lines.search( |
|||
[("product_id.pos_categ_ids", "in", |
|||
[rec.id for rec in kitchen_screen.pos_categ_ids])]) |
|||
values = {"orders": pos.read(), "order_lines": pos_lines.read()} |
|||
user_tz_str = self.env.user.tz or 'UTC' |
|||
user_tz = pytz.timezone(user_tz_str) |
|||
utc = pytz.utc |
|||
for value in values['orders']: |
|||
if value.get('table_id'): |
|||
value['floor'] = value['table_id'][1].split(',')[0].strip() |
|||
date_str = value['date_order'] |
|||
if isinstance(date_str, str): |
|||
utc_dt = datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S") |
|||
utc_dt = utc.localize(utc_dt) |
|||
else: |
|||
utc_dt = utc.localize(value['date_order']) |
|||
|
|||
local_dt = utc_dt.astimezone(user_tz) |
|||
value['hour'] = local_dt.hour |
|||
value['minutes'] = local_dt.minute |
|||
|
|||
return values |
|||
|
|||
def action_pos_order_paid(self): |
|||
"""Supering the action_pos_order_paid function for setting its kitchen |
|||
order and setting the order reference""" |
|||
res = super().action_pos_order_paid() |
|||
kitchen_screen = self.env["kitchen.screen"].search( |
|||
[("pos_config_id", "=", self.config_id.id)] |
|||
) |
|||
for order_line in self.lines: |
|||
order_line.is_cooking = True |
|||
if kitchen_screen: |
|||
for line in self.lines: |
|||
line.is_cooking = True |
|||
self.is_cooking = True |
|||
self.order_ref = self.name |
|||
return res |
|||
|
|||
@api.onchange("order_status") |
|||
def _onchange_is_cooking(self): |
|||
"""To set is_cooking false""" |
|||
if self.order_status == "ready": |
|||
self.is_cooking = False |
|||
|
|||
def order_progress_draft(self): |
|||
"""Calling function from js to change the order status""" |
|||
self.order_status = "waiting" |
|||
for line in self.lines: |
|||
if line.order_status != "ready": |
|||
line.order_status = "waiting" |
|||
|
|||
def order_progress_cancel(self): |
|||
"""Calling function from js to change the order status""" |
|||
self.order_status = "cancel" |
|||
for line in self.lines: |
|||
if line.order_status != "ready": |
|||
line.order_status = "cancel" |
|||
|
|||
def order_progress_change(self): |
|||
"""Calling function from js to change the order status""" |
|||
kitchen_screen = self.env["kitchen.screen"].search( |
|||
[("pos_config_id", "=", self.config_id.id)]) |
|||
stage = [] |
|||
for line in self.lines: |
|||
for categ in line.product_id.pos_categ_ids: |
|||
if categ.id in [rec.id for rec in |
|||
kitchen_screen.pos_categ_ids]: |
|||
stage.append(line.order_status) |
|||
if "waiting" in stage or "draft" in stage: |
|||
self.order_status = "ready" |
|||
else: |
|||
self.order_status = "ready" |
|||
|
|||
@api.model |
|||
def check_order(self, order_name): |
|||
"""Calling function from js to know status of the order""" |
|||
pos_order = self.env['pos.order'].sudo().search( |
|||
[('pos_reference', '=', str(order_name))]) |
|||
kitchen_order = self.env['kitchen.screen'].sudo().search( |
|||
[('pos_config_id', '=', pos_order.config_id.id)]) |
|||
if kitchen_order: |
|||
for category in pos_order.lines.mapped('product_id').mapped( |
|||
'pos_categ_ids').mapped('id'): |
|||
if category not in kitchen_order.pos_categ_ids.mapped('id'): |
|||
return { |
|||
'category': pos_order.lines.product_id.pos_categ_ids.browse( |
|||
category).name} |
|||
if kitchen_order and pos_order: |
|||
if pos_order.order_status != 'ready': |
|||
return True |
|||
else: |
|||
return False |
|||
else: |
|||
return False |
|||
|
|||
def check_order_status(self, order_name): |
|||
"Update order status" |
|||
pos_order = self.env['pos.order'].sudo().search( |
|||
[('pos_reference', '=', str(order_name))]) |
|||
kitchen_order = self.env['kitchen.screen'].sudo().search( |
|||
[('pos_config_id', '=', pos_order.config_id.id)]) |
|||
for category in pos_order.lines.mapped('product_id').mapped( |
|||
'pos_categ_ids').mapped('id'): |
|||
if category not in kitchen_order.pos_categ_ids.mapped('id'): |
|||
return 'no category' |
|||
if kitchen_order: |
|||
if pos_order.order_status == 'ready': |
|||
return False |
|||
else: |
|||
return True |
|||
else: |
|||
return True |
|||
|
|||
|
|||
class PosOrderLine(models.Model): |
|||
"""Inheriting the pos order line""" |
|||
_inherit = "pos.order.line" |
|||
|
|||
order_status = fields.Selection( |
|||
selection=[('draft', 'Draft'), ('waiting', 'Cooking'), |
|||
('ready', 'Ready'), ('cancel', 'Cancel')], default='draft', |
|||
help='The status of orderliness') |
|||
order_ref = fields.Char(related='order_id.order_ref', |
|||
string='Order Reference', |
|||
help='Order reference of order') |
|||
is_cooking = fields.Boolean(string="Cooking", default=False, |
|||
help='To identify the order is ' |
|||
'kitchen orders') |
|||
customer_id = fields.Many2one('res.partner', string="Customer", |
|||
related='order_id.partner_id', |
|||
help='Id of the customer') |
|||
|
|||
def get_product_details(self, ids): |
|||
"""To get the product details""" |
|||
lines = self.env['pos.order'].browse(ids) |
|||
res = [] |
|||
for rec in lines: |
|||
res.append({ |
|||
'product_id': rec.product_id.id, |
|||
'name': rec.product_id.name, |
|||
'qty': rec.qty |
|||
}) |
|||
return res |
|||
|
|||
def order_progress_change(self): |
|||
"""Calling function from js to change the order_line status""" |
|||
if self.order_status == 'ready': |
|||
self.order_status = 'waiting' |
|||
else: |
|||
self.order_status = 'ready' |
@ -0,0 +1,61 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################ |
|||
from odoo import models |
|||
|
|||
|
|||
class PosSession(models.Model): |
|||
"""Inheriting the pos session""" |
|||
_inherit = 'pos.session' |
|||
|
|||
def _pos_ui_models_to_load(self): |
|||
"""Pos ui models to load""" |
|||
result = super()._pos_ui_models_to_load() |
|||
result += { |
|||
'pos.order', 'pos.order.line' |
|||
} |
|||
return result |
|||
|
|||
def _loader_params_pos_order(self): |
|||
"""Load the fields to pos order""" |
|||
return {'search_params': { |
|||
'domain': [], |
|||
'fields': ['name', 'date_order', 'pos_reference', |
|||
'partner_id', 'lines', 'order_status', 'order_ref', |
|||
'is_cooking']}} |
|||
|
|||
def _get_pos_ui_pos_order(self, params): |
|||
"""Get pos ui pos order""" |
|||
return self.env['pos.order'].search_read( |
|||
**params['search_params']) |
|||
|
|||
def _loader_params_pos_order_line(self): |
|||
"""Load the fields to pos order line""" |
|||
return {'search_params': {'domain': [], |
|||
'fields': ['product_id', 'qty', |
|||
'order_status', 'order_ref', |
|||
'customer_id', |
|||
'price_subtotal', 'total_cost']}} |
|||
|
|||
def _get_pos_ui_pos_order_line(self, params): |
|||
"""Get pos ui pos order line""" |
|||
return self.env['pos.order.line'].search_read( |
|||
**params['search_params']) |
|
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Kitchen screen group for cook--> |
|||
<record model="ir.module.category" id="module_category_pos_kitchen_screen_odoo"> |
|||
<field name="name">Pos Kitchen Screen</field> |
|||
<field name="description">Kitchen Access Groups</field> |
|||
<field name="sequence">20</field> |
|||
</record> |
|||
|
|||
<record id="kitchen_cook" model="res.groups"> |
|||
<field name="name">Kitchen Cook</field> |
|||
<field name="category_id" |
|||
ref="pos_kitchen_screen_odoo.module_category_pos_kitchen_screen_odoo"/> |
|||
</record> |
|||
</odoo> |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 43 KiB |