Phase 1: read_group/web_read_group with SQL GROUP BY, aggregates (sum/avg/min/max/count/array_agg/sum_currency), date granularity, M2O groupby resolution to [id, display_name]. Phase 2: Record rules with domain_force parsing (Python literal parser), global AND + group OR merging. Domain operators: child_of, parent_of, any, not any compiled to SQL hierarchy/EXISTS queries. Phase 3: Button dispatch via /web/dataset/call_button, method return values interpreted as actions. Payment register wizard (account.payment.register) for sale→invoice→pay flow. Phase 4: ir.filters, ir.default, product fields expanded, SO line product_id onchange, ir_model+ir_model_fields DB seeding. Phase 5: CSV export (/web/export/csv), attachment upload/download via ir.attachment, fields_get with aggregator hints. Admin/System: Session persistence (PostgreSQL-backed), ir.config_parameter with get_param/set_param, ir.cron, ir.logging, res.lang, res.config.settings with company-related fields, Settings form view. Technical menu with Views/Actions/Parameters/Security/Logging sub-menus. User change_password, preferences. Password never exposed in UI/API. Bugfixes: false→nil for varchar/int fields, int32 in toInt64, call_button route with trailing slash, create_invoices returns action, search view always included, get_formview_action, name_create, ir.http stub. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
package models
|
|
|
|
import "odoo-go/pkg/orm"
|
|
|
|
// initResLang registers res.lang — Languages.
|
|
// Mirrors: odoo/addons/base/models/res_lang.py
|
|
func initResLang() {
|
|
m := orm.NewModel("res.lang", orm.ModelOpts{
|
|
Description: "Languages",
|
|
RecName: "name",
|
|
})
|
|
|
|
m.AddFields(
|
|
orm.Char("name", orm.FieldOpts{String: "Name", Required: true}),
|
|
orm.Char("code", orm.FieldOpts{String: "Locale Code", Required: true}),
|
|
orm.Char("iso_code", orm.FieldOpts{String: "ISO Code"}),
|
|
orm.Char("url_code", orm.FieldOpts{String: "URL Code"}),
|
|
orm.Boolean("active", orm.FieldOpts{String: "Active", Default: true}),
|
|
orm.Char("direction", orm.FieldOpts{String: "Direction", Default: "ltr"}),
|
|
orm.Char("date_format", orm.FieldOpts{String: "Date Format", Default: "%m/%d/%Y"}),
|
|
orm.Char("time_format", orm.FieldOpts{String: "Time Format", Default: "%H:%M:%S"}),
|
|
orm.Char("week_start", orm.FieldOpts{String: "First Day of Week", Default: "7"}),
|
|
orm.Char("decimal_point", orm.FieldOpts{String: "Decimal Separator", Default: "."}),
|
|
orm.Char("thousands_sep", orm.FieldOpts{String: "Thousands Separator", Default: ","}),
|
|
orm.Char("grouping", orm.FieldOpts{String: "Separator Format", Default: "[]"}),
|
|
)
|
|
}
|