CommPro — Sale Commission System
Complete mockup system · Based on Odoo 14 sale_commission module · 3-level agent hierarchy
PostgreSQL 14+
Python / Odoo ORM
Portal / Web Controllers
Excel + PDF Reports
Role-based Access
3-Level Hierarchy
COMMISSION FLOW
Sale Order
Invoice
Payment
Commission Lines
L1·5% / L2·2.5% / L3·1%
Settlement
Agent Invoice

PORTAL MOCKUPS — 21 PAGES
Agent Portal
Agent-scoped commission view · 4 pages
Customer Portal
Self-service order & invoice view · 3 pages

DATABASE SCHEMA OVERVIEW
View Full schema.sql (PostgreSQL)
commission_plan
id PK
name, commission_type
fix_qty (% fixed)
invoice_state
amount_base_type
partner
id PK
name, email, phone
is_agent (bool)
commission_id FK
parent_agent_id FK
settlement_period
commission_plan_company
id PK
plan_id FK
company_id FK
percent1 (L1 direct)
percent2 (L2 parent)
percent3 (L3 grandparent)
invoice_line_agent
id PK
invoice_line_id FK
agent_id FK
level (1/2/3)
main_percentage
amount, pv_value
payment_commission
settled (bool)
settlement
id PK
agent_id FK
date_from / date_to
total, state
settlement_line
settlement_id FK
settled_amount
production_commission
id PK
sale_order_id FK
staff_id FK
staff_rate (%)
payment_received
commission_amount
settled (bool)
invoice
id PK
partner_id FK
planner_id FK
commission_total
commission_paid
percent_paid
idx: partner, date
Views / Functions
v_commission_analysis
Joins: ila + il + inv + product
v_planner_commission
Groups by planner/invoice
fn_get_commission_amount()
fn_calculate_section()
CommPro · Sale Commission System · Based on Odoo 14 sale_commission · 27 mockup pages · 1 complete PostgreSQL schema