@ -0,0 +1,49 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
POS Restaurant Dine-in/TakeAway |
||||
|
=============================== |
||||
|
* This module will add the options Dine-in and Take away in Odoo POS. |
||||
|
* A separate tokens will be generated for all Takeaway orders. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional configuration required |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (AGPL-3). |
||||
|
(http://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer: (V18) Adarsh K, |
||||
|
(V17) Ashwin A, |
||||
|
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) 2024-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 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 |
@ -0,0 +1,51 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 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 Restaurant Dine-in/TakeAway", |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Point of Sale', |
||||
|
'summary': "This module will add the options Dine-in and Take away in Odoo POS.", |
||||
|
'description': """The POS user can make orders as Dine-in or Take |
||||
|
away and it will create separate token for Take away orders.""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['point_of_sale', 'pos_restaurant'], |
||||
|
'data': [ |
||||
|
'views/res_config_settings_views.xml', |
||||
|
'views/pos_order_view.xml', |
||||
|
], |
||||
|
'assets': { |
||||
|
'point_of_sale._assets_pos': [ |
||||
|
'pos_takeaway/static/src/xml/Screens/ProductScreen/ReceiptScreen/ReceiptHeader.xml', |
||||
|
'pos_takeaway/static/src/xml/Screens/ProductScreen/ControlButton/TakeAwayButton.xml', |
||||
|
'pos_takeaway/static/src/js/Screens/ProductScreen/ReceiptScreen/ReceiptScreen.js', |
||||
|
'pos_takeaway/static/src/js/Screens/ProductScreen/ControlButton/TakeAwayButton.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': ['static/description/banner.png'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
## Module <pos_takeaway> |
||||
|
|
||||
|
#### 10.09.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
##### ADD |
||||
|
-Initial Commit for POS Restaurant Dine-in/TakeAway |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 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 pos_config |
||||
|
from . import pos_order |
||||
|
from . import res_config_settings |
@ -0,0 +1,41 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 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 PosConfiguration(models.Model): |
||||
|
""" Declaring the class for PosConfiguration and adding fields in pos |
||||
|
config """ |
||||
|
_inherit = 'pos.config' |
||||
|
|
||||
|
is_pos_takeaway = fields.Boolean( |
||||
|
string='Pos TakeAway', |
||||
|
help='TakeAway, Dine-in on Restaurant', |
||||
|
) |
||||
|
is_generate_token = fields.Boolean( |
||||
|
string='Generate Token', |
||||
|
help='Generate Token Number', |
||||
|
) |
||||
|
pos_token = fields.Integer( |
||||
|
string="Token Number", |
||||
|
help="Token number starts from 1", |
||||
|
) |
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 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): |
||||
|
""" |
||||
|
Inheriting and adding field is_takeaway and this field is used for filter pos orders |
||||
|
""" |
||||
|
_inherit = 'pos.order' |
||||
|
|
||||
|
is_takeaway = fields.Boolean(default=False, string="Is a Takeaway Order", |
||||
|
help="Is a Takeaway Order") |
||||
|
is_dine_in = fields.Boolean(default=False, string="Is a Dine In Order", |
||||
|
help="Is a Dine In Order") |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-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 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 ResConfigSettings(models.TransientModel): |
||||
|
"""Declaring a class for ResConfigSettings and Adding fields""" |
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
pos_is_pos_takeaway = fields.Boolean( |
||||
|
string='Pos TakeAway', |
||||
|
related="pos_config_id.is_pos_takeaway", |
||||
|
help="TakeAway, Dine-in on Restaurant", |
||||
|
readonly=False, |
||||
|
) |
||||
|
pos_is_generate_token = fields.Boolean( |
||||
|
string='Generate Token', |
||||
|
related="pos_config_id.is_generate_token", |
||||
|
help="This Token number starts from 1", |
||||
|
readonly=False, |
||||
|
) |
||||
|
pos_pos_token = fields.Integer( |
||||
|
string="Token", |
||||
|
help="The token will start from 1.", |
||||
|
related="pos_config_id.pos_token" |
||||
|
) |
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: 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: 423 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.2 KiB |
After Width: | Height: | Size: 1.2 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: 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: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 406 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 407 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,39 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import { Component, useRef } from "@odoo/owl"; |
||||
|
import { usePos } from "@point_of_sale/app/store/pos_hook"; |
||||
|
import { useService } from "@web/core/utils/hooks"; |
||||
|
import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; |
||||
|
import { patch } from "@web/core/utils/patch"; |
||||
|
|
||||
|
patch(ControlButtons.prototype, { |
||||
|
setup() { |
||||
|
super.setup(...arguments); |
||||
|
this.pos = usePos(); |
||||
|
this.orm = useService("orm"); |
||||
|
this.TakeAway = useRef("TakeAway"); |
||||
|
this.pos.get_order().is_takeaway = false; |
||||
|
this.pos.get_order().is_dine_in = true; |
||||
|
}, |
||||
|
async onClick() { |
||||
|
const SelectedOrder = this.pos.get_order(); |
||||
|
if (SelectedOrder.is_empty()) { |
||||
|
return alert ('Please add product!!'); |
||||
|
}else{ |
||||
|
if (this.TakeAway.el.className === "control-button customer-button btn rounded-0 fw-bolder text-truncate btn-primary") { |
||||
|
this.TakeAway.el.className = "control-button btn btn-light rounded-0 fw-bolder"; |
||||
|
SelectedOrder.is_dine_in = true; |
||||
|
if (this.pos.config.is_generate_token) { |
||||
|
this.pos.config.pos_token -= 1; |
||||
|
} |
||||
|
}else{ |
||||
|
this.TakeAway.el.className = "control-button customer-button btn rounded-0 fw-bolder text-truncate btn-primary"; |
||||
|
if (this.pos.config.is_generate_token) { |
||||
|
this.pos.config.pos_token += 1; |
||||
|
} |
||||
|
SelectedOrder.is_takeaway = true; |
||||
|
SelectedOrder.is_dine_in = false; |
||||
|
SelectedOrder.generate_token = true; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
@ -0,0 +1,13 @@ |
|||||
|
import { patch } from "@web/core/utils/patch"; |
||||
|
import { PosStore } from "@point_of_sale/app/store/pos_store"; |
||||
|
|
||||
|
patch(PosStore.prototype, { |
||||
|
getReceiptHeaderData(order) { |
||||
|
return { |
||||
|
...super.getReceiptHeaderData(...arguments), |
||||
|
takeaway: order.is_takeaway, |
||||
|
DineIn: order.is_dine_in, |
||||
|
token_number : this.config.pos_token, |
||||
|
}; |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<templates id="template" xml:space="preserve"> |
||||
|
<t t-name="pos_takeaway.TakeAwayButton" t-inherit="point_of_sale.ControlButtons" t-inherit-mode="extension"> |
||||
|
<xpath expr="//SelectPartnerButton" position="after"> |
||||
|
<t t-if="this.pos.config.module_pos_restaurant and this.pos.config.is_pos_takeaway"> |
||||
|
<button |
||||
|
class="control-button btn btn-light rounded-0 fw-bolder" t-ref="TakeAway" |
||||
|
t-att-class="buttonClass" |
||||
|
t-on-click="() => this.onClick()"> |
||||
|
<i class="fa fa-shopping-basket"/>Take away |
||||
|
</button> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</t> |
||||
|
</templates> |
@ -0,0 +1,45 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!-- Extending the Receipt Header to add the Dine-in or Takeaway label on it. |
||||
|
If it is a takeaway and the generate token is enabled, it will add the |
||||
|
token to the receipt. --> |
||||
|
<templates id="template" xml:space="preserve"> |
||||
|
<t t-name="TakeAwayReceipt" t-inherit="point_of_sale.ReceiptHeader" |
||||
|
t-inherit-mode="extension" owl="1"> |
||||
|
<xpath expr="//div[hasclass('cashier')]" position="before"> |
||||
|
<t t-if='!props.data.DineIn'> |
||||
|
<div>--------------------------------</div> |
||||
|
<div> |
||||
|
<span style="font-weight:bold;font-size: 13px;"> |
||||
|
Take Away |
||||
|
</span> |
||||
|
</div> |
||||
|
<t t-if='props.data.token_number'> |
||||
|
<div>--------------------------------</div> |
||||
|
<div> |
||||
|
<span style="font-weight:bold;font-size: 13px;"> |
||||
|
Token Number : <t t-esc="props.data.token_number"/> |
||||
|
</span> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-if="props.data.DineIn"> |
||||
|
<div>--------------------------------</div> |
||||
|
<div> |
||||
|
<span style="font-weight:bold;font-size: 13px;"> |
||||
|
Dine-In |
||||
|
</span> |
||||
|
</div> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//t[@t-if='props.data.table']" position="replace"> |
||||
|
<t t-if="props.data.DineIn"> |
||||
|
<t t-if="props.data.table">Table <t t-esc="props.data.table"/></t> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//t[@t-if='props.data.table and props.data.customer_count']" position="replace"> |
||||
|
<t t-if="props.data.DineIn"> |
||||
|
<t t-if="props.data.table and props.data.customer_count ">, Guests: <t t-esc="props.data.customer_count" /></t> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</t> |
||||
|
</templates> |
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Inherits pos order search view to add Dine-in and Takeaway filters --> |
||||
|
<record id="view_pos_order_filter" model="ir.ui.view"> |
||||
|
<field name="name">pos.order.view.search.inherit.pos.takeaway</field> |
||||
|
<field name="model">pos.order</field> |
||||
|
<field name="inherit_id" ref="point_of_sale.view_pos_order_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<search position="inside"> |
||||
|
<filter string="Dine In" name="take_away" |
||||
|
domain="[('is_takeaway','=', False)]"/> |
||||
|
<filter string="Take Away" name="take_away" |
||||
|
domain="[('is_takeaway','=', True)]"/> |
||||
|
</search> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="view_pos_pos_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">pos.order.form.view.inherit</field> |
||||
|
<field name="model">pos.order</field> |
||||
|
<field name="inherit_id" ref="pos_restaurant.view_pos_pos_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='table_id']" position="replace"> |
||||
|
<field name="table_id" invisible="is_dine_in == False"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//field[@name='customer_count']" position="replace"> |
||||
|
<field name="customer_count" invisible="is_dine_in == False"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,25 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- form view--> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name">res.config.settings.view.form.inherit.pos.takeaway</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="inherit_id" |
||||
|
ref="point_of_sale.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//block[@id='pos_inventory_section']" position="after"> |
||||
|
<block title="Other Features" id="other_features"> |
||||
|
<setting title="TakeAway,Dine-in" string="Pos TakeAway" |
||||
|
help="TakeAway,Dine-in on Restaurant"> |
||||
|
<field name="pos_is_pos_takeaway" required="pos_config_id"/> |
||||
|
</setting> |
||||
|
<setting string="Generate Token" |
||||
|
help="This Token number starts from 1" |
||||
|
invisible="not pos_is_pos_takeaway"> |
||||
|
<field name="pos_is_generate_token"/> |
||||
|
</setting> |
||||
|
</block> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |