Manifests & depends
Every addon root needs a manifest.json. Technical name must match the folder name. Generated zmodels.go registers models under that module.
Standard directory layout
<technical_name>/
manifest.json
init.go # blank-import subpackages; optional event hooks
hooks.go # event.Subscribe, render hooks (optional)
models/ # struct + sdk.Model; zmodels.go generated
services/ # business logic (optional)
views/ # XML menus, actions, views
security/ # groups, rules, sys.access.csv
data/ # seed/demo XML (optional)
controllers/ # HTTP routes (optional)Folder name must match manifest name (^[a-z][a-z0-9_]*$).
For a kernel reference layout see
sumeru/addons/contacts/.
Manifest shape
{ "name": "engagement_cookbook", "display_name": "Engagements Cookbook", "version": "2.0.0", "depends": ["base", "contacts"], "application": true, "data": [ "security/security.xml", "security/sys.access.csv", "views/actions.xml", "views/form_view.xml", "views/menus.xml" ]}| Field | Purpose |
|---|---|
name | Technical module name (directory name) |
depends | Modules that must install first |
application | true → shows as app tile on Home |
data | XML/CSV load order on install/update |
Bridge modules (e.g. sale_crm): "application": false, minimal data, logic in hooks.go / init.go.
Depends without Go imports between addons
Module order comes from the manifest graph, not from importing another addon's Go package. Prefer depending on base (and other modules you need) and referencing XML ids with module.xml_id style refs.
init.go vs hooks.go
In sumeru_addons, keep a hand-written init.go that blank-imports subpackages so init() runs.
In sumeru_custom_addons, workspace make generate overwrites each addon's init.go with a models-only blank import. Put event.Subscribe, render hooks, and cross-cutting logic in hooks.go at the addon root — see engagement_cookbook/hooks.go.
Data load order
List security before views that assume groups exist:
security/security.xml— groupssecurity/*_rules.xml— record rules (optional)security/sys.access.csv— model ACLsdata/— seed recordsviews/actions.xml— window actionsviews/*_{form,list,kanban,...}_views.xml— base views before inheritsviews/*_inherit_views.xml— xpath view inheritsviews/menus.xml— always last
Compile and run
After editing the manifest data list:
cd sumeru_custom_addonsmake generatemake update MODULES=my_appWhat not to do
- Do not invent a
dependsentry for a module that is not onaddons_path. - Do not reorder
dataso menus load before the actions they reference. - Do not change
namewithout renaming the folder and re-registering models.