vtiger crm 模块的创建

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

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

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

例如:

<?xml version='1.0'?>
<module>
<exporttime>2010-11-14 15:29:23</exporttime>
<name>Accounts</name>
<label>Accounts</label>
<parent>Marketing</parent>
<dependencies>
<vtiger_version>5.2.0 VB2</vtiger_version>
</dependencies>
<tables>
<table>
<name>vtiger_account</name>
<sql><![CDATA[CREATE TABLE `vtiger_account` (
  `accountid` int(19) NOT NULL DEFAULT '0',
  `account_no` varchar(100) NOT NULL,
  `accountname` varchar(100) NOT NULL,
  `parentid` int(19) DEFAULT '0',
  `account_type` varchar(200) DEFAULT NULL,
  `industry` varchar(200) DEFAULT NULL,
  `annualrevenue` int(19) DEFAULT '0',
  `rating` varchar(200) DEFAULT NULL,
  `ownership` varchar(50) DEFAULT NULL,
  `siccode` varchar(50) DEFAULT NULL,
  `tickersymbol` varchar(30) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `otherphone` varchar(30) DEFAULT NULL,
  `email1` varchar(100) DEFAULT NULL,
  `email2` varchar(100) DEFAULT NULL,
  `website` varchar(100) DEFAULT NULL,
  `fax` varchar(30) DEFAULT NULL,
  `employees` int(10) DEFAULT '0',
  `emailoptout` varchar(3) DEFAULT '0',
  `notify_owner` varchar(3) DEFAULT '0',
  PRIMARY KEY (`accountid`),
  KEY `account_account_type_idx` (`account_type`),
  CONSTRAINT `fk_1_vtiger_account` FOREIGN KEY (`accountid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8]]></sql>
</table>
<table>
<name>vtiger_accountscf</name>
<sql><![CDATA[CREATE TABLE `vtiger_accountscf` (
  `accountid` int(19) NOT NULL DEFAULT '0',
  PRIMARY KEY (`accountid`),
  CONSTRAINT `fk_1_vtiger_accountscf` FOREIGN KEY (`accountid`) REFERENCES `vtiger_account` (`accountid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8]]></sql>
</table>
</tables>
<blocks>
<block>
<label>LBL_ACCOUNT_INFORMATION</label>
<fields>
<field>
<fieldname>accountname</fieldname>
<uitype>2</uitype>
<columnname>accountname</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Account Name</fieldlabel>
<readonly>1</readonly>
<presence>0</presence>
<selected>0</selected>
<sequence>1</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~M</typeofdata>
<quickcreate>0</quickcreate>
<quickcreatesequence>1</quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>0</masseditable>
<entityidentifier>
<entityidfield>accountid</entityidfield>
<entityidcolumn>account_id</entityidcolumn>
</entityidentifier>
</field>
<field>
<fieldname>account_no</fieldname>
<uitype>4</uitype>
<columnname>account_no</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Account No</fieldlabel>
<readonly>1</readonly>
<presence>0</presence>
<selected>0</selected>
<sequence>2</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>3</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>0</masseditable>
</field>
<field>
<fieldname>phone</fieldname>
<uitype>11</uitype>
<columnname>phone</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Phone</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>4</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>2</quickcreate>
<quickcreatesequence>2</quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>website</fieldname>
<uitype>17</uitype>
<columnname>website</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Website</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>3</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>2</quickcreate>
<quickcreatesequence>3</quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>fax</fieldname>
<uitype>11</uitype>
<columnname>fax</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Fax</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>6</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>tickersymbol</fieldname>
<uitype>1</uitype>
<columnname>tickersymbol</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Ticker Symbol</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>5</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>otherphone</fieldname>
<uitype>11</uitype>
<columnname>otherphone</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Other Phone</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>8</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>account_id</fieldname>
<uitype>51</uitype>
<columnname>parentid</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Member Of</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>7</sequence>
<maximumlength>100</maximumlength>
<typeofdata>I~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>0</masseditable>
</field>
<field>
<fieldname>email1</fieldname>
<uitype>13</uitype>
<columnname>email1</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Email</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>10</sequence>
<maximumlength>100</maximumlength>
<typeofdata>E~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>employees</fieldname>
<uitype>7</uitype>
<columnname>employees</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Employees</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>9</sequence>
<maximumlength>100</maximumlength>
<typeofdata>I~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>email2</fieldname>
<uitype>13</uitype>
<columnname>email2</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Other Email</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>11</sequence>
<maximumlength>100</maximumlength>
<typeofdata>E~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ownership</fieldname>
<uitype>1</uitype>
<columnname>ownership</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Ownership</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>12</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>rating</fieldname>
<uitype>15</uitype>
<columnname>rating</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Rating</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>14</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
<picklistvalues>
<picklistvalue>--None--</picklistvalue>
<picklistvalue>Acquired</picklistvalue>
<picklistvalue>Active</picklistvalue>
<picklistvalue>Market Failed</picklistvalue>
<picklistvalue>Project Cancelled</picklistvalue>
<picklistvalue>Shutdown</picklistvalue>
</picklistvalues>
</field>
<field>
<fieldname>industry</fieldname>
<uitype>15</uitype>
<columnname>industry</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>industry</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>13</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
<picklistvalues>
<picklistvalue>--None--</picklistvalue>
<picklistvalue>Apparel</picklistvalue>
<picklistvalue>Banking</picklistvalue>
<picklistvalue>Biotechnology</picklistvalue>
<picklistvalue>Chemicals</picklistvalue>
<picklistvalue>Communications</picklistvalue>
<picklistvalue>Construction</picklistvalue>
<picklistvalue>Consulting</picklistvalue>
<picklistvalue>Education</picklistvalue>
<picklistvalue>Electronics</picklistvalue>
<picklistvalue>Energy</picklistvalue>
<picklistvalue>Engineering</picklistvalue>
<picklistvalue>Entertainment</picklistvalue>
<picklistvalue>Environmental</picklistvalue>
<picklistvalue>Finance</picklistvalue>
<picklistvalue>Food &amp; Beverage</picklistvalue>
<picklistvalue>Government</picklistvalue>
<picklistvalue>Healthcare</picklistvalue>
<picklistvalue>Hospitality</picklistvalue>
<picklistvalue>Insurance</picklistvalue>
<picklistvalue>Machinery</picklistvalue>
<picklistvalue>Manufacturing</picklistvalue>
<picklistvalue>Media</picklistvalue>
<picklistvalue>Not For Profit</picklistvalue>
<picklistvalue>Recreation</picklistvalue>
<picklistvalue>Retail</picklistvalue>
<picklistvalue>Shipping</picklistvalue>
<picklistvalue>Technology</picklistvalue>
<picklistvalue>Telecommunications</picklistvalue>
<picklistvalue>Transportation</picklistvalue>
<picklistvalue>Utilities</picklistvalue>
<picklistvalue>Other</picklistvalue>
</picklistvalues>
</field>
<field>
<fieldname>siccode</fieldname>
<uitype>1</uitype>
<columnname>siccode</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>SIC Code</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>16</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>accounttype</fieldname>
<uitype>15</uitype>
<columnname>account_type</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Type</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>15</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
<picklistvalues>
<picklistvalue>--None--</picklistvalue>
<picklistvalue>Analyst</picklistvalue>
<picklistvalue>Competitor</picklistvalue>
<picklistvalue>Customer</picklistvalue>
<picklistvalue>Integrator</picklistvalue>
<picklistvalue>Investor</picklistvalue>
<picklistvalue>Partner</picklistvalue>
<picklistvalue>Press</picklistvalue>
<picklistvalue>Prospect</picklistvalue>
<picklistvalue>Reseller</picklistvalue>
<picklistvalue>Other</picklistvalue>
</picklistvalues>
</field>
<field>
<fieldname>annual_revenue</fieldname>
<uitype>71</uitype>
<columnname>annualrevenue</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Annual Revenue</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>18</sequence>
<maximumlength>100</maximumlength>
<typeofdata>I~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>emailoptout</fieldname>
<uitype>56</uitype>
<columnname>emailoptout</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Email Opt Out</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>17</sequence>
<maximumlength>100</maximumlength>
<typeofdata>C~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>notify_owner</fieldname>
<uitype>56</uitype>
<columnname>notify_owner</columnname>
<tablename>vtiger_account</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Notify Owner</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>20</sequence>
<maximumlength>10</maximumlength>
<typeofdata>C~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>ADV</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>assigned_user_id</fieldname>
<uitype>53</uitype>
<columnname>smownerid</columnname>
<tablename>vtiger_crmentity</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Assigned To</fieldlabel>
<readonly>1</readonly>
<presence>0</presence>
<selected>0</selected>
<sequence>19</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~M</typeofdata>
<quickcreate>0</quickcreate>
<quickcreatesequence>4</quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>createdtime</fieldname>
<uitype>70</uitype>
<columnname>createdtime</columnname>
<tablename>vtiger_crmentity</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Created Time</fieldlabel>
<readonly>1</readonly>
<presence>0</presence>
<selected>0</selected>
<sequence>22</sequence>
<maximumlength>100</maximumlength>
<typeofdata>T~O</typeofdata>
<quickcreate>3</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>2</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>0</masseditable>
</field>
<field>
<fieldname>modifiedtime</fieldname>
<uitype>70</uitype>
<columnname>modifiedtime</columnname>
<tablename>vtiger_crmentity</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Modified Time</fieldlabel>
<readonly>1</readonly>
<presence>0</presence>
<selected>0</selected>
<sequence>21</sequence>
<maximumlength>100</maximumlength>
<typeofdata>T~O</typeofdata>
<quickcreate>3</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>2</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>0</masseditable>
</field>
</fields>
</block>
<block>
<label>LBL_CUSTOM_INFORMATION</label>
</block>
<block>
<label>LBL_ADDRESS_INFORMATION</label>
<fields>
<field>
<fieldname>bill_street</fieldname>
<uitype>21</uitype>
<columnname>bill_street</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing Address</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>1</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_street</fieldname>
<uitype>21</uitype>
<columnname>ship_street</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping Address</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>2</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>bill_city</fieldname>
<uitype>1</uitype>
<columnname>bill_city</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing City</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>5</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_city</fieldname>
<uitype>1</uitype>
<columnname>ship_city</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping City</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>6</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>bill_state</fieldname>
<uitype>1</uitype>
<columnname>bill_state</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing State</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>7</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_state</fieldname>
<uitype>1</uitype>
<columnname>ship_state</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping State</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>8</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>bill_code</fieldname>
<uitype>1</uitype>
<columnname>bill_code</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing Code</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>9</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_code</fieldname>
<uitype>1</uitype>
<columnname>ship_code</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping Code</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>10</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>bill_country</fieldname>
<uitype>1</uitype>
<columnname>bill_country</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing Country</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>11</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_country</fieldname>
<uitype>1</uitype>
<columnname>ship_country</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping Country</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>12</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>bill_pobox</fieldname>
<uitype>1</uitype>
<columnname>bill_pobox</columnname>
<tablename>vtiger_accountbillads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Billing Po Box</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>3</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
<field>
<fieldname>ship_pobox</fieldname>
<uitype>1</uitype>
<columnname>ship_pobox</columnname>
<tablename>vtiger_accountshipads</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Shipping Po Box</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>4</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
</fields>
</block>
<block>
<label>LBL_DESCRIPTION_INFORMATION</label>
<fields>
<field>
<fieldname>description</fieldname>
<uitype>19</uitype>
<columnname>description</columnname>
<tablename>vtiger_crmentity</tablename>
<generatedtype>1</generatedtype>
<fieldlabel>Description</fieldlabel>
<readonly>1</readonly>
<presence>2</presence>
<selected>0</selected>
<sequence>1</sequence>
<maximumlength>100</maximumlength>
<typeofdata>V~O</typeofdata>
<quickcreate>1</quickcreate>
<quickcreatesequence></quickcreatesequence>
<displaytype>1</displaytype>
<info_type>BAS</info_type>
<helpinfo><![CDATA[]]></helpinfo>
<masseditable>1</masseditable>
</field>
</fields>
</block>
</blocks>
<customviews>
<customview>
<viewname>All</viewname>
<setdefault>true</setdefault>
<setmetrics>false</setmetrics>
<fields>
<field>
<fieldname>account_no</fieldname>
<columnindex>0</columnindex>
</field>
<field>
<fieldname>accountname</fieldname>
<columnindex>1</columnindex>
</field>
<field>
<fieldname>bill_city</fieldname>
<columnindex>2</columnindex>
</field>
<field>
<fieldname>website</fieldname>
<columnindex>3</columnindex>
</field>
<field>
<fieldname>phone</fieldname>
<columnindex>4</columnindex>
</field>
<field>
<fieldname>assigned_user_id</fieldname>
<columnindex>5</columnindex>
</field>
</fields>
</customview>
<customview>
<viewname>Prospect Accounts</viewname>
<setdefault>false</setdefault>
<setmetrics>true</setmetrics>
<fields>
<field>
<fieldname>accountname</fieldname>
<columnindex>0</columnindex>
</field>
<field>
<fieldname>phone</fieldname>
<columnindex>1</columnindex>
</field>
<field>
<fieldname>website</fieldname>
<columnindex>2</columnindex>
</field>
<field>
<fieldname>rating</fieldname>
<columnindex>3</columnindex>
</field>
<field>
<fieldname>assigned_user_id</fieldname>
<columnindex>4</columnindex>
</field>
</fields>
</customview>
<customview>
<viewname>New This Week</viewname>
<setdefault>false</setdefault>
<setmetrics>false</setmetrics>
<fields>
<field>
<fieldname>accountname</fieldname>
<columnindex>0</columnindex>
</field>
<field>
<fieldname>phone</fieldname>
<columnindex>1</columnindex>
</field>
<field>
<fieldname>website</fieldname>
<columnindex>2</columnindex>
</field>
<field>
<fieldname>bill_city</fieldname>
<columnindex>3</columnindex>
</field>
<field>
<fieldname>assigned_user_id</fieldname>
<columnindex>4</columnindex>
</field>
</fields>
</customview>
</customviews>
<sharingaccess>
<default>public_readwritedelete</default>
</sharingaccess>
<actions>
<action>
<name><![CDATA[Import]]></name>
<status>enabled</status>
</action>
<action>
<name><![CDATA[Export]]></name>
<status>enabled</status>
</action>
<action>
<name><![CDATA[Merge]]></name>
<status>enabled</status>
</action>
<action>
<name><![CDATA[DuplicatesHandling]]></name>
<status>enabled</status>
</action>
</actions>
<relatedlists>
<relatedlist>
<function>get_contacts</function>
<label>Contacts</label>
<sequence>1</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Contacts</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_opportunities</function>
<label>Potentials</label>
<sequence>2</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Potentials</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_quotes</function>
<label>Quotes</label>
<sequence>3</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Quotes</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_salesorder</function>
<label>Sales Order</label>
<sequence>4</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>SalesOrder</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_invoices</function>
<label>Invoice</label>
<sequence>5</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Invoice</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_activities</function>
<label>Activities</label>
<sequence>6</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Calendar</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_emails</function>
<label>Emails</label>
<sequence>7</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Emails</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_history</function>
<label>Activity History</label>
<sequence>8</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>Calendar</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_attachments</function>
<label>Documents</label>
<sequence>9</sequence>
<presence>0</presence>
<actions>
<action>add</action>
<action>select</action>
</actions>
<relatedmodule>Documents</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_tickets</function>
<label>HelpDesk</label>
<sequence>10</sequence>
<presence>0</presence>
<actions>
<action>add</action>
</actions>
<relatedmodule>HelpDesk</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_products</function>
<label>Products</label>
<sequence>11</sequence>
<presence>0</presence>
<actions>
<action>select</action>
</actions>
<relatedmodule>Products</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_campaigns</function>
<label>Campaigns</label>
<sequence>13</sequence>
<presence>0</presence>
<actions>
<action>select</action>
</actions>
<relatedmodule>Campaigns</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_dependents_list</function>
<label>Service Contracts</label>
<sequence>14</sequence>
<presence>0</presence>
<actions>
<action>ADD</action>
</actions>
<relatedmodule>ServiceContracts</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_related_list</function>
<label>Services</label>
<sequence>15</sequence>
<presence>0</presence>
<actions>
<action>SELECT</action>
</actions>
<relatedmodule>Services</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_dependents_list</function>
<label>Assets</label>
<sequence>16</sequence>
<presence>0</presence>
<actions>
<action>ADD</action>
</actions>
<relatedmodule>Assets</relatedmodule>
</relatedlist>
<relatedlist>
<function>get_dependents_list</function>
<label>Projects</label>
<sequence>17</sequence>
<presence>0</presence>
<actions>
<action>ADD</action>
<action>SELECT</action>
</actions>
<relatedmodule>Project</relatedmodule>
</relatedlist>
</relatedlists>
<customlinks>
<customlink>
<linktype>DETAILVIEWBASIC</linktype>
<linklabel>LBL_ADD_NOTE</linklabel>
<linkurl><![CDATA[index.php?module=Documents&action=EditView&return_module=$MODULE$&return_action=DetailView&return_id=$RECORD$&parent_id=$RECORD$]]></linkurl>
<linkicon><![CDATA[themes/images/bookMark.gif]]></linkicon>
<sequence>0</sequence>
</customlink>
<customlink>
<linktype>DETAILVIEWBASIC</linktype>
<linklabel>LBL_SHOW_ACCOUNT_HIERARCHY</linklabel>
<linkurl><![CDATA[index.php?module=Accounts&action=AccountHierarchy&accountid=$RECORD$]]></linkurl>
<linkicon><![CDATA[]]></linkicon>
<sequence>0</sequence>
</customlink>
<customlink>
<linktype>DETAILVIEWBASIC</linktype>
<linklabel>Send SMS</linklabel>
<linkurl><![CDATA[javascript:SMSNotifierCommon.displaySelectWizard_DetailView('$MODULE$', '$RECORD$');]]></linkurl>
<linkicon><![CDATA[]]></linkicon>
<sequence>0</sequence>
</customlink>
<customlink>
<linktype>DETAILVIEWWIDGET</linktype>
<linklabel>DetailViewBlockCommentWidget</linklabel>
<linkurl><![CDATA[block://ModComments:modules/ModComments/ModComments.php]]></linkurl>
<linkicon><![CDATA[]]></linkicon>
<sequence>0</sequence>
</customlink>
<customlink>
<linktype>LISTVIEWBASIC</linktype>
<linklabel>Send SMS</linklabel>
<linkurl><![CDATA[SMSNotifierCommon.displaySelectWizard(this, '$MODULE$');]]></linkurl>
<linkicon><![CDATA[]]></linkicon>
<sequence>0</sequence>
</customlink>
</customlinks>
</module>
这个是你的模块能不能安装成功的主要因素,一定要现在浏览器检查好定义的东西是否完整和正确,相应的函数,方法功能可以在

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

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

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

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

 

你可能感兴趣的:(crm,vTiger,模块的创建)