mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-24 10:42:05 +02:00
Initial commit: Pos packages
This commit is contained in:
commit
95dfb9edb0
1301 changed files with 264148 additions and 0 deletions
49
odoo-bringout-oca-ocb-pos_hr_restaurant/README.md
Normal file
49
odoo-bringout-oca-ocb-pos_hr_restaurant/README.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# PoS HR Restaurant
|
||||
|
||||
|
||||
This module adapts the behavior of the PoS when the pos_hr and pos_restaurant are installed.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
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`.
|
||||
|
||||
## 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
|
||||
32
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/ARCHITECTURE.md
Normal file
32
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/ARCHITECTURE.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Architecture
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
U[Users] -->|HTTP| V[Views and QWeb Templates]
|
||||
V --> C[Controllers]
|
||||
V --> W[Wizards – Transient Models]
|
||||
C --> M[Models and ORM]
|
||||
W --> M
|
||||
M --> R[Reports]
|
||||
DX[Data XML] --> M
|
||||
S[Security – ACLs and Groups] -. enforces .-> M
|
||||
|
||||
subgraph Pos_hr_restaurant Module - pos_hr_restaurant
|
||||
direction LR
|
||||
M:::layer
|
||||
W:::layer
|
||||
C:::layer
|
||||
V:::layer
|
||||
R:::layer
|
||||
S:::layer
|
||||
DX:::layer
|
||||
end
|
||||
|
||||
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
|
||||
```
|
||||
|
||||
Notes
|
||||
- Views include tree/form/kanban templates and report templates.
|
||||
- Controllers provide website/portal routes when present.
|
||||
- Wizards are UI flows implemented with `models.TransientModel`.
|
||||
- Data XML loads data/demo records; Security defines groups and access.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Configuration
|
||||
|
||||
Refer to Odoo settings for pos_hr_restaurant. Configure related models, access rights, and options as needed.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Controllers
|
||||
|
||||
This module does not define custom HTTP controllers.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Dependencies
|
||||
|
||||
This addon depends on:
|
||||
|
||||
- [pos_hr](../../odoo-bringout-oca-ocb-pos_hr)
|
||||
- [pos_restaurant](../../odoo-bringout-oca-ocb-pos_restaurant)
|
||||
4
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/FAQ.md
Normal file
4
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/FAQ.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# FAQ
|
||||
|
||||
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
|
||||
- Q: How to enable? A: Start server with --addon pos_hr_restaurant or install in UI.
|
||||
7
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/INSTALL.md
Normal file
7
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/INSTALL.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Install
|
||||
|
||||
```bash
|
||||
pip install odoo-bringout-oca-ocb-pos_hr_restaurant"
|
||||
# or
|
||||
uv pip install odoo-bringout-oca-ocb-pos_hr_restaurant"
|
||||
```
|
||||
12
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/MODELS.md
Normal file
12
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/MODELS.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Models
|
||||
|
||||
Detected core models and extensions in pos_hr_restaurant.
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class pos_order
|
||||
```
|
||||
|
||||
Notes
|
||||
- Classes show model technical names; fields omitted for brevity.
|
||||
- Items listed under _inherit are extensions of existing models.
|
||||
6
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/OVERVIEW.md
Normal file
6
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/OVERVIEW.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Overview
|
||||
|
||||
Packaged Odoo addon: pos_hr_restaurant. Provides features documented in upstream Odoo 16 under this addon.
|
||||
|
||||
- Source: OCA/OCB 16.0, addon pos_hr_restaurant
|
||||
- License: LGPL-3
|
||||
3
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/REPORTS.md
Normal file
3
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/REPORTS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Reports
|
||||
|
||||
This module does not define custom reports.
|
||||
8
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/SECURITY.md
Normal file
8
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/SECURITY.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Security
|
||||
|
||||
This module does not define custom security rules or access controls beyond Odoo defaults.
|
||||
|
||||
Default Odoo security applies:
|
||||
- Base user access through standard groups
|
||||
- Model access inherited from dependencies
|
||||
- No custom row-level security rules
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Troubleshooting
|
||||
|
||||
- Ensure Python and Odoo environment matches repo guidance.
|
||||
- Check database connectivity and logs if startup fails.
|
||||
- Validate that dependent addons listed in DEPENDENCIES.md are installed.
|
||||
7
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/USAGE.md
Normal file
7
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/USAGE.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Usage
|
||||
|
||||
Start Odoo including this addon (from repo root):
|
||||
|
||||
```bash
|
||||
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon pos_hr_restaurant
|
||||
```
|
||||
3
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/WIZARDS.md
Normal file
3
odoo-bringout-oca-ocb-pos_hr_restaurant/doc/WIZARDS.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Wizards
|
||||
|
||||
This module does not include UI wizards.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
|
||||
{
|
||||
'name': 'PoS HR Restaurant',
|
||||
'version': '1.0',
|
||||
'category': 'Hidden',
|
||||
'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.
|
||||
""",
|
||||
'depends': ['pos_hr', 'pos_restaurant'],
|
||||
'auto_install': True,
|
||||
'assets': {
|
||||
'point_of_sale.assets': [
|
||||
'pos_hr_restaurant/static/src/js/**/*.js',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# 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"
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# 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 ""
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import pos_order
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# -*- 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,14 @@
|
|||
/* @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);
|
||||
43
odoo-bringout-oca-ocb-pos_hr_restaurant/pyproject.toml
Normal file
43
odoo-bringout-oca-ocb-pos_hr_restaurant/pyproject.toml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[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"
|
||||
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",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.11"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"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.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/bringout/0"
|
||||
repository = "https://github.com/bringout/0"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.metadata]
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["pos_hr_restaurant"]
|
||||
|
||||
[tool.rye]
|
||||
managed = true
|
||||
dev-dependencies = [
|
||||
"pytest>=8.4.1",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue