feat: Portal, Email Inbound, Discuss + module improvements

- Portal: /my/* routes, signup, password reset, portal user support
- Email Inbound: IMAP polling (go-imap/v2), thread matching
- Discuss: mail.channel, long-polling bus, DM, unread count
- Cron: ir.cron runner (goroutine scheduler)
- Bank Import, CSV/Excel Import
- Automation (ir.actions.server)
- Fetchmail service
- HR Payroll model
- Various fixes across account, sale, stock, purchase, crm, hr, project

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marc
2026-04-12 18:41:57 +02:00
parent 2c7c1e6c88
commit 66383adf06
87 changed files with 14696 additions and 654 deletions

View File

@@ -21,10 +21,12 @@ func initHrAttendance() {
env := rs.Env()
attID := rs.IDs()[0]
var hours float64
env.Tx().QueryRow(env.Ctx(),
`SELECT COALESCE(EXTRACT(EPOCH FROM (check_out - check_in)) / 3600.0, 0)
FROM hr_attendance WHERE id = $1 AND check_out IS NOT NULL`, attID,
).Scan(&hours)
if err := env.Tx().QueryRow(env.Ctx(),
`SELECT COALESCE(EXTRACT(EPOCH FROM (COALESCE(check_out, NOW()) - check_in)) / 3600.0, 0)
FROM hr_attendance WHERE id = $1`, attID,
).Scan(&hours); err != nil {
return orm.Values{"worked_hours": float64(0)}, nil
}
return orm.Values{"worked_hours": hours}, nil
})
}