Add stored form views, SO line compute, invoice line demo data

- Stored form views for CRM lead, purchase order, HR employee, project
- SO line price_subtotal compute (qty * price * (1 - discount/100))
- Invoice lines seeded for demo invoices (product + tax + receivable)
- O2M lines now visible in form views (sale orders + invoices)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc
2026-04-02 21:55:25 +02:00
parent fbe65af951
commit 15cccce6d5
3 changed files with 151 additions and 2 deletions

View File

@@ -442,12 +442,12 @@ func (s *Server) handleReadGroup(rs *orm.Recordset, params CallKWParams) (interf
// web_read_group: also get total group count (without limit/offset)
totalLen := len(results)
if opts.Limit > 0 || opts.Offset > 0 {
// Re-query without limit/offset to get total
allResults, err := rs.ReadGroup(domain, groupby, []string{"__count"})
if err == nil {
totalLen = len(allResults)
}
}
return map[string]interface{}{
"groups": groups,
"length": totalLen,