Initial commit: Mrp packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 50d736b3bd
739 changed files with 538193 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 Mrp Module - mrp
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 mrp. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,7 @@
# Dependencies
This addon depends on:
- [product](../../odoo-bringout-oca-ocb-product)
- [stock](../../odoo-bringout-oca-ocb-stock)
- [resource](../../odoo-bringout-oca-ocb-resource)

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

View file

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

View file

@ -0,0 +1,41 @@
# Models
Detected core models and extensions in mrp.
```mermaid
classDiagram
class mrp_bom
class mrp_bom_byproduct
class mrp_bom_line
class mrp_document
class mrp_production
class mrp_routing_workcenter
class mrp_unbuild
class mrp_workcenter
class mrp_workcenter_capacity
class mrp_workcenter_productivity
class mrp_workcenter_productivity_loss
class mrp_workcenter_productivity_loss_type
class mrp_workcenter_tag
class mrp_workorder
class procurement_group
class product_product
class product_template
class res_company
class res_config_settings
class stock_lot
class stock_move
class stock_move_line
class stock_picking
class stock_picking_type
class stock_quant
class stock_rule
class stock_scrap
class stock_traceability_report
class stock_warehouse
class stock_warehouse_orderpoint
```
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: mrp. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon mrp
- License: LGPL-3

View file

@ -0,0 +1,48 @@
# Reports
Report definitions and templates in mrp.
```mermaid
classDiagram
class ReportStockRule
AbstractModel <|-- ReportStockRule
class ReplenishmentReport
AbstractModel <|-- ReplenishmentReport
class ReceptionReport
AbstractModel <|-- ReceptionReport
class ReportBomStructure
AbstractModel <|-- ReportBomStructure
```
## Available Reports
### PDF/Document Reports
- **Production Order** (PDF/Print)
- **BoM Overview** (PDF/Print)
- **Finished Product Label (ZPL)** (PDF/Print)
- **Finished Product Label (PDF)** (PDF/Print)
- **Work Order** (PDF/Print)
## Report Files
- **__init__.py** (Python logic)
- **mrp_production_templates.xml** (XML template/definition)
- **mrp_report_bom_structure.py** (Python logic)
- **mrp_report_bom_structure.xml** (XML template/definition)
- **mrp_report_views_main.xml** (XML template/definition)
- **mrp_workorder_templates.xml** (XML template/definition)
- **mrp_zebra_production_templates.xml** (XML template/definition)
- **report_deliveryslip.xml** (XML template/definition)
- **report_stock_forecasted.xml** (XML template/definition)
- **report_stock_reception.py** (Python logic)
- **report_stock_reception.xml** (XML template/definition)
- **report_stock_rule.py** (Python logic)
- **report_stock_rule.xml** (XML template/definition)
- **stock_forecasted.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 mrp.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../mrp/security/ir.model.access.csv)**
- 64 model access rules
## Record Rules
Row-level security rules defined in:
## Security Groups & Configuration
Security groups and permissions defined in:
- **[mrp_security.xml](../mrp/security/mrp_security.xml)**
- 7 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](../mrp/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
- **[mrp_security.xml](../mrp/security/mrp_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 mrp
```

View file

@ -0,0 +1,19 @@
# Wizards
Transient models exposed as UI wizards in mrp.
```mermaid
classDiagram
class ChangeProductionQty
class MrpConsumptionWarning
class MrpConsumptionWarningLine
class MrpImmediateProduction
class MrpImmediateProductionLine
class MrpProductionBackorder
class MrpProductionBackorderLine
class MrpProductionSplit
class MrpProductionSplitLine
class MrpProductionSplitMulti
class StockAssignSerialNumbers
class StockWarnInsufficientQtyUnbuild
```