Looks like the vtlib/Module or ModuleBasic class needs to be made aware of the vtiger_app2tab table and structure. If you create a new module using a vtlib bootstrap, you can't add your new module to the Menu in the Menu Editor.
There's also a lovely typo for a function name in the Menu Editor Module model: saveMenuStruncture()...
In the short term, if anyone else has this problem just add a call:
Yes. I use a standard set of code to create modules... Setting parent didn't seem to do much. I found I had to use the addModuleToApp function above.
I would also like to be able to create our own "Parents". When we create a large number of related modules for a particular customer application we have to place them under one of the "standard" parents.
This discussion is also relevant to #355 (closed) in that we end up with a load of jigsaw icons and no way to customise these... :-(
#355 (closed) is enhancement @lord_alan, For now we cant add custom image for custom module. Will try and come up with a solution. But I hope this can be happen after v7 release
here is a chunk of standard code I use to bootstrap a new vtlib module:
// Name our table - Prevent namespace collision$basetable="ls_satellites";$module=Vtiger_Module::getInstance('LSSatellites');// Only if not already createdif($module==false){$module=newVtiger_Module();$module->name='LSSatellites';$module->isentitytype=true;$module->initTables($basetable,'lssatelliteid');$module->parent='Sales';$module->save();// Enable Webservices (Required to get module to work at all).$module->initWebservice();}// Added to make the module work in v7Settings_MenuEditor_Module_Model::addModuleToApp($module->name,'Sales');// Create vtiger_modulename_user_field tablecreateUserFieldTable($module->name);
and i think that use /layouts/v7/lib/vt-icons/fonts/Vtiger-icons.ttf
for fix i think that we must
1- add icons column to vtiger_tab
2- to optimize menubar.tpl for get these icons.
@greencrm@satish.dvnk Yes. I was aware of how the current Icons are generated; they are in a font file. This was a design choice made that gave no thought to custom modules at all. With the Extension store and the other more bespoke customisations that all of our customers use, this is just a poor job. There is no way to fix this without hacking core vtiger code. That is why I raised this as an issue.
Personally - I wouldn't have used a font file anyway. I would have designed it so the image(s) for each module are within that module's files somewhere - not in a core file. As I said - I guess it was a design decision made for On-Demand which gave no consideration for custom or even Extension store modules.