[Vtigercrm-developers] Vtiger 7 preview

Matteo Baranzoni info at greenbitweb.com
Fri Dec 9 15:01:48 GMT 2016


i try to import module with this php script and it works:

<?php
>
> /*+**********************************************************************************
>  * The contents of this file are subject to the vtiger CRM Public License
> Version 1.0
>  * ("License"); You may not use this file except in compliance with the
> License
>  * The Original Code is:  vtiger CRM Open Source
>  * The Initial Developer of the Original Code is vtiger.
>  * Portions created by vtiger are Copyright (C) vtiger.
>  * All Rights Reserved.
>
>  ************************************************************************************/
> $Vtiger_Utils_Log = true;
> include_once 'vtlib/Vtiger/Module.php';
> include_once 'vtlib/Vtiger/Package.php';
> include_once 'includes/main/WebUI.php';
> require_once('vtlib/Vtiger/Block.php');
> require_once('vtlib/Vtiger/Field.php');
> include_once 'include/Webservices/Utils.php';
> require_once 'modules/ModComments/ModComments.php';
> include_once('modules/ModTracker/ModTracker.php');
> $path = "Accounting.zip";
> $package = new Vtiger_Package();
> $module  = $package->getModuleNameFromZip($path);
>
> $moduleInstance = Vtiger_Module::getInstance($module);
> if ($moduleInstance) {
> echo "ERROR: Module $module already exists!\n";
> } else {
> echo "Importing ...";
> $package->import($path);
> echo "DONE.\n";
> }
> $moduleInstance = Vtiger_Module::getInstance('Accounting');
> ModTracker::enableTrackingForModule($moduleInstance->id);
> $commentsModule = Vtiger_Module::getInstance('ModComments');
> $fieldInstance = Vtiger_Field::getInstance('related_to', $commentsModule);
> $fieldInstance->setRelatedModules(array('Accounting'));


my accounting module does not work well but it's inventory based module
with some js extra features.

2016-12-09 14:49 GMT+01:00 Alan Lord <alanslists at gmail.com>:

> On 09/12/16 13:46, Alan Lord wrote:
>
>> Copy the file from the old layout and rename it...
>>
>> sudo cp
>>> ../../../../vlayout/modules/Settings/ModuleManager/ImportUse
>>> rModuleStep1.tpl
>>> Step1.tpl
>>>
>>
>> But do remember to backup Step1.tpl first
>>
>
> PS: The javascript is broken so it still won't work ;-)
>
> Didn't the vtiger Console "Import Module" feature work?
>
> http://community.vtiger.com/help/vtigercrm/developers/vtlib/
> console-tool.html#import-module
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20161209/378fb54f/attachment.html>


More information about the vtigercrm-developers mailing list