MAGETECH ERP
Technical Design & Architecture Document
www.magetechsol.com
I Introduction & Document Control
1. Document Purpose
This document is the complete, professional, enterprise-grade technical specification for MageTech ERP, a customized ERP platform built on Odoo as its foundation.
It is written for:
- Software Architects, Backend Developers, Odoo Developers, Frontend Developers
- Database Administrators, DevOps Engineers, QA Engineers
- Project Managers, System Administrators, Technical Support Teams
- Future Maintenance Teams
It explains how MageTech ERP is designed, developed, configured, secured, deployed, tested, monitored, maintained, and extended, at sufficient technical depth that a new developer can continue development without depending entirely on the original team.
2. Product Overview
| Product Name | MageTech ERP |
|---|---|
| Company | MageTech Solutions |
| Product Category | ERP & Business Management Platform |
| Platform | Odoo ERP (Community Edition, v19) |
| Product Type | Enterprise Business Management / SaaS-ready / ERP |
| Website | www.magetechsol.com |
Product objective — centralize the organization's core business domains into one unified platform:
- CRM · Sales · Customers · Projects · Tasks · Timesheets · Finance & Invoicing · Expenses
- Inventory · Purchasing · Employees · Attendance · Leave · Recruitment
- Marketing · Customer Support · Documents · Business Intelligence
3. Document Scope
This document covers, in order: System Architecture, Technology Stack, Odoo Architecture, Custom Module Architecture, Database Architecture, Application Architecture, Frontend Architecture, Backend Architecture, API Architecture, Authentication, Authorization, Security, Multi-company architecture, Data flow, Business workflows, AI architecture, Reporting architecture, File/document management, Notification architecture, Email architecture, Deployment, DevOps, CI/CD, Backup, Monitoring, Logging, Testing, Performance, Scalability, Disaster recovery, Maintenance, Troubleshooting, Development standards, Coding standards, and the Future roadmap.
An executive summary of the current state follows. The full layered architecture is detailed in Part II.
magetech_base (company, settings, roles, users, audit log, menus), magetech_theme (branded webclient shell, design system, dark/light mode, login branding), magetech_dashboard (executive dashboard), and magetech_demo (idempotent demo data). The platform runs on PostgreSQL and is designed to be deployed behind Nginx in production.II System & Technical Architecture
4. High-Level System Architecture Implemented Recommended
MageTech ERP is designed as a layered architecture.
Layer 1 — Presentation Layer
Web UI, responsive UI, dashboard, forms, kanban, list views, calendar, Gantt, reports, notifications, mobile-responsive interfaces.
Technology: Odoo Web Client, OWL framework, JavaScript, XML templates, SCSS/CSS.
Layer 2 — Application Layer
Business logic: Odoo ORM, Python, business models, services, scheduled jobs, workflow logic, validation, automation.
Layer 3 — Integration Layer
Communication with external services: REST APIs, webhooks, payment gateways, email/SMS/WhatsApp providers, AI APIs, cloud storage, accounting integrations, third-party services. Planned
Layer 4 — Data Layer
Primary database PostgreSQL — business data, user data, transactions, configuration, audit information, attachment metadata.
Layer 5 — Infrastructure Layer
Linux server, PostgreSQL, Odoo application server, Nginx, SSL/TLS, Redis (where required), object storage (where required), monitoring, backup infrastructure. Recommended (production)
5. Architecture Diagram
End-to-end data flow as deployed today (Implemented) with production targets marked (Recommended):
6. Technology Stack
Every technology is marked Required (actually used/required), Recommended, or Optional. Nothing is invented.
| Concern | Technology | Status | Notes |
|---|---|---|---|
| Backend | Python | Required | Odoo 19 runtime (Python 3.x) |
| Framework | Odoo Framework + ORM | Required | Community Edition, v19 |
| Database | PostgreSQL | Required | primary relational store |
| Frontend | Odoo Web Client, OWL, JavaScript, XML, SCSS/CSS | Required | OWL components used in dashboard/sidebar |
| Web Server | Nginx | Recommended | reverse proxy + static files + TLS termination |
| Operating System | Ubuntu Linux LTS | Recommended | production target |
| Containerization | Docker | Optional | where appropriate |
| Version Control | Git (GitHub/GitLab/Bitbucket) | Required | Git in use today; remote host TBD |
| CI/CD | GitHub Actions or GitLab CI | Planned | pipeline designed, not yet provisioned |
| Monitoring | Prometheus + Grafana; Sentry | Recommended | production readiness |
| Cache (optional) | Redis | Optional | for sessions/cache/queues when needed |
| Object Storage | Cloud object storage (signed URLs) | Recommended | filestore offloading |
7. Odoo Architecture
Odoo is a modular low-code ERP framework. MageTech extends it without modifying core files. Key Odoo concepts in use:
- Modules — versioned addons with
__manifest__.py, models, views, data, security, assets. - Models / Fields — Python classes inheriting
models.Model; fields declared in class attributes (e.g.magetech.audit.log). - Views —
form,list,kanban,calendar,dashboard(OWL client action) etc. - Actions — window actions, client actions (used by the executive dashboard), server actions, automated actions.
- Menus — hierarchical
ir.ui.menustructure (MageTech sidebar uses a custom OWL menu). - Controllers — HTTP endpoints on the Odoo HTTP layer (REST/JSON-RPC/XML-RPC).
- ORM —
env-based record sets,search/create/write/unlink, computed & related fields, constraints. - Security —
ir.model.access.csv(ACLs) and record rules for row-level access. - Scheduled Actions — server-side cron jobs (e.g. reminders).
- QWeb Reports — HTML/PDF reports; Email Templates — QWeb bodies for transactional mail.
- Server Actions / Automated Actions — model actions & rules triggering on record event.
- Configuration Settings —
res.config.settingspages for business configuration.
res.groups roles, magetech.audit.log model + ACLs, res.config.settings extensions, company record, custom menus, custom OWL sidebar + dashboard client action, SCSS/JS asset bundles.8. Custom Module Architecture
Recommended MageTech module set. Implemented modules ship today; the rest are Planned.
| Module | Status | Purpose / Notes |
|---|---|---|
magetech_base | Implemented | Company branding, settings, groups/roles, demo users, audit log, sidebar menu skeleton |
magetech_theme | Implemented | Corporate webclient shell, design system, dark/light mode, login branding, favicon, quick-create |
magetech_dashboard | Implemented | Executive dashboard (KPIs, charts, table, timeline) as OWL client action |
magetech_demo | Implemented | Idempotent demo dataset (customers, leads, projects, employees, products, sale orders) |
magetech_crm | Planned | CRM extensions on top of Odoo CRM |
magetech_sales | Planned | Sales pipeline & quotation workflows |
magetech_projects | Planned | Projects, milestones, tasks, timesheets, budgets |
magetech_finance | Planned | Invoicing, payments, expenses, reports |
magetech_hr | Planned | Employees, departments, attendance, leave, payroll |
magetech_inventory | Planned | Warehouses, locations, stock moves, valuation |
magetech_purchase | Planned | Vendors, purchase orders, RFQ workflows |
magetech_support | Planned | Helpdesk/support tickets, SLA, escalation |
magetech_documents | Planned | Document categories, versioning, retention |
magetech_ai | Planned | AI-assisted features (see Part IV) |
magetech_reports | Planned | Domain report packs & exports |
magetech_mobile | Planned | Mobile-first experiences / future apps |
magetech_integrations | Planned | Payment, email/SMS, WhatsApp, cloud storage |
Each module documents (where applicable): purpose, dependencies, models, views, controllers, security, reports, scheduled actions, external integrations, main workflows. Dependency graph today:
9. Standard Module Structure
magetech_crm/
│
├── __init__.py
├── __manifest__.py
│
├── models/
│ ├── __init__.py
│ ├── lead.py
│ └── customer.py
│
├── views/
│ ├── lead_views.xml
│ └── customer_views.xml
│
├── security/
│ ├── ir.model.access.csv
│ └── security.xml
│
├── data/
│ └── data.xml
│
├── demo/
│ └── demo.xml
│
├── reports/
│ └── report.xml
│
├── controllers/
│ └── main.py
│
├── static/
│ └── src/
│ ├── js/
│ ├── css/
│ └── xml/
│
└── README.md
| Directory / File | Responsibility |
|---|---|
__init__.py | Python package loader |
__manifest__.py | Module metadata, dependencies, data files, assets, hooks |
models/ | ORM model classes and business logic |
views/ | Architecture/UI XML (views, actions, menus, settings) |
security/ | ir.model.access.csv ACLs and XML groups/rules |
data/ | Configuration/supporting data (functions, defaults, mail templates) |
demo/ | Demo data loaded only when demo mode is enabled |
reports/ | QWeb report templates and report actions |
controllers/ | HTTP controllers / custom endpoints |
static/src/ | Frontend assets: JS (OWL), SCSS/CSS, XML/QWeb components; bundled via web.assets_backend/web.assets_frontend |
README.md | Module usage and maintenance notes |
The Implemented modules follow this layout. Notable current structures: magetech_base uses security/, models/, views/, data/, demo/, static/description; magetech_theme uses static/src/scss|js|sidebar|webclient|quickcreate|fonts|img plus data/theme_templates.xml (QWeb overrides); magetech_dashboard uses static/src/dashboard (OWL component) and static/src/lib/chart.umd.min.js; magetech_demo uses hooks.py + post_init_hook.
10. Database Architecture
PostgreSQL is the primary database. Odoo manages schema generation from model definitions (data-driven ORM); the DBA role is mostly performance, backup, and indexes.
- Odoo standard tables —
res_partner,res_users,res_groups,product_product,sale_order,account_move,project_project,hr_employee,ir_model,ir_attachment,mail_message, etc. - Custom models — e.g.
magetech_audit_log(audit log),res_config_settingsextensions; all are normal Odoo tables with a surrogateidand ORM-managed relation columns. - Relationships — one2many / many2one / many2many fields become foreign-key and M2M junction tables.
- Indexing — Odoo auto-creates indexes for typical lookups; add explicit
index=TrueorCONSTRAINTwhere query paths require it. Recommended: review slow queries onsearchpaths. - Constraints — model
_sql_constraintsenforce uniqueness/integrity. - Transactions — ORM wraps requests in transactions; commit on success, rollback on exception.
- Referential integrity — enforced by PostgreSQL (FK constraints created from relational fields).
11. Entity Relationship Model
Core business entities and their cardinality. This is the target model — items marked Planned are not yet implemented.
- id (PK)
- login, password_hash
- active (bool)
- groups_ids → M2N res.groups
- id (PK)
- name, work_email
- department_id → hr.department (N:1)
- user_id → res.users (1:1)
- id (PK)
- name, is_company
- email, city, country_id
- customer_rank
- id (PK)
- name, type (lead/opportunity)
- expected_revenue
- stage_id → crm.stage
- partner_id → res.partner
- id (PK)
- name, list_price
- type (service/…)
- categ_id → product.category
- id (PK)
- amount_total
- partner_id → res.partner
- order_line → 1:N sale.order.line
- id (PK)
- move_type, amount_total
- partner_id → res.partner
- invoice_origin → sale.order
- id (PK)
- amount, payment_type
- partner_id → res.partner
- move_id → account.move
- id (PK)
- name, description
- task_ids → 1:N project.task
- id (PK)
- name, state
- project_id → project.project (N:1)
- user_ids → M2N res.users
- id (PK)
- unit_amount, date
- task_id → project.task
- employee_id → hr.employee
- id (PK)
- name, total_amount, state
- employee_id → hr.employee
- id (PK)
- is_company, supplier_rank
- id (PK)
- amount_total, state
- partner_id → vendor
- id (PK)
- name
- picking/order links
- id (PK)
- date_from, date_to, state
- employee_id → hr.employee
- id (PK)
- check_in, check_out
- employee_id → hr.employee
- id (PK)
- name, stage, priority
- partner_id → customer
- user_id → agent
- id (PK)
- file_name, res_model, res_id
- version / category
Relationship notes: Customers hold 1:N leads/orders/invoices/payments. Projects hold 1:N tasks. Tasks hold N:N assignees and 1:N timesheets. One presence of each planned (non-implemented) entity is explicitly flagged; the dashboard today reads real Odoo records (partners, leads, projects, employees, sale orders) — no hard-coded production values.
III Business Workflows & Modules
12. CRM Architecture
Lead lifecycle (Odoo CRM):
| Capability | Status | Notes |
|---|---|---|
| Lead creation | Implemented | via standard CRM + demo seeding |
| Lead assignment | Implemented | user_id assignment model |
| Lead scoring, follow-up, activities, opportunity & customer conversion, pipeline | Implemented | core Odoo CRM workflows; scoring varies by stage expectation to be configured |
| AI-assisted lead scoring | Planned | see §27–28 |
13. Sales Architecture
| Concern | Status | Notes |
|---|---|---|
| Quotation → Sales Order → Invoicing → Payment | Implemented | standard Odoo sale_management/account flows |
| Product pricing, discounts, taxes, pricelists, payment terms | Recommended | configuration to be completed per business; taxes depend on accounting localization |
| Approval workflows | Planned | double-pricing/approval rules via Odoo settings |
14. Project Management Architecture
Projects → Milestones Planned → Tasks → Development → Testing → Review → Completed.
| Capability | Status | Notes |
|---|---|---|
| Projects, tasks, subtasks, assignments, deadlines | Implemented | Odoo project module + demo tasks |
| Milestones | Planned | subtask/dependency model planned |
| Timesheets | Planned | enable analytics in config |
| Budgets & progress | Planned | planned |
15. Finance Architecture
- Customers, Vendors, Invoices, Bills, Payments, Expenses, Taxes, Accounts, Financial reports.
- Integration with Odoo Accounting:
account.movedrives invoices/bills; payments reconcile viaaccount.payment.
16. HR Architecture
Employees, Departments, Attendance, Leave, Recruitment, Payroll (if enabled).
Hierarchy: Company → Department → Manager → Employee.
| Capability | Status | Notes |
|---|---|---|
| Employees, departments | Implemented | hr module + 20 demo employees; role-group mapping |
| Attendance, leave | Planned | module planned |
| Recruitment, payroll | Planned | planned / if enabled |
17. Inventory Architecture
Products, product categories, warehouses, locations, stock moves, purchase, sales, inventory valuation. Stock movement lifecycle: Creation → Reservation → Transfer → Done. Planned: full magetech_inventory warehouse/location workflows; inventory valuation configuration Recommended.
18. Support Architecture
Tickets, customers, agents, priorities, SLA, status, resolution, escalation.
Planned: magetech_support module (or Odoo Helpdesk) with SLA timers and escalation rules.
19. Document Management
- File uploads, attachments (
ir.attachment), document categories, access permissions, versioning, lifecycle, retention, backup.
Planned: dedicated document categories + versioning + retention workflow; store attachments in object storage with signed URLs Recommended.
IV Cross-Cutting Capabilities
20. Notification Architecture
- In-app notifications (Odoo message bus) — Implemented via
mail. - Email notifications, activity reminders, scheduled notifications — Implemented core; channel/SMTP config is Recommended.
- Push notifications — Planned.
Examples to configure: invoice-due reminder, task assignment, leave approval, project deadline, lead follow-up.
21. Email Architecture
- SMTP configuration, email templates, transactional & notification emails, password reset, invoice/quotation emails.
Status: core email framework Implemented; outbound SMTP provider and template inventory Recommended.
22. API Architecture
For every API, document: Endpoint, Method, Authentication, Request, Response, Validation, Error response, Permissions, Rate limiting.
| Endpoint (target) | Method | Auth | Status |
|---|---|---|---|
GET /api/v1/customers | GET | API key / session | TBD |
POST /api/v1/customers | POST | API key / session | TBD |
GET /api/v1/customers/{id} | GET | API key / session | TBD |
PUT /api/v1/customers/{id} | PUT | API key / session | TBD |
DELETE /api/v1/customers/{id} | DELETE | Admin / Manager | TBD |
Native Odoo APIs available today: JSON-RPC (/jsonrpc), XML-RPC (/xmlrpc/2/db, /xmlrpc/2/common, /xmlrpc/2/object), and the web controllers (/web/login, /web/session etc.) — Implemented by the framework. MageTech custom APIs and third-party APIs are TBD/Planned.
23. Authentication
Flow: user opens /web/login → submits credentials → Odoo validates via password hash (PBKDF2-SHA512 by default) → session cookie issued → session tracked/expired server-side.
- Login, logout, password reset — Implemented (branded login page).
- Session handling (cookies, expiry) — Implemented by Odoo.
- Password policies & account lockout — Recommended (enable via system parameters / MFA server).
- Multi-factor authentication — Recommended (Odoo Enterprise feature; MFA planned for
magetech_base).
24. Authorization (Role-Based Access Control)
Roles are implemented as custom res.groups in magetech_base Implemented:
| Role | Internal group | Implies | Notes |
|---|---|---|---|
| Super Administrator | group_magetech_super_admin | base.group_system | Highest level; admin user auto-linked |
| Management | group_magetech_management | base.group_user | Cross-domain visibility (planned rules) |
| Sales Manager | group_magetech_sales_manager | base.group_user | CRM/Sales ownership |
| Project Manager | group_magetech_project_manager | base.group_user | Project/task management |
| Finance Manager | group_magetech_finance_manager | base.group_user | Accounting/invoicing controls |
| HR Manager | group_magetech_hr_manager | base.group_user | Employee/leave management |
| Employee | group_magetech_employee | base.group_user | Base user level |
Access is enforced through Groups, ACLs (ir.model.access.csv), and Record Rules (row-level). Company-level and department-level access rules for the new domains are Planned.
25. Multi-Company Architecture
The platform is designed so each company can have separate users, accounting, customers, products, warehouses, documents, and configuration Recommended.
Odoo's native multi-company mechanism is used: company_id on records, allowed_company_ids on the session, company-scoped record rules, and ir.config_parameter by company where supported. No code changes are required for the base pattern; domain modules will respect company_id.
26. Multi-Tenancy (SaaS)
| Model | Advantages | Limitations | Security / Backup / Scale |
|---|---|---|---|
| Database-per-tenant | Hard isolation; simple backup/restore per tenant; clear data ownership | More infra per tenant; migration between DBs needed | Strongest isolation; per-DB backup; horizontal scale by sharding DBs |
| Schema-per-tenant | Single server, isolated schemas | Complex ORM mapping (Odoo does not natively support); higher ops complexity | Moderate isolation; mixed backup; tricky migrations |
| Shared DB + company isolation | Lowest cost; Odoo-native | Weakest isolation; record rules must be flawless | Relies on record rules; single backup; vertical then horizontal scale |
27. AI Architecture Planned
MageTech AI may provide: AI Lead Scoring, AI Sales Assistant, AI Customer Summary, AI Project Risk Detection, AI Business Summary.
Design considerations: AI provider, API integration, authentication, prompt management, data privacy, token usage, error handling, rate limits, logging, cost control.
28. AI Data Flow
AI-generated results must be clearly identified where appropriate. Business-critical decisions must not rely solely on AI output.
29. Dashboard Architecture Implemented
The executive dashboard is an OWL client action (magetech_dashboard.MagetechDashboard) loaded through ir.actions.client (tag: magetech_dashboard.main), reading real Odoo records via an RPC/ORM service.
- KPIs: Revenue, Outstanding, Active Projects, New Leads (counts/pipelines computed from records).
- Charts: Revenue Trend (Chart.js line) and Sales Pipeline (funnel).
- Below: Top Customers table and Recent Activity timeline.
- States: loading skeleton, error (with Retry), empty, ready.
sale.order/opportunity/project/employee data (demo or real). Hard-coded production dashboard values are prohibited.30. Reporting Architecture
- Sales, Revenue, Finance, CRM, Project, HR, Inventory, Marketing reports.
- Each report should support date filters, user filters, company filters, export, PDF, and Excel/CSV where supported.
Recommended: build with QWeb (PDF) + pivot/list exports (XLSX/CSV) over the reporting module. Planned: magetech_reports domain packs.
V Frontend Architecture & UX
31. Frontend Architecture Implemented
- Odoo frontend architecture and OWL for custom components (sidebar, dashboard, quick-create).
- Components, services, state management, templates, assets, JS modules, CSS/SCSS, responsive design.
- Asset bundles:
web.assets_backend(theme+sidebar+dashboard) andweb.assets_frontend(login).
Reusable component pattern Recommended: KPI cards (built), charts (built), tables (built), filters/modals/notifications/command palette/timeline/status badges (reusable on roadmap).
32. UI/UX Design System
The MageTech design system is implemented in magetech_theme SCSS using CSS custom properties Implemented:
| Token family | Values (implemented) |
|---|---|
| Primary brand | Orange #F97316 (hover #EA580C) |
| Secondary / navy | Navy #0F2B5B, dark navy #0B1F3A |
| Accent blue | #1565D8 (hover #0F56BD) |
| Surfaces | App bg #F6F8FC, surface white, border #E2E8F0 |
| Text | Primary #172033, secondary #64748B |
| Status | Success #16A34A, warning #F59E0B, error #DC2626, info #2563EB |
| Module colors | CRM violet, Sales blue, Finance green, HR orange, Projects purple, Inventory cyan, Purchase pink, Reporting amber, Operations deep orange, Marketing indigo |
Covers: colors, typography (Inter, bundled locally), spacing, buttons, cards, forms, tables, icons (FontAwesome), modals, alerts, status badges, dark mode (persisted preference), responsive rules. Modern, corporate, premium, consistent.
33. Animation Guidelines Recommended Implemented
Subtle professional animations: page transitions, card hover (implemented in KPI/kanban), KPI counters, chart animations (Chart.js, implemented), modal transitions, notification animations, loading skeletons (implemented), progress animations. Animations must not interfere with accessibility or performance; respect prefers-reduced-motion.
VI Security, Data Protection & Continuity
34. Security Architecture
Application Layer
- Authentication (session/password hashing), authorization (ACLs + record rules), input validation (ORM +
_check), CSRF protection (Odoo CSRF token on forms).
Database Layer
- Credentials with least privilege, encryption at rest where applicable, secured backups.
Network Layer
- HTTPS (Nginx + TLS), firewall, reverse proxy, restricted ports (8069 internal only).
Infrastructure Layer
- SSH hardening (keys only), OS patching, secrets management, monitoring.
Recommended: all production layers; local dev is per §41.
35. Data Protection
- Data classification, sensitive-information handling, access control, encryption, backup, retention, deletion, audit logs.
- Follow applicable Indian data-protection requirements and contractual obligations where relevant.
36. Audit Logging Implemented
An audit log model magetech.audit.log exists with access rules Implemented:
| Access rule | Read | Write | Create | Delete |
|---|---|---|---|---|
Odoo Admin (base.group_system) | ✓ | ✓ | ✓ | ✓ |
| Super Administrator | ✓ | ✓ | ✓ | ✓ |
| Management | ✓ | — | — | — |
Target events (capture as they occur): login, logout, record creation/modification/deletion, permission changes, configuration changes, financial changes. Each audit entry should record user, action, record, timestamp, relevant metadata.
37. File Storage
Attachment storage options: local filesystem Implemented (default filestore), object storage, cloud storage Recommended. Production target: Odoo → Object Storage using secure signed (pre-signed) URLs where appropriate.
38. Backup Architecture
Back up: PostgreSQL database, filestore, configuration (odoo.conf, env), custom modules (Git), deployment configuration.
| Item | Recommendation |
|---|---|
| Frequency | Daily full DB + filestore; continuous WAL (PgBouncer/WAL archiving) in production Recommended |
| Retention | e.g. 30 days daily, 12 monthly, 7 yearly (TBD) |
| Encryption | Encrypted backups at rest (TBD tooling) |
| Off-site storage | Push encrypted copies to a second region/bucket |
| Restore testing | Quarterly restore drills; documented runbook |
39. Disaster Recovery
Targets (to confirm with business): RPO ≤ 24h daily backups (stretch: minutes with WAL), RTO ≤ 4h (TBD). Restoration order: restore PostgreSQL → filestore → config → application (modules from Git) → verify login/financial books → DNS/SSL as applicable. A full DR procedure is Recommended.
VII Deployment, DevOps & Operations
40. Deployment Architecture
Staging and production are documented separately in §41. Development currently runs on Windows with a local Python venv; production target is Ubuntu Linux + Nginx.
41. Environments
| Environment | Purpose | Status |
|---|---|---|
| Development | Local coding on --dev=assets, odoo.log output | Implemented (this workspace) |
| Testing / QA | Automated + manual test runs | Planned |
| Staging | Production-like validation | Planned |
| Production | Live business environment | Planned |
42. CI/CD Planned
43. Version Control Implemented
Git is in use on this repository. Recommended branching strategy:
main
develop
feature/*
bugfix/*
release/*
hotfix/*
- Commit conventions: concise conventional messages; one logical change per commit.
- Pull requests with code review before merge to
main. - Version tags (
v1.0.0...) aligned to moduleversionfields.
44. Testing Strategy
- Unit Testing — models and functions (Odoo test framework).
- Integration Testing — module interactions.
- API Testing — endpoint contracts (once APIs exist).
- UI Testing — frontend/flows (Playwright available in the toolchain).
- Security Testing — permissions and vulnerability review.
- Performance Testing — expected workloads.
- User Acceptance Testing — business validation.
Status: baseline QA via manual + scripted browser verification Implemented; full automated suite Planned.
45. Test Case Documentation
Each case: Test ID, Description, Preconditions, Steps, Expected result, Actual result, Status.
| Test ID | Description | Preconditions | Steps (summary) | Expected | Status |
|---|---|---|---|---|---|
| TC-01 | Login | User exists | Open /web/login, enter creds, submit | Redirect to app shell | Passed |
| TC-02 | Customer creation | Sales rights | Create partner, save | Record visible in partners | Passed |
| TC-03 | Lead creation | CRM module | Create crm.lead | Lead in pipeline | Passed |
| TC-04 | Quotation | Product + partner | Create SO (draft), add lines, confirm | Quotation → Sales Order | Passed |
| TC-05 | Invoice | Confirmed SO | Create invoice, validate | Posted invoice | TBD |
| TC-06 | Payment | Posted invoice | Register payment | Invoice paid | TBD |
| TC-07 | Project creation | Project rights | Create project | Project listed | Passed |
| TC-08 | Task assignment | Project exists | Create task, assign user | Assignment saved | Passed |
| TC-09 | Employee creation | HR rights | Create hr.employee | Employee listed | Passed |
| TC-10 | Leave request | HR module | Create hr.leave | Leave in validation flow | TBD |
| TC-11 | Expense approval | HR expense | Create + approve expense | Approved/rejected per policy | TBD |
| TC-12 | Inventory transaction | Stock module | Receive/deliver goods | Stock move done | TBD |
| TC-13 | Report generation | Data present | Run QWeb report | PDF rendered | TBD |
| TC-14 | Permissions | Multiple groups | Attempt cross-role access | Denied as configured | TBD |
46. Performance Architecture
- Database indexing, query optimization, pagination, caching (Odoo asset/field caching), asset optimization (bundles, SCSS compile), background jobs (cron workers), worker configuration.
- Avoid loading large datasets unnecessarily (dashboard uses aggregated reads).
Status: progressive improvements Recommended; baseline acceptable at current data volumes.
47. Scalability
Horizontal scaling (multi-worker/multi-instance behind LB), vertical scaling (CPU/RAM), database scaling (optimized queries → read replicas/PCI), worker scaling, file-storage scaling (object storage). Recommended for production.
48. Monitoring
Monitor server CPU, memory, disk, database, Odoo workers, request latency, error rates, background jobs, backup status. Define alerts for critical conditions (e.g., 5xx rate, disk > 85%, worker saturation, backup failure). Tooling: Prometheus + Grafana, app error tracking Sentry Recommended.
49. Logging
Centralize Odoo logs, Nginx logs, PostgreSQL logs, application errors, security events.
50. Environment Variables
Provide .env.example (not .env) in the repository; never commit secrets.
# .env.example — copy to .env and fill with real values. NEVER commit .env
ODOO_DB_HOST=127.0.0.1
ODOO_DB_PORT=5432
ODOO_DB_USER=change_me
ODOO_DB_PASSWORD=change_me
ODOO_ADMIN_PASSWORD=change_me
SMTP_HOST=change_me
SMTP_PORT=587
SMTP_USERNAME=change_me
SMTP_PASSWORD=change_me
AI_API_KEY=change_me # only if AI enabled
STORAGE_ACCESS_KEY=change_me # only if object storage used
STORAGE_SECRET_KEY=change_me
51. Configuration Management
Separate application configuration, environment configuration, secrets, and business configuration. Do not hard-code production settings. Locally, odoo.conf holds dev connection values; production uses env-injected secrets.
VIII Demo Data, Migration & Standards
52. Sample Data Implemented
The magetech_demo module seeds DEMO data idempotently via a post_init_hook (hooks.py). Every record set is clearly informational/demo — no production data.
| Dataset | Count | Sample entries (actual seeded values) |
|---|---|---|
| Customers (companies) | 20 | Tata Digital Workspaces, Delhi Logistics Hub, Nimblecloud Infotech, GlobalSprint Solutions, ArrowAuto Components, Heritage Retail Group, VertexMed Devices, GreenGrid Energy, Royal Textile Exports, NorthBeam Electronics, OrangeFarm AgriTech, Kerala Spice Exporters, SaffronAI Analytics, DiamondCity Jewels, TexPro Garments, Himalaya Constructs, Sunshine Hospitality, MarinePort Shipping, MadhyaBio Pharma, GangaMart Retail |
| Contacts (people) | 12 | Rahul Verma, Sneha Kulkarni, Manoj Tripathi, Pooja Bhatt, Karthik Reddy, Neha Gupta, Suresh Pillai, Divya Menon, Arnav Jain, Tanvi Shah, Nikhil Rao, Lakshmi Devi |
| Leads / opportunities | 50 | Templates: "Website inquiry – ERP demo", "Referral – Anand & Sons", "Trade show – SaasCon", "LinkedIn outreach", "Cold email campaign", "Partner referral", "Website inquiry – POS", "Trade show – NASSCOM", "Referral – BluePeak", "Product demo request" |
| Projects | 10 | ERP rollout – Tata Digital, CRM migration – Nimblecloud, Dashboard build – GlobalSprint, Inventory automation – ArrowAuto, Website revamp – Heritage Retail, Field service app – VertexMed, Billing integration – GreenGrid, Analytics stack – SaffronAI, Portal build – Royal Textile, Onboarding support – GangaMart |
| Employees | 20 | Aarav Kapoor, Diya Sharma, Rohan Mehta, Ishita Rao, Kabir Singh, Ananya Iyer, Vihaan Patel, Myra Joshi, Advik Gupta, Sara Das, Arjun Menon, Navya Nair, Vivaan Kohli, Kavya Reddy, Ayaan Shah, Riya Bose, Shaurya Yadav, Anika Mishra, Aaradhya Nayak, Reyansh Kulkarni |
| Products | 5 | MageTech ERP License (User/Yr) ₹12,000; Implementation Day ₹8,000; Custom Report Build ₹15,000; Annual Support Plan ₹24,000; BI Dashboard Pack ₹30,000 |
| Sales orders | 12 | Generated across sample customers with product lines; feed dashboard Revenue KPI |
53. Data Migration
Possible sources: Excel, CSV, existing CRM, existing accounting software, existing ERP. TBD until a source is confirmed. Never directly import unvalidated production data.
54. Third-Party Integrations
Integration architecture for: payment gateway, email, SMS, WhatsApp, Google services, Microsoft services, AI providers, cloud storage.
For each: purpose, API, authentication, data exchanged, failure handling, rate limits, security. All currently Planned/TBD — none are wired into production yet.
55. Error Handling
User-facing errors must be clear. Example: "Unable to create invoice" — "Please verify the customer and invoice details and try again." Technical errors are logged internally.
Never expose stack traces, database errors, API keys, or internal paths to normal users.
56. API Error Format
Consistent API response contract (target):
// Failure
{
"success": false,
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "Customer could not be found."
}
}
// Success
{
"success": true,
"data": {}
}
57. Development Coding Standards
| Language | Standards |
|---|---|
| Python | PEP 8, Odoo conventions, meaningful names, small reusable methods, proper documentation |
| JavaScript | Modular code, clear naming, reusable components, no unnecessary global state (OWL) |
| XML | Consistent formatting, meaningful IDs (module-prefixed record ids), proper inheritance |
| SCSS | Reusable variables (CSS custom properties), component-based styles, avoid excessive overrides |
58. Odoo Development Rules
- Avoid modifying Odoo core files.
- Use inheritance (
_inherit/ QWebxpathwithhasclass()). - Use custom modules for all changes.
- Use ORM methods rather than raw SQL (except where strictly necessary).
- Define proper access rights.
- Define record rules for row-level security.
- Add module dependencies correctly in
__manifest__.py. - Provide upgrade scripts when necessary.
- Keep business logic server-side.
- Avoid hard-coded configuration.
IX Administration, Usage & Troubleshooting
59. Administration Guide
- Creating users, assigning roles, creating companies, configuring email, accounting, warehouses, products, managing permissions, managing backups, monitoring system health.
- Role assignment uses the groups from §24; admin console at
/web#action=base_setup.act_base_settings.
60. User Guide Structure
| Audience | Sections |
|---|---|
| Management | Dashboard, Reports, Approvals |
| Sales | CRM, Leads, Quotations, Orders |
| Finance | Invoices, Payments, Expenses |
| HR | Employees, Attendance, Leave |
| Project Team | Projects, Tasks, Timesheets |
| Operations | Inventory, Purchasing |
61. Troubleshooting Guide
| Issue | Cause / Diagnosis | Solution | Verification |
|---|---|---|---|
| Odoo not starting | Port in use, missing config, import error. Check odoo.log. | Free port 8069; validate odoo.conf; traceback in log | Server responds on /web/login |
| PostgreSQL connection failure | Service down, wrong host/user/password | Start postgresql-x64 service; verify `db_user`/`db_password` | psql -U odoo -c 'select 1' |
| Database authentication failure | Password mismatch or pg_hba rule | Reset DB password; check pg_hba.conf | Login to /web works |
| Email not sending | SMTP misconfig / blocked port | Configure outgoing mail server in settings | Send test email |
| Module installation failure | Missing dependency / data error | Fix deps in manifest; check log traceback | Module listed installed |
| Permission denied | Missing ACL/rules | Add ir.model.access or record rules | Access succeeds for role |
| Slow dashboard | Heavy aggregated queries, no index | Optimize queries/indexes; paginate | Load < target ms |
| Scheduled jobs not running | Cron not triggered / workers limited | Verify cron rules, worker model | Job timestamps update |
| File upload failure | Filestore permission/size limit | Fix filestore perms; adjust limits | Attachment uploads OK |
| Backup failure | Disk space, pg_dump path, encryption key | Free space; verify dump tooling | Backup job success |
| SSL problems | Cert renewal / proxy misconfig | Re-issue cert; fix Nginx SSL block | https:// loads with valid cert |
X Appendices, Checklist & Roadmap
62. Security Checklist (before production)
- HTTPS enabled
- Strong database password
- Strong Odoo admin password
- Default accounts secured
- Debug mode disabled
- Database ports restricted
- Firewall configured
- Backups enabled
- Backup restoration tested
- Secrets removed from source
- Access permissions reviewed
- Audit logging enabled
- Dependencies updated
63. Production Deployment Checklist
Infrastructure
- Server configured
- PostgreSQL configured
- Odoo configured
- Nginx configured
- SSL configured
Application
- Custom modules installed
- Configuration verified
- Demo data removed if required
- Production data imported
Security
- Users configured
- Permissions verified
- Secrets secured
- Firewall enabled
Backup
- Database backup configured
- Filestore backup configured
- Restore tested
Monitoring
- Logs configured
- Alerts configured
- Server monitoring enabled
64. Technical Risks
Probability and Impact are estimates only and must be validated with evidence before use in planning.
| Risk ID | Risk | Probability (est.) | Impact (est.) | Mitigation | Owner | Status |
|---|---|---|---|---|---|---|
| R-01 | Database growth | Medium | Medium | Indexing, archival, monitoring | TBD | Open |
| R-02 | Third-party API outage | Low | High | Retries, circuit breaker, fallbacks | TBD | Open |
| R-03 | Incorrect permissions | Medium | High | Review process, security tests | TBD | Open |
| R-04 | Data loss | Low | Critical | Backups, DR drills, off-site copies | TBD | Open |
| R-05 | Performance degradation | Medium | Medium | Profiling, indexes, caching | TBD | Open |
| R-06 | AI API cost | Medium | Low | Token budgets, rate limits | TBD | Open |
| R-07 | Email delivery failure | Medium | Medium | Reliable SMTP, SPF/DKIM, monitoring | TBD | Open |
| R-08 | Backup failure | Low | High | Alerting, restore tests | TBD | Open |
| R-09 | Security vulnerabilities | Medium | High | Updates, audits, least privilege | TBD | Open |
65. Future Roadmap
| Phase | Capabilities | Status |
|---|---|---|
| Phase 2 | Advanced AI, mobile applications, customer portal, vendor portal | Planned |
| Phase 3 | Multi-company enhancements, advanced BI, AI forecasting, workflow automation | Planned |
| Phase 4 | SaaS commercialization, tenant management, subscription billing, partner portal, marketplace integrations | Planned |
66. Technical Glossary
| Term | Definition |
|---|---|
| ERP | Enterprise Resource Planning — integrated business management software |
| CRM | Customer Relationship Management — processes and tools for managing customer relationships/pipeline |
| ORM | Object Relational Mapping — mapping model classes to database tables |
| Odoo | Open-source Python ERP/CRM framework used as the MageTech platform foundation |
| OWL | Odoo Web Library — the reactive JavaScript component framework used by the Odoo 19 UI, adopted for MageTech components |
| PostgreSQL | Open-source relational database used as the primary data store |
| API | Application Programming Interface — contract for software-to-software communication |
| REST | Representational State Transfer — HTTP-based API style |
| Webhook | HTTP callback triggered by an event, used for push integration |
| RBAC | Role-Based Access Control — permissions granted by role/group |
| ACL | Access Control List — model-level permission grants (ir.model.access) |
| Record Rule | Row-level access restriction in Odoo |
| CI/CD | Continuous Integration / Continuous Delivery — automated build, test, deploy |
| RPO | Recovery Point Objective — max acceptable data loss on recovery |
| RTO | Recovery Time Objective — max acceptable downtime after disaster |
| SaaS | Software as a Service — cloud-hosted, subscription-based software |
| Multi-company | One installation serving multiple companies with per-company data |
| Multi-tenancy | One platform instance serving multiple isolated tenants |
67. Documentation Rules
- Do not invent implementation details.
- Clearly distinguish Implemented, Planned, and Recommended functionality.
- Do not claim an API exists unless it has actually been implemented.
- Do not claim an integration exists unless configured.
- Do not expose credentials or secrets.
- Use diagrams wherever they improve understanding.
- Include tables for configuration and module information.
- Include code snippets only where useful.
- Use consistent terminology.
- Maintain version history.
68. Document Version History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026-09-24 | MageTech Solutions | Initial technical architecture |
Document Control: Owner — MageTech Solutions Architecture. Review cycle — quarterly or on significant architecture change.
69. Final Document Structure
The document contains: Cover Page, Document Control, Revision History, Table of Contents (auto-generated), Executive Summary, Product Overview, System Scope, Functional Architecture, Technical Architecture, Technology Stack, Odoo Architecture, Custom Module Architecture, Database Architecture, ER Diagram, API Architecture, Security Architecture, Authentication & Authorization, Business Workflows, AI Architecture, Reporting Architecture, Integration Architecture, Deployment Architecture, Infrastructure, CI/CD, Testing Strategy, Performance, Scalability, Monitoring, Backup & Disaster Recovery, Administration, Troubleshooting, Security Checklist, Production Checklist, Technical Risks, Future Roadmap, Glossary, Appendices.
70. Final Quality Requirement
This document is intended to look like a professional technical document prepared by an enterprise software architecture team: detailed, structured, professional, developer-friendly, implementation-oriented, easy to maintain, suitable for client/internal documentation, future developers, and deployment/operations teams. Missing or un-finalized information is explicitly marked TBD / Planned / Recommended — the current implementation, planned features, and future recommendations are always distinguishable.
XI Commercial & Pricing
71. Pricing & Commercial Model
This section defines the commercial framework for delivering and supporting MageTech ERP. 2026 India market reference: ordinary Odoo implementations range from a few lakhs for smaller deployments to ₹15 lakh+ for more customized implementations; complex multi-company / custom ERP projects go substantially higher. Odoo also separates its subscription/licensing from implementation services — MageTech ERP follows the same structure: implementation + deployment + annual maintenance as distinct components.
Recommended MageTech ERP Packages
| Package | Suitable For | One-Time Development / Implementation | Annual Maintenance |
|---|---|---|---|
| Starter ERP | Small business | ₹2,50,000 – ₹4,00,000 | ₹60,000 – ₹1,00,000 |
| Business ERP | Growing SME | ₹5,00,000 – ₹8,00,000 | ₹1,20,000 – ₹1,80,000 |
| Professional ERP Recommended | Multi-department company | ₹8,00,000 – ₹15,00,000 | ₹1,80,000 – ₹3,00,000 |
| Enterprise ERP | Complex / multi-company | ₹15,00,000 – ₹30,00,000+ | ₹3,00,000 – ₹6,00,000+ |
+ applicable taxes
≈ 20% of implementation value — consistent with the general Indian Odoo/ERP support range
What ₹9,90,000 Can Include
*AI features depend on the actual implementation; AI API usage costs are billed separately (usage-based) rather than absorbed into the AMC.
Scope Boundaries — Included vs. Additional
✅ Included (agreed scope)
- Up to 25 users
- 1 company
- Standard Odoo modules + agreed MageTech customizations
- Defined number of custom reports
- Defined integrations
- Data migration from agreed source
- User training
- Go-live support
➕ Additional — charged separately
- Additional users, if applicable
- Additional companies
- Major new modules
- New integrations
- Mobile application
- Large-scale data migration
- Custom third-party integrations
- Advanced AI features
- Custom reports outside agreed scope / major workflow changes
- Dedicated infrastructure
- Odoo Enterprise subscription · Odoo.sh / cloud hosting
- SMS / WhatsApp / API charges
Annual AMC Options
- Bug fixing
- Odoo configuration support
- User support
- Database health checks
- Bug fixing
- Odoo configuration support
- User support
- Minor UI changes
- Minor workflow modifications
- Database health checks
- Backup monitoring
- Security / update assistance
- Performance monitoring
- Monthly maintenance review
- Everything in Business Support
- Priority response
- Continuous improvements
Major new features are managed as separate change requests — not unlimited development inside the AMC.
Better Commercial Model — Three Stages
| Stage | Investment | What It Includes |
|---|---|---|
| Phase 1 — Discovery & Business Analysis | ₹50,000 – ₹1,00,000 | Requirement workshops · existing workflow study · module identification · process mapping · customization analysis · technical architecture · final implementation proposal. Adjustable against the implementation fee if the customer proceeds. |
| Phase 2 — MageTech ERP Implementation | ₹9,90,000 onwards | Includes the agreed ERP scope — modules, customizations, configuration, training and go-live support. |
| Phase 3 — Annual Maintenance (AMC) | From ₹1,98,000 / year | Starts after the included post-go-live support period. |
Suggested Payment Schedule (₹9,90,000 Implementation)
| Milestone | % | Amount |
|---|---|---|
| Project confirmation | 30% | ₹2,97,000 |
| UI/Architecture + initial development | 20% | ₹1,98,000 |
| Core modules completed | 20% | ₹1,98,000 |
| UAT / Customer testing | 20% | ₹1,98,000 |
| Production Go-Live | 10% | ₹99,000 |
| Total | 100% | ₹9,90,000 |
Milestone-based billing is much safer than collecting the entire amount only at the end of the project.
Position MageTech ERP not as “Odoo customization” but as — “MageTech ERP — Customized Enterprise Business Management Solution”, built on the Odoo ERP foundation and customized to the customer’s business processes.
Implementation & Custom Development: starting from ₹9,90,000 + applicable taxes
Annual Maintenance: starting from ₹1,98,000 + applicable taxes
Odoo licensing / subscription, hosting and third-party service charges: charged separately, based on the selected configuration.
Toward a Repeatable Product Pricing Model
Because MageTech ERP is being built as a commercial product for multiple customers, MageTech Solutions maintains a standardized pricing model instead of negotiating every customer from zero.
MAGE TECH SOLUTIONS · MageTech ERP — One Platform. Complete Business Control.
Manage. Automate. Grow. · www.magetechsol.com
End of Technical Design & Architecture Specification — v1.0