Bug
The model llm.prompt.template was removed during the consolidation into llm.prompt (via llm_assistant), but llm_comfyui/data/llm_prompt_data.xml still contains two <record> blocks referencing it:
llm_prompt_template_comfyui_workflow (line 29)
llm_prompt_template_comfyui_character_gen_v1 (line 205)
Impact
Attempting to uninstall the llm module (or any llm_* module) via the Odoo Apps UI fails with:
KeyError: 'llm.prompt.template'
Traceback path: ir_module.py > button_immediate_uninstall > registry.new > load_modules > module_uninstall > _module_data_uninstall > env[model_name] > KeyError
Root cause
The two orphan records contain ComfyUI workflow JSON templates (~3280 lines of JSON node definitions). These records used fields (prompt_id, role, sequence, content) that belonged to the now-removed llm.prompt.template model.
Discussion: workflow template data migration
The removed records contained valuable ComfyUI workflow definitions. If this data should be preserved, a migration path is needed. However, llm.prompt does not have the equivalent fields that llm.prompt.template had.
Options:
- Accept the removal (data was already non-functional)
- Recreate a compatible model or add fields to
llm.prompt
- Store the workflow JSON in an existing text field on
llm.prompt
We would appreciate guidance from maintainers on the preferred approach.
Environment
- Odoo 16.0 CE
- odoo-llm branch 16.0 (latest)
- Tested on Windows 10 Pro, PostgreSQL 12.4
Bug
The model
llm.prompt.templatewas removed during the consolidation intollm.prompt(viallm_assistant), butllm_comfyui/data/llm_prompt_data.xmlstill contains two<record>blocks referencing it:llm_prompt_template_comfyui_workflow(line 29)llm_prompt_template_comfyui_character_gen_v1(line 205)Impact
Attempting to uninstall the
llmmodule (or any llm_* module) via the Odoo Apps UI fails with:Traceback path:
ir_module.py > button_immediate_uninstall > registry.new > load_modules > module_uninstall > _module_data_uninstall > env[model_name] > KeyErrorRoot cause
The two orphan records contain ComfyUI workflow JSON templates (~3280 lines of JSON node definitions). These records used fields (
prompt_id,role,sequence,content) that belonged to the now-removedllm.prompt.templatemodel.Discussion: workflow template data migration
The removed records contained valuable ComfyUI workflow definitions. If this data should be preserved, a migration path is needed. However,
llm.promptdoes not have the equivalent fields thatllm.prompt.templatehad.Options:
llm.promptllm.promptWe would appreciate guidance from maintainers on the preferred approach.
Environment