diff --git a/module/datatable/model.php b/module/datatable/model.php index 20e6524251..ef302060d6 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -130,7 +130,7 @@ class datatableModel extends model if(!isset($set['name'])) $setting[$field]['name'] = $field; if($module == 'testcase' && $field == 'id') $setting[$field]['name'] = 'caseID'; if($field == 'actions' && empty($setting[$field]['width'])) $setting[$field]['width'] = $fieldList[$field]['width']; - if(in_array($module, array('project', 'execution')) and empty($this->config->setCode)) unset($setting['code']); + if(in_array($module, array('product', 'project', 'execution')) and empty($this->config->setCode)) unset($setting['code']); } } diff --git a/module/product/config/dtable.php b/module/product/config/dtable.php index 94c535e6fb..33fe54ece1 100644 --- a/module/product/config/dtable.php +++ b/module/product/config/dtable.php @@ -154,6 +154,17 @@ $config->product->all->dtable->fieldList['name']['link'] = helper::creat $config->product->all->dtable->fieldList['name']['sortType'] = true; $config->product->all->dtable->fieldList['name']['group'] = 'g1'; +if(!empty($config->setCode)) +{ + $config->product->all->dtable->fieldList['code']['name'] = 'code'; + $config->product->all->dtable->fieldList['code']['title'] = $lang->product->code; + $config->product->all->dtable->fieldList['code']['width'] = 80; + $config->product->all->dtable->fieldList['code']['type'] = 'format'; + $config->product->all->dtable->fieldList['code']['show'] = true; + $config->product->all->dtable->fieldList['code']['sortType'] = true; + $config->product->all->dtable->fieldList['code']['group'] = 'g1'; +} + $config->product->all->dtable->fieldList['productLine']['name'] = 'productLine'; $config->product->all->dtable->fieldList['productLine']['title'] = $lang->product->belongingLine; $config->product->all->dtable->fieldList['productLine']['width'] = 136;