[Vtigercrm-developers] Grouping doesn't work
Preexo
preexo at googlemail.com
Fri Apr 22 02:59:11 GMT 2016
Sounds like no one ever had the same issue... Amazing.
I am fighting with the report module a lot at the moment. Another
"drove-me-nuts" was the following situation:
- I added a UItype 10 field to the PO. The field can connect a SO to a PO.
This is the code I used to connect:
```
$moduleInstance = Vtiger_Module::getInstance('SalesOrder');
$relatedModuleInstance =
Vtiger_Module::getInstance('PurchaseOrder');
$relationLabel = 'Purchase Orders';
$moduleInstance->setRelatedList($relatedModuleInstance,
$relationLabel, array(''), 'get_dependents_list');
$purchaseOrder = Vtiger_Module::getInstance('PurchaseOrder');
$block = Vtiger_Block::getInstance('LBL_CUSTOM_INFORMATION',
$purchaseOrder);
// Add field
$field = new Vtiger_Field();
$field->name = 'salesorderid';
$field->label = 'SalesOrder';
$field->table = 'vtiger_purchaseorder';
$field->column = 'salesorderid';
$field->columntype = 'VARCHAR(255)';
$field->uitype = 10;
$field->typeofdata = 'V~O';
$block->addField($field);
$field->setRelatedModules(Array('SalesOrder'));
$block->save();
```
- I created a PO report. I can not select the SalesOrder from the related
modules list, but I can select the SalesOrder as a column (since it's a
field in the PO). When I do this, the report stays blank.
What is going on? Why can I not select the related module, why fails the
report so badly when selecting UItype 10 fields?
I would be so thankful for any input, best regards
--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Grouping-doesn-t-work-tp18846p18854.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.
More information about the vtigercrm-developers
mailing list