Add remark for imported product relations
authorsstamer <s.stamer@metaways.de>
Tue, 22 Mar 2016 13:52:59 +0000 (14:52 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 23 Mar 2016 11:18:08 +0000 (12:18 +0100)
- This is needed for product count in CRM export for example

Change-Id: I3a738826088685afff24f687f3aa5611e0517dbb
Reviewed-on: http://gerrit.tine20.com/customers/2946
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Import/Abstract.php

index b48df36..626a16c 100644 (file)
@@ -607,7 +607,9 @@ abstract class Tinebase_Import_Abstract implements Tinebase_Import_Interface
             
             $relation = array(
                 'type'  => $field['destination'], 
-                'related_record' => $record
+                'related_record' => $record,
+                // TODO move this to product (modelconfig?)
+                'remark' => $field['destination'] == 'PRODUCT' ? array('quantity' => 1) : null
             );
             
             $relations[] = $relation;