<div dir="ltr">i try to import module with this php script and it works: <div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><?php<br>/*+**********************************************************************************<br> * The contents of this file are subject to the vtiger CRM Public License Version 1.0<br> * ("License"); You may not use this file except in compliance with the License<br> * The Original Code is:  vtiger CRM Open Source<br> * The Initial Developer of the Original Code is vtiger.<br> * Portions created by vtiger are Copyright (C) vtiger.<br> * All Rights Reserved.<br> ************************************************************************************/<br>$Vtiger_Utils_Log = true;<br>include_once 'vtlib/Vtiger/Module.php';<br>include_once 'vtlib/Vtiger/Package.php';<br>include_once 'includes/main/WebUI.php';<br>require_once('vtlib/Vtiger/Block.php');<br>require_once('vtlib/Vtiger/Field.php');<br>include_once 'include/Webservices/Utils.php';<br>require_once 'modules/ModComments/ModComments.php';<br>include_once('modules/ModTracker/ModTracker.php');<br><span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>$path = "Accounting.zip";<br><span class="gmail-Apple-tab-span" style="white-space:pre">                 </span>$package = new Vtiger_Package();<br><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span>$module  = $package->getModuleNameFromZip($path);<br><span class="gmail-Apple-tab-span" style="white-space:pre">                       <br></span><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span>$moduleInstance = Vtiger_Module::getInstance($module);<br><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>if ($moduleInstance) {<br><span class="gmail-Apple-tab-span" style="white-space:pre">                              </span>echo "ERROR: Module $module already exists!\n";<br><span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>} else {<br><span class="gmail-Apple-tab-span" style="white-space:pre">                            </span>echo "Importing ...";<br><span class="gmail-Apple-tab-span" style="white-space:pre">                             </span>$package->import($path);<br><span class="gmail-Apple-tab-span" style="white-space:pre">                         </span>echo "DONE.\n";<br><span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>}<span class="gmail-Apple-tab-span" style="white-space:pre">     </span><br>$moduleInstance = Vtiger_Module::getInstance('Accounting');<br>ModTracker::enableTrackingForModule($moduleInstance->id);<br>$commentsModule = Vtiger_Module::getInstance('ModComments');<br>$fieldInstance = Vtiger_Field::getInstance('related_to', $commentsModule);<br>$fieldInstance->setRelatedModules(array('Accounting'));</blockquote><div><br></div><div>my accounting module does not work well but it's inventory based module with some js extra features.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-09 14:49 GMT+01:00 Alan Lord <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 09/12/16 13:46, Alan Lord wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Copy the file from the old layout and rename it...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
sudo cp<br>
../../../../vlayout/modules/Se<wbr>ttings/ModuleManager/ImportUse<wbr>rModuleStep1.tpl<br>
Step1.tpl<br>
</blockquote>
<br>
But do remember to backup Step1.tpl first<br>
</blockquote>
<br></span>
PS: The javascript is broken so it still won't work ;-)<br>
<br>
Didn't the vtiger Console "Import Module" feature work?<br>
<br>
<a href="http://community.vtiger.com/help/vtigercrm/developers/vtlib/console-tool.html#import-module" rel="noreferrer" target="_blank">http://community.vtiger.com/he<wbr>lp/vtigercrm/developers/vtlib/<wbr>console-tool.html#import-<wbr>module</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br></div>