Files
goodie/addons/crm/models/init.go
Marc bdb97f98ad Massive module expansion: Stock, CRM, HR — +2895 LOC
Stock (1193→2867 LOC):
- Valuation layers (FIFO consumption, product valuation history)
- Landed costs (split by equal/qty/cost/weight/volume, validation)
- Stock reports (by product, by location, move history, valuation)
- Forecasting (on_hand + incoming - outgoing per product)
- Batch transfers (confirm/assign/done with picking delegation)
- Barcode interface (scan product/lot/package/location, qty increment)

CRM (233→1113 LOC):
- Sales teams with dashboard KPIs (opportunity count/amount/unassigned)
- Team members with lead capacity + round-robin auto-assignment
- Lead extended: activities, UTM tracking, scoring, address fields
- Lead methods: merge, duplicate, schedule activity, set priority/stage
- Pipeline analysis (stages, win rate, conversion, team/salesperson perf)
- Partner onchange (auto-populate contact from partner)

HR (223→520 LOC):
- Leave management: hr.leave.type, hr.leave, hr.leave.allocation
  with full approval workflow (draft→confirm→validate/refuse)
- Attendance: check in/out with computed worked_hours
- Expenses: hr.expense + hr.expense.sheet with state machine
- Skills/Resume: skill types, employee skills, resume lines
- Employee extensions: skills, attendance, leave count links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 23:21:52 +02:00

259 B