vtiger crm 模块的创建

1.到\vtlib\ModuleDir 找到你相应的版本的模块原型  复制一份放到桌面,并以你的模块功能命名

2.把Module替换成你的模块功能名,(使用文件夹全文搜索替换),并把带有module的文件名也相应的替换成你的功能名

3.新建一个manifest.xml 里面定义的建表sql,字段的属性,视图显示的字段,相关联的模块名等等。。

例如:

2010-11-14 15:29:23 Accounts Accounts Marketing 5.2.0 VB2 vtiger\_account
vtiger\_accountscf
LBL\_ACCOUNT\_INFORMATION accountname 2 accountname vtiger\_account 1 Account Name 1 0 0 1 100 V~M 0 1 1 BAS 0 accountid account\_id account\_no 4 account\_no vtiger\_account 1 Account No 1 0 0 2 100 V~O 3 1 BAS 0 phone 11 phone vtiger\_account 1 Phone 1 2 0 4 100 V~O 2 2 1 BAS 1 website 17 website vtiger\_account 1 Website 1 2 0 3 100 V~O 2 3 1 BAS 1 fax 11 fax vtiger\_account 1 Fax 1 2 0 6 100 V~O 1 1 BAS 1 tickersymbol 1 tickersymbol vtiger\_account 1 Ticker Symbol 1 2 0 5 100 V~O 1 1 BAS 1 otherphone 11 otherphone vtiger\_account 1 Other Phone 1 2 0 8 100 V~O 1 1 ADV 1 account\_id 51 parentid vtiger\_account 1 Member Of 1 2 0 7 100 I~O 1 1 BAS 0 email1 13 email1 vtiger\_account 1 Email 1 2 0 10 100 E~O 1 1 BAS 1 employees 7 employees vtiger\_account 1 Employees 1 2 0 9 100 I~O 1 1 ADV 1 email2 13 email2 vtiger\_account 1 Other Email 1 2 0 11 100 E~O 1 1 ADV 1 ownership 1 ownership vtiger\_account 1 Ownership 1 2 0 12 100 V~O 1 1 ADV 1 rating 15 rating vtiger\_account 1 Rating 1 2 0 14 100 V~O 1 1 ADV 1 --None-- Acquired Active Market Failed Project Cancelled Shutdown industry 15 industry vtiger\_account 1 industry 1 2 0 13 100 V~O 1 1 ADV 1 --None-- Apparel Banking Biotechnology Chemicals Communications Construction Consulting Education Electronics Energy Engineering Entertainment Environmental Finance Food & Beverage Government Healthcare Hospitality Insurance Machinery Manufacturing Media Not For Profit Recreation Retail Shipping Technology Telecommunications Transportation Utilities Other siccode 1 siccode vtiger\_account 1 SIC Code 1 2 0 16 100 V~O 1 1 ADV 1 accounttype 15 account\_type vtiger\_account 1 Type 1 2 0 15 100 V~O 1 1 ADV 1 --None-- Analyst Competitor Customer Integrator Investor Partner Press Prospect Reseller Other annual\_revenue 71 annualrevenue vtiger\_account 1 Annual Revenue 1 2 0 18 100 I~O 1 1 ADV 1 emailoptout 56 emailoptout vtiger\_account 1 Email Opt Out 1 2 0 17 100 C~O 1 1 ADV 1 notify\_owner 56 notify\_owner vtiger\_account 1 Notify Owner 1 2 0 20 10 C~O 1 1 ADV 1 assigned\_user\_id 53 smownerid vtiger\_crmentity 1 Assigned To 1 0 0 19 100 V~M 0 4 1 BAS 1 createdtime 70 createdtime vtiger\_crmentity 1 Created Time 1 0 0 22 100 T~O 3 2 BAS 0 modifiedtime 70 modifiedtime vtiger\_crmentity 1 Modified Time 1 0 0 21 100 T~O 3 2 BAS 0 LBL\_CUSTOM\_INFORMATION LBL\_ADDRESS\_INFORMATION bill\_street 21 bill\_street vtiger\_accountbillads 1 Billing Address 1 2 0 1 100 V~O 1 1 BAS 1 ship\_street 21 ship\_street vtiger\_accountshipads 1 Shipping Address 1 2 0 2 100 V~O 1 1 BAS 1 bill\_city 1 bill\_city vtiger\_accountbillads 1 Billing City 1 2 0 5 100 V~O 1 1 BAS 1 ship\_city 1 ship\_city vtiger\_accountshipads 1 Shipping City 1 2 0 6 100 V~O 1 1 BAS 1 bill\_state 1 bill\_state vtiger\_accountbillads 1 Billing State 1 2 0 7 100 V~O 1 1 BAS 1 ship\_state 1 ship\_state vtiger\_accountshipads 1 Shipping State 1 2 0 8 100 V~O 1 1 BAS 1 bill\_code 1 bill\_code vtiger\_accountbillads 1 Billing Code 1 2 0 9 100 V~O 1 1 BAS 1 ship\_code 1 ship\_code vtiger\_accountshipads 1 Shipping Code 1 2 0 10 100 V~O 1 1 BAS 1 bill\_country 1 bill\_country vtiger\_accountbillads 1 Billing Country 1 2 0 11 100 V~O 1 1 BAS 1 ship\_country 1 ship\_country vtiger\_accountshipads 1 Shipping Country 1 2 0 12 100 V~O 1 1 BAS 1 bill\_pobox 1 bill\_pobox vtiger\_accountbillads 1 Billing Po Box 1 2 0 3 100 V~O 1 1 BAS 1 ship\_pobox 1 ship\_pobox vtiger\_accountshipads 1 Shipping Po Box 1 2 0 4 100 V~O 1 1 BAS 1 LBL\_DESCRIPTION\_INFORMATION description 19 description vtiger\_crmentity 1 Description 1 2 0 1 100 V~O 1 1 BAS 1 All true false account\_no 0 accountname 1 bill\_city 2 website 3 phone 4 assigned\_user\_id 5 Prospect Accounts false true accountname 0 phone 1 website 2 rating 3 assigned\_user\_id 4 New This Week false false accountname 0 phone 1 website 2 bill\_city 3 assigned\_user\_id 4 public\_readwritedelete enabled enabled enabled enabled get\_contacts Contacts 1 0 add Contacts get\_opportunities Potentials 2 0 add Potentials get\_quotes Quotes 3 0 add Quotes get\_salesorder Sales Order 4 0 add SalesOrder get\_invoices Invoice 5 0 add Invoice get\_activities Activities 6 0 add Calendar get\_emails Emails 7 0 add Emails get\_history Activity History 8 0 add Calendar get\_attachments Documents 9 0 add select Documents get\_tickets HelpDesk 10 0 add HelpDesk get\_products Products 11 0 select Products get\_campaigns Campaigns 13 0 select Campaigns get\_dependents\_list Service Contracts 14 0 ADD ServiceContracts get\_related\_list Services 15 0 SELECT Services get\_dependents\_list Assets 16 0 ADD Assets get\_dependents\_list Projects 17 0 ADD SELECT Project DETAILVIEWBASIC LBL\_ADD\_NOTE 0 DETAILVIEWBASIC LBL\_SHOW\_ACCOUNT\_HIERARCHY 0 DETAILVIEWBASIC Send SMS 0 DETAILVIEWWIDGET DetailViewBlockCommentWidget 0 LISTVIEWBASIC Send SMS 0 这个是你的模块能不能安装成功的主要因素,一定要现在浏览器检查好定义的东西是否完整和正确,相应的函数,方法功能可以在

安装好后在ModuleFile.php的这个文件里去实现你的逻辑。

4.选定文件夹和manfest.xml这两个,并把它们打包成zip文件,就可到后台去安装

5.安装时可先备份数据库,防止安装不成功产生垃圾数据

6.如果安装不成功,则要还原数据库,并删除module下的刚安装的文件夹,在仔细检查先前的1、2、3步,哪里肯定有问题出现了。

评论

暂无评论