mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-23 19:42:00 +02:00
19.0 vanilla
This commit is contained in:
parent
6e54c1af6c
commit
3ca647e428
1087 changed files with 132065 additions and 108499 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# PoS HR Restaurant
|
||||
# POS HR Restaurant
|
||||
|
||||
|
||||
This module adapts the behavior of the PoS when the pos_hr and pos_restaurant are installed.
|
||||
|
|
@ -12,38 +12,15 @@ pip install odoo-bringout-oca-ocb-pos_hr_restaurant
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- pos_hr
|
||||
- pos_restaurant
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: PoS HR Restaurant
|
||||
- **Version**: 1.0
|
||||
- **Category**: Hidden
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `pos_hr_restaurant`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/pos_hr_restaurant
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
|
||||
{
|
||||
'name': 'PoS HR Restaurant',
|
||||
'name': 'POS HR Restaurant',
|
||||
'version': '1.0',
|
||||
'category': 'Hidden',
|
||||
'category': 'Sales/Point of Sale',
|
||||
'summary': 'Link module between pos_hr and pos_restaurant',
|
||||
'description': """
|
||||
This module adapts the behavior of the PoS when the pos_hr and pos_restaurant are installed.
|
||||
|
|
@ -13,9 +13,13 @@ This module adapts the behavior of the PoS when the pos_hr and pos_restaurant ar
|
|||
'depends': ['pos_hr', 'pos_restaurant'],
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale.assets': [
|
||||
'pos_hr_restaurant/static/src/js/**/*.js',
|
||||
'point_of_sale._assets_pos': [
|
||||
'pos_hr_restaurant/static/src/**/*',
|
||||
],
|
||||
'web.assets_tests': [
|
||||
'pos_hr_restaurant/static/tests/**/*',
|
||||
],
|
||||
},
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_hr_restaurant
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-06 13:32+0000\n"
|
||||
"PO-Revision-Date: 2024-02-06 13:32+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: pos_hr_restaurant
|
||||
#: model:ir.model,name:pos_hr_restaurant.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr "Narudžbe POS-a"
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pos_hr_restaurant
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-02-06 13:32+0000\n"
|
||||
"PO-Revision-Date: 2024-02-06 13:32+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: pos_hr_restaurant
|
||||
#: model:ir.model,name:pos_hr_restaurant.model_pos_order
|
||||
msgid "Point of Sale Orders"
|
||||
msgstr ""
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class PosOrder(models.Model):
|
||||
_inherit = "pos.order"
|
||||
|
||||
def _get_fields_for_draft_order(self):
|
||||
fields = super()._get_fields_for_draft_order()
|
||||
fields.append('employee_id')
|
||||
return fields
|
||||
|
||||
@api.model
|
||||
def get_table_draft_orders(self, table_ids):
|
||||
table_orders = super().get_table_draft_orders(table_ids)
|
||||
for order in table_orders:
|
||||
if order['employee_id']:
|
||||
order['employee_id'] = order['employee_id'][0]
|
||||
|
||||
return table_orders
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
import "@pos_restaurant/app/services/pos_store";
|
||||
import { PosStore } from "@point_of_sale/app/services/pos_store";
|
||||
|
||||
patch(PosStore.prototype, {
|
||||
shouldResetIdleTimer() {
|
||||
return (
|
||||
this.router.state.current !== "LoginScreen" && super.shouldResetIdleTimer(...arguments)
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/* @odoo-module alias=pos_restaurant_hr.chrome */
|
||||
|
||||
import Chrome from 'point_of_sale.Chrome';
|
||||
import Registries from 'point_of_sale.Registries';
|
||||
|
||||
|
||||
export const PosHrRestaurantChrome = (Chrome) => class extends Chrome {
|
||||
//@override
|
||||
_shouldResetIdleTimer() {
|
||||
return super._shouldResetIdleTimer() && this.tempScreen.name !== 'LoginScreen';
|
||||
}
|
||||
}
|
||||
|
||||
Registries.Component.extend(Chrome, PosHrRestaurantChrome);
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import { Navbar } from "@point_of_sale/app/components/navbar/navbar";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Navbar.prototype, {
|
||||
get showEditPlanButton() {
|
||||
if (
|
||||
this.pos.config.module_pos_restaurant &&
|
||||
(!this.pos.config.module_pos_hr || this.pos.employeeIsAdmin)
|
||||
) {
|
||||
return super.showEditPlanButton;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
import * as PosHr from "@pos_hr/../tests/tours/utils/pos_hr_helpers";
|
||||
import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util";
|
||||
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util";
|
||||
import * as FloorScreen from "@pos_restaurant/../tests/tours/utils/floor_screen_util";
|
||||
import * as SelectionPopup from "@point_of_sale/../tests/generic_helpers/selection_popup_util";
|
||||
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("web_tour.tours").add("test_post_login_default_screen_is_tables", {
|
||||
steps: () =>
|
||||
[
|
||||
Chrome.clickBtn("Open Register"),
|
||||
PosHr.clickLoginButton(),
|
||||
SelectionPopup.has("Mitchell Admin", { run: "click" }),
|
||||
Dialog.confirm("Open Register"),
|
||||
FloorScreen.isShown(),
|
||||
].flat(),
|
||||
});
|
||||
|
||||
registry.category("web_tour.tours").add("test_post_login_default_screen_is_register", {
|
||||
steps: () =>
|
||||
[
|
||||
Chrome.clickBtn("Open Register"),
|
||||
PosHr.clickLoginButton(),
|
||||
SelectionPopup.has("Mitchell Admin", { run: "click" }),
|
||||
Dialog.confirm("Open Register"),
|
||||
ProductScreen.isShown(),
|
||||
].flat(),
|
||||
});
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import pos_order
|
||||
from . import test_frontend
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
from odoo.tests import tagged
|
||||
from odoo.addons.pos_hr.tests.test_frontend import TestPosHrHttpCommon
|
||||
from odoo.addons.pos_restaurant.tests.test_frontend import TestFrontendCommon
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestUi(TestPosHrHttpCommon, TestFrontendCommon):
|
||||
def test_post_login_default_screen_tables(self):
|
||||
self.main_pos_config.default_screen = "tables"
|
||||
self.main_pos_config.with_user(self.pos_admin).open_ui()
|
||||
self.start_pos_tour("test_post_login_default_screen_is_tables", login="pos_admin")
|
||||
|
||||
def test_post_login_default_screen_register(self):
|
||||
self.main_pos_config.default_screen = "register"
|
||||
self.main_pos_config.with_user(self.pos_admin).open_ui()
|
||||
self.start_pos_tour("test_post_login_default_screen_is_register", login="pos_admin")
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-pos_hr_restaurant"
|
||||
version = "16.0.0"
|
||||
description = "PoS HR Restaurant - Link module between pos_hr and pos_restaurant"
|
||||
description = "POS HR Restaurant -
|
||||
Link module between pos_hr and pos_restaurant
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-pos_hr>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-pos_restaurant>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-pos_hr>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-pos_restaurant>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -17,7 +19,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue