714
edits
No edit summary Tag: 2017 source edit |
|||
| Line 117: | Line 117: | ||
此处 XXX 是extrafields代码 | 此处 XXX 是extrafields代码 | ||
== | ==如何在使用模板(propals等)时更改列的标签== | ||
在模板的PHP代码中,您可以通过修改名为“_tableau(...)”的函数来更改扩展字段的标签。 | |||
==在调用 $object->create() 或 $object->update()之前== | ==在调用 $object->create() 或 $object->update()之前== | ||
| Line 128: | Line 128: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==在编辑页面中显示扩展字段== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
| Line 139: | Line 138: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==在视图页面中显示扩展字段== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
| Line 149: | Line 148: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==在此对象类的Fetch方法之后== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); | require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); | ||
| Line 159: | Line 158: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==在此对象类的Update方法之后== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
// Actions on extra fields (by external module or standard code) | // Actions on extra fields (by external module or standard code) | ||
| Line 180: | Line 179: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==在此对象类的Delete方法之后== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
// Removed extrafields | // Removed extrafields | ||
| Line 197: | Line 196: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==管理页面== | ||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
$elementtype='facture'; //Must be the $table_element of the class that manage extrafield | $elementtype='facture'; //Must be the $table_element of the class that manage extrafield | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==恢复数据库== | ||
搜索并查找$listofmodulesextra的定义添加新的extrafield语句 | |||
<syntaxhighlight lang="PHP"> | <syntaxhighlight lang="PHP"> | ||
$listofmodulesextra=array('societe'=>'societe','adherent'=>'adherent','product'=>'product', | $listofmodulesextra=array('societe'=>'societe','adherent'=>'adherent','product'=>'product', | ||
| Line 211: | Line 211: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==相关视频== | ||
在该模型的PHP代码中,您可以通过"_tableau(...)"的函数来更改附加字段的标签。 | 在该模型的PHP代码中,您可以通过"_tableau(...)"的函数来更改附加字段的标签。 | ||
edits