Initial commit: Sale packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:49 +02:00
commit 14e3d26998
6469 changed files with 2479670 additions and 0 deletions

View 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 Point_of_sale Module - point_of_sale
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.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for point_of_sale. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,17 @@
# Controllers
HTTP routes provided by this module.
```mermaid
sequenceDiagram
participant U as User/Client
participant C as Module Controllers
participant O as ORM/Views
U->>C: HTTP GET/POST (routes)
C->>O: ORM operations, render templates
O-->>U: HTML/JSON/PDF
```
Notes
- See files in controllers/ for route definitions.

View file

@ -0,0 +1,8 @@
# Dependencies
This addon depends on:
- [stock_account](../../odoo-bringout-oca-ocb-stock_account)
- [barcodes](../../odoo-bringout-oca-ocb-barcodes)
- [web_editor](../../odoo-bringout-oca-ocb-web_editor)
- [digest](../../odoo-bringout-oca-ocb-digest)

View 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 point_of_sale or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-ocb-point_of_sale"
# or
uv pip install odoo-bringout-oca-ocb-point_of_sale"
```

View file

@ -0,0 +1,44 @@
# Models
Detected core models and extensions in point_of_sale.
```mermaid
classDiagram
class pos_bill
class pos_category
class pos_config
class pos_order
class pos_order_line
class pos_pack_operation_lot
class pos_payment
class pos_payment_method
class pos_session
class report_point_of_sale_report_saledetails
class account_bank_statement_line
class account_cash_rounding
class account_chart_template
class account_journal
class account_move
class account_move_line
class account_payment
class account_tax
class barcode_rule
class digest_digest
class procurement_group
class product_product
class product_template
class res_company
class res_config_settings
class res_partner
class stock_move
class stock_picking
class stock_picking_type
class stock_rule
class stock_warehouse
class uom_category
class uom_uom
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: point_of_sale. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon point_of_sale
- License: LGPL-3

View file

@ -0,0 +1,28 @@
# Reports
Report definitions and templates in point_of_sale.
```mermaid
classDiagram
class PosOrderReport
Model <|-- PosOrderReport
class PosInvoiceReport
AbstractModel <|-- PosInvoiceReport
```
## Available Reports
No named reports found in XML files.
## Report Files
- **__init__.py** (Python logic)
- **pos_invoice.py** (Python logic)
- **pos_order_report.py** (Python logic)
## Notes
- Named reports above are accessible through Odoo's reporting menu
- Python files define report logic and data processing
- XML files contain report templates, definitions, and formatting
- Reports are integrated with Odoo's printing and email systems

View file

@ -0,0 +1,42 @@
# Security
Access control and security definitions in point_of_sale.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../point_of_sale/security/ir.model.access.csv)**
- 56 model access rules
## Record Rules
Row-level security rules defined in:
## Security Groups & Configuration
Security groups and permissions defined in:
- **[point_of_sale_security.xml](../point_of_sale/security/point_of_sale_security.xml)**
- 2 security groups defined
```mermaid
graph TB
subgraph "Security Layers"
A[Users] --> B[Groups]
B --> C[Access Control Lists]
C --> D[Models]
B --> E[Record Rules]
E --> F[Individual Records]
end
```
Security files overview:
- **[ir.model.access.csv](../point_of_sale/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
- **[point_of_sale_security.xml](../point_of_sale/security/point_of_sale_security.xml)**
- Security groups, categories, and XML-based rules
Notes
- Access Control Lists define which groups can access which models
- Record Rules provide row-level security (filter records by user/group)
- Security groups organize users and define permission sets
- All security is enforced at the ORM level by Odoo

View file

@ -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.

View 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 point_of_sale
```

View file

@ -0,0 +1,11 @@
# Wizards
Transient models exposed as UI wizards in point_of_sale.
```mermaid
classDiagram
class PosCloseSessionWizard
class PosDetails
class PosMakePayment
class PosSessionCheckProductWizard
```