I like to group my custom modules (e.g., Module1, Module2, Module3) as MyModule and put it under the left side searchpanel ‘CATEGORIES’ in main UI, as shown in the picture below.
I searched online and followed the suggestion in Odoo: How to add custom category name to app module’s search panel?
In odoo/addons/base/data/ir_module_category_data.xml, bewlo code was added.
<record model="ir.module.category" id="module_category_mymodule">
<field name="name">MyModule</field>
<field name="sequence">150</field>
</record>
<record model="ir.module.category" id="module_child_category">
<field name="name">Child</field>
<field name="parent_id" ref="module_custom_mymodule"/>
</record>
In my custom model manifest.py file, I set ‘category’: ‘MyModule/Child’. When running odoo with ‘-u base’, it reported below errors
ERROR db_a odoo.sql_db: bad query: ALTER TABLE “ir_model_data” DROP CONSTRAINT “ir_model_data_name_nospaces”
ERROR: canceling statement due to lock timeout
2024-05-28 11:46:04,850 3212 WARNING db_a odoo.schema: Table ‘ir_model_data’: unable to drop constraint ‘ir_model_data_name_nospaces’!
2024-05-28 11:46:19,862 3212 INFO db_a odoo.schema: Table ‘ir_model_data’: unable to add constraint ‘ir_model_data_name_nospaces’ as CHECK(name NOT LIKE ‘%% %%’)
Could you please enlighten me how I can add MyModule under search panel ‘CATEGORY’