Index: main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/batching.py
===================================================================
--- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/batching.py	(revision 12181)
+++ main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/batching.py	(revision 12181)
@@ -0,0 +1,28 @@
+## $Id$
+##
+## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""Batch processing for skeleton products.
+"""
+from waeup.ikoba.products.batching import ProductProcessor
+from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
+from ikobacustom.skeleton.interfaces import MessageFactory as _
+
+class SkeletonProductProcessor(ProductProcessor):
+
+    iface = ISkeletonProduct
+
+    #name = _('SkeletonProduct Processor')
Index: main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/export.py
===================================================================
--- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/export.py	(revision 12181)
+++ main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/export.py	(revision 12181)
@@ -0,0 +1,35 @@
+## $Id$
+##
+## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""Exporters for skeleton products.
+"""
+import grok
+from waeup.ikoba.interfaces import MessageFactory as _
+from waeup.ikoba.utils.helpers import iface_names
+from waeup.ikoba.products.export import ProductExporter
+from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
+
+
+class SkeletonProductExporter(ProductExporter):
+    """Exporter for products.
+    """
+
+    fields = tuple(sorted(iface_names(ISkeletonProduct))) + (
+        'users_with_local_roles',)
+
+    #: The title under which this exporter will be displayed
+    #title = _(u'Skeleton Products')
Index: main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/product.py
===================================================================
--- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/product.py	(revision 12177)
+++ main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/product.py	(revision 12181)
@@ -20,11 +20,11 @@
 """
 import grok
-from zope.component import getUtility
-from zope.component.interfaces import IFactory, ComponentLookupError
+from zope.component.interfaces import IFactory
 from zope.interface import implementedBy
 from waeup.ikoba.interfaces import MessageFactory as _
-from waeup.ikoba.utils.helpers import attrs_to_fields, get_current_principal
+from waeup.ikoba.utils.helpers import attrs_to_fields
 from waeup.ikoba.products.product import Product
 from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
+
 
 class SkeletonProduct(Product):
Index: main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/tests/test_browser.py
===================================================================
--- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/tests/test_browser.py	(revision 12181)
+++ main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/tests/test_browser.py	(revision 12181)
@@ -0,0 +1,84 @@
+## $Id$
+##
+## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""
+Product browser and functional tests.
+"""
+import os
+import grok
+import datetime
+from cStringIO import StringIO
+from zope.component import queryUtility, getUtility
+from zope.event import notify
+from zope.interface.verify import verifyObject, verifyClass
+from waeup.ikoba.products.tests.test_batching import ProductImportExportSetup
+from ikobacustom.skeleton.products.product import SkeletonProduct
+from ikobacustom.skeleton.products.export import SkeletonProductExporter
+from ikobacustom.skeleton.products.batching import SkeletonProductProcessor
+from ikobacustom.skeleton.testing import FunctionalLayer
+
+
+class ProductImportExportTest(ProductImportExportSetup):
+
+    layer = FunctionalLayer
+
+    def setup_for_export(self):
+        product = SkeletonProduct()
+        product.product_id = u'LIC'
+        self.app['products'][product.product_id] = self.product = product
+        self.outfile = os.path.join(self.workdir, 'myoutput.csv')
+        return
+
+    def test_export_reimport_all(self):
+        # we can export all products in a portal
+        # set values we can expect in export file
+        self.setup_for_export()
+        exporter = SkeletonProductExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertEqual(result,
+            'contract_category,product_id,title,users_with_local_roles\r\n'
+            'license,LIC,Unnamed,[]\r\n')
+        # We can import the same file.
+        processor = SkeletonProductProcessor()
+        result = processor.doImport(
+            self.outfile,
+            ['contract_category','product_id','title','users_with_local_roles'],
+            mode='create')
+        num_succ, num_fail, finished_path, failed_path = result
+        #content = open(failed_path).read()
+        # The object exists.
+        self.assertEqual(num_fail,1)
+        # We remove the original product.
+        del self.app['products']['LIC']
+        result = processor.doImport(
+            self.outfile,
+            ['contract_category','product_id','title','users_with_local_roles'],
+            mode='create')
+        num_succ, num_fail, finished_path, failed_path = result
+        self.assertEqual(num_succ,1)
+        self.assertEqual(num_fail,0)
+        # We can import the same file in update mode.
+        processor = SkeletonProductProcessor()
+        result = processor.doImport(
+            self.outfile,
+            ['contract_category','product_id','title','users_with_local_roles'],
+            mode='update')
+        num_succ, num_fail, finished_path, failed_path = result
+        self.assertEqual(num_succ,1)
+        self.assertEqual(num_fail,0)
+        return
