Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/batching.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/batching.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/batching.py	(revision 14184)
@@ -24,5 +24,5 @@
 from ikobacustom.uniben.customers.interfaces import (
     IUnibenCustomer,
-    IUnibenCustomerDocument, IUnibenContract)
+    IUnibenCustomerDocument, IRIAAContract)
 from ikobacustom.uniben.interfaces import MessageFactory as _
 
@@ -37,20 +37,20 @@
 
 
-class UnibenCustomerDocumentProcessor(CustomerDocumentProcessorBase):
+class UnibenCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase):
     """A batch processor for IUnibenCustomerDocument objects.
     """
-    util_name = 'unibencustomerdocumentprocessor'
+    util_name = 'unibencustomerpdfdocumentprocessor'
     grok.name(util_name)
-    name = _('Uniben Customer Document Processor')
+    name = _('Uniben Customer PDF Document Processor')
     iface = IUnibenCustomerDocument
-    factory_name = 'waeup.UnibenCustomerDocument'
+    factory_name = 'waeup.UnibenCustomerPDFDocument'
 
 
-class UnibenContractProcessor(ContractProcessorBase):
-    """A batch processor for IUnibenContract objects.
+class RIAAContractProcessor(ContractProcessorBase):
+    """A batch processor for IRIAAContract objects.
     """
-    util_name = 'unibencontractprocessor'
+    util_name = 'riaacontractprocessor'
     grok.name(util_name)
-    name = _('Uniben Customer Contract Processor')
-    iface = IUnibenContract
-    factory_name = 'waeup.UnibenContract'
+    name = _('RIAA Contract Processor')
+    iface = IRIAAContract
+    factory_name = 'waeup.RIAAContract'
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/contracts.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/contracts.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/contracts.py	(revision 14184)
@@ -28,43 +28,47 @@
 from ikobacustom.uniben.interfaces import MessageFactory as _
 from ikobacustom.uniben.customers.interfaces import (
-    IUnibenContract, IUnibenContractEdit, IUnibenContractProcess,
-    IUnibenContractOfficialUse)
+    IRIAAContract, IRIAAContractEdit, IRIAAContractProcess,
+    IRIAAContractOfficialUse)
 
 
 class UnibenContract(ContractBase):
-    """This is a sample contract.
+    """This is a baseclass contract.
+    """
+
+class RIAAContract(UnibenContract):
+    """Research and Innovative Achievement Award
     """
 
     grok.implements(
-        IUnibenContractProcess,
-        IUnibenContract,
-        IUnibenContractEdit,
+        IRIAAContractProcess,
+        IRIAAContract,
+        IRIAAContractEdit,
         ICustomerNavigation)
 
-    contract_category = 'sample'
+    contract_category = 'riaa'
 
-    form_fields_interface = IUnibenContract
+    form_fields_interface = IRIAAContract
 
-    edit_form_fields_interface = IUnibenContractEdit
+    edit_form_fields_interface = IRIAAContractEdit
 
-    ou_form_fields_interface = IUnibenContractOfficialUse
+    ou_form_fields_interface = IRIAAContractOfficialUse
 
-    check_docs_interface = IUnibenContract
+    check_docs_interface = IRIAAContract
 
-UnibenContract = attrs_to_fields(UnibenContract)
+RIAAContract = attrs_to_fields(RIAAContract)
 
 
 # Contracts must be importable. So we might need a factory.
-class UnibenContractFactory(grok.GlobalUtility):
-    """A factory for contracts.
+class RIAAContractFactory(grok.GlobalUtility):
+    """A factory for RIAAContract.
     """
     grok.implements(IFactory)
-    grok.name(u'waeup.UnibenContract')
-    title = u"Create a new contract.",
-    description = u"This factory instantiates new sample contract instances."
+    grok.name(u'waeup.RIAAContract')
+    title = u"Create a new riaa contract.",
+    description = u"This factory instantiates new riaa contract instances."
 
     def __call__(self, *args, **kw):
-        return UnibenContract(*args, **kw)
+        return RIAAContract(*args, **kw)
 
     def getInterfaces(self):
-        return implementedBy(UnibenContract)
+        return implementedBy(RIAAContract)
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/documents.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/documents.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/documents.py	(revision 14184)
@@ -26,5 +26,6 @@
 from waeup.ikoba.customers.documents import CustomerDocumentBase
 from ikobacustom.uniben.interfaces import MessageFactory as _
-from ikobacustom.uniben.customers.interfaces import IUnibenCustomerDocument
+from ikobacustom.uniben.customers.interfaces import (
+    IUnibenCustomerDocument, IUnibenCustomerPDFDocument)
 
 
@@ -40,5 +41,5 @@
     # only one file per Document object. Thus the following
     # tuple should contain only a single filename string.
-    filenames = ('sample',)
+    filenames = ('scan',)
 
     form_fields_interface = IUnibenCustomerDocument
@@ -61,2 +62,30 @@
     def getInterfaces(self):
         return implementedBy(UnibenCustomerDocument)
+
+class UnibenCustomerPDFDocument(CustomerDocumentBase):
+    """This is a sample customer document.
+    """
+
+    grok.implements(IUnibenCustomerPDFDocument, ICustomerNavigation)
+    grok.provides(IUnibenCustomerPDFDocument)
+
+    filenames = ('scan.pdf',)
+
+    form_fields_interface = IUnibenCustomerPDFDocument
+
+UnibenCustomerPDFDocument = attrs_to_fields(UnibenCustomerPDFDocument)
+
+
+class UnibenCustomerPDFDocumentFactory(grok.GlobalUtility):
+    """A factory for customer documents.
+    """
+    grok.implements(IFactory)
+    grok.name(u'waeup.UnibenCustomerPDFDocument')
+    title = u"Create a new document.",
+    description = u"This factory instantiates new document instances."
+
+    def __call__(self, *args, **kw):
+        return UnibenCustomerPDFDocument(*args, **kw)
+
+    def getInterfaces(self):
+        return implementedBy(UnibenCustomerPDFDocument)
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/export.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/export.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/export.py	(revision 14184)
@@ -22,5 +22,6 @@
     CustomerExporter, CustomerDocumentExporterBase, ContractExporterBase)
 from ikobacustom.uniben.customers.interfaces import (
-    IUnibenCustomer, IUnibenCustomerDocument, IUnibenContractProcess)
+    IUnibenCustomer, IUnibenCustomerDocument, IRIAAContractProcess,
+    IUnibenCustomerPDFDocument)
 from ikobacustom.uniben.interfaces import MessageFactory as _
 
@@ -32,18 +33,18 @@
 
 
-class UnibenCustomerDocumentExporter(CustomerDocumentExporterBase):
+class UnibenCustomerPDFDocumentExporter(CustomerDocumentExporterBase):
     """Exporter for documents.
     """
-    grok.name('unibencustomerdocuments')
-    iface = IUnibenCustomerDocument
-    title = _(u'Uniben Customer Documents')
-    class_name = 'UnibenCustomerDocument'
+    grok.name('unibencustomerpdfdocuments')
+    iface = IUnibenCustomerPDFDocument
+    title = _(u'Uniben Customer PDF Documents')
+    class_name = 'UnibenCustomerPDFDocument'
 
 
-class UnibenContractExporter(ContractExporterBase):
+class RIAAContractExporter(ContractExporterBase):
     """Exporter for Contract instances.
     """
-    grok.name('unibencontracts')
-    iface = IUnibenContractProcess
-    title = _(u'Uniben Customer Contracts')
-    class_name = 'UnibenContract'
+    grok.name('riaacontracts')
+    iface = IRIAAContractProcess
+    title = _(u'RIAA Customer Contracts')
+    class_name = 'RIAAContract'
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/fileviewlets.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/fileviewlets.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/fileviewlets.py	(revision 14184)
@@ -23,5 +23,6 @@
     FileDisplay, FileUpload, Image)
 
-from ikobacustom.uniben.customers.documents import UnibenCustomerDocument
+from ikobacustom.uniben.customers.documents import (
+    UnibenCustomerDocument, UnibenCustomerPDFDocument)
 
 from waeup.ikoba.customers.browser import (
@@ -83,2 +84,56 @@
     grok.view(PDFDocumentSlip)
 
+class PDFScanManageUpload(FileUpload):
+    """Scan upload viewlet for officers.
+    """
+    grok.view(DocumentManageFormPage)
+    grok.context(UnibenCustomerPDFDocument)
+    grok.require('waeup.manageCustomer')
+    label = _(u'PDF File')
+    title = _(u'PDF File')
+    mus = 1024 * 1000
+    download_name = u'scan.pdf'
+    tab_redirect = '#tab2'
+
+    @property
+    def download_filename(self):
+        return u"%s.pdf" % self.context.document_id[:9]
+
+
+class PDFScanEditUpload(PDFScanManageUpload):
+    """Scan upload viewlet for customer.
+    """
+    grok.view(DocumentEditFormPage)
+    grok.require('waeup.handleCustomer')
+
+
+class PDFScanDisplay(FileDisplay):
+    """Scan display viewlet.
+    """
+    grok.order(1)
+    grok.context(UnibenCustomerPDFDocument)
+    grok.require('waeup.viewCustomer')
+    grok.view(DocumentDisplayFormPage)
+    label = _(u'PDF Scan')
+    title = _(u'PDF Scan')
+    download_name = u'scan.pdf'
+
+    @property
+    def download_filename(self):
+        return u"%s.pdf" % self.context.document_id[:9]
+
+
+class PDFScanImage(Image):
+    """Scan document.
+    """
+    grok.name('scan.pdf')
+    grok.context(UnibenCustomerPDFDocument)
+    grok.require('waeup.viewCustomer')
+    download_name = u'scan.pdf'
+
+    @property
+    def download_filename(self):
+        return u"%s" % self.context.document_id[:9]
+
+class PDFScanSlip(PDFScanDisplay):
+    grok.view(PDFDocumentSlip)
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/interfaces.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/interfaces.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/interfaces.py	(revision 14184)
@@ -20,5 +20,5 @@
 from waeup.ikoba.interfaces import IIkobaObject
 from waeup.ikoba.customers.interfaces import (
-    ICustomer, ICustomerDocument, IContract)
+    ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract)
 from waeup.ikoba.customers.vocabularies import (
     ConCatProductSource, CustomerDocumentSource)
@@ -40,4 +40,9 @@
     """
 
+class IUnibenCustomerPDFDocument(ICustomerPDFDocument):
+    """A customer pdf document.
+
+    """
+
 # Customer contract interfaces
 
@@ -53,6 +58,17 @@
         )
 
-class IUnibenContractOfficialUse(IIkobaObject):
-    """Interface for editing official use data.
+    document_object2 = schema.Choice(
+        title = _(u'Document 2'),
+        source = CustomerDocumentSource(),
+        required = False,
+        )
+
+class IRIAAContract(IUnibenContract):
+    """A Retention of Name contract.
+
+    """
+
+class IRIAAContractOfficialUse(IIkobaObject):
+    """Interface for editing RIAA official use data.
 
     """
@@ -63,6 +79,7 @@
         )
 
-class IUnibenContractProcess(IUnibenContract, IUnibenContractOfficialUse):
-    """Interface for processing contract data.
+
+class IRIAAContractProcess(IRIAAContract, IRIAAContractOfficialUse):
+    """Interface for processing RIAA data.
     """
 
@@ -72,9 +89,9 @@
         required = False,
         readonly = False,
-        default = [],
+        defaultFactory=list,
         )
 
-class IUnibenContractEdit(IUnibenContract):
-    """Interface for editing sample contract data by customers.
+class IRIAAContractEdit(IRIAAContract):
+    """Interface for editing RIAA data by customers.
 
     """
@@ -85,2 +102,8 @@
         required = True,
         )
+
+    document_object2 = schema.Choice(
+        title = _(u'Document 2'),
+        source = CustomerDocumentSource(),
+        required = True,
+        )
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_browser.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_browser.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_browser.py	(revision 14184)
@@ -33,9 +33,9 @@
     UnibenCustomerExporter,
     UnibenCustomerDocumentExporter,
-    UnibenContractExporter)
+    RIAAContractExporter)
 from ikobacustom.uniben.customers.batching import (
     UnibenCustomerProcessor,
     UnibenCustomerDocumentProcessor,
-    UnibenContractProcessor)
+    RIAAContractProcessor)
 from ikobacustom.uniben.testing import FunctionalLayer, samples_dir
 
@@ -49,5 +49,5 @@
 
     def setup_customizable_params(self):
-        self._contract_category = u'sample'
+        self._contract_category = u'riaa'
         return
 
@@ -64,5 +64,5 @@
         document.title = u'My first document'
         customer['documents'].addDocument(document)
-        contract = createObject(u'waeup.UnibenContract')
+        contract = createObject(u'waeup.RIAAContract')
         contract.tc_dict = {'en':u'Hello World'}
         customer['contracts'].addContract(contract)
@@ -162,5 +162,5 @@
         # set values we can expect in export file
         self.setup_for_export()
-        exporter = UnibenContractExporter()
+        exporter = RIAAContractExporter()
         exporter.export_all(self.app, self.outfile)
         result = open(self.outfile, 'rb').read()
@@ -169,15 +169,15 @@
             'fee_based,history,last_product_id,product_object,product_options,'
             'state,tc_dict,title,user_id,valid_from,valid_to\r\n'
-            'UnibenContract,,sample,%s,,0,'
+            'RIAAContract,,riaa,%s,,0,'
             '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
             ',,,[],created,{\'en\': u\'Hello World\'},,K1000000,,\r\n'
             % self.contract.contract_id)
         # We can reimport the file if we change the header (user_id -> customer_id)
-        processor = UnibenContractProcessor()
+        processor = RIAAContractProcessor()
         open(self.outfile, 'wb').write(
             'class_name,contract_category,contract_id,document_object,'
             'history,last_product_id,product_object,product_options,'
             'state,tc_dict,title,user_id\r\n'
-            'UnibenContract,sample,%s,,'
+            'RIAAContract,riaa,%s,,'
             '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
             ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n'
@@ -220,7 +220,7 @@
 
     def setup_customizable_params(self):
-        self._contract_category = u'sample'
+        self._contract_category = u'riaa'
         self._document_factory = 'waeup.UnibenCustomerDocument'
-        self._contract_factory = 'waeup.UnibenContract'
+        self._contract_factory = 'waeup.RIAAContract'
         return
 
@@ -303,7 +303,7 @@
 
     def setup_customizable_params(self):
-        self._contract_category = u'sample'
+        self._contract_category = u'riaa'
         self._document_factory = 'waeup.UnibenCustomerDocument'
-        self._contract_factory = 'waeup.UnibenContract'
+        self._contract_factory = 'waeup.RIAAContract'
         return
 
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_contract.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_contract.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_contract.py	(revision 14184)
@@ -29,6 +29,6 @@
 
 from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
-from ikobacustom.uniben.customers.contracts import UnibenContract
-from ikobacustom.uniben.customers.interfaces import IUnibenContract
+from ikobacustom.uniben.customers.contracts import RIAAContract
+from ikobacustom.uniben.customers.interfaces import IRIAAContract
 
 
@@ -38,17 +38,17 @@
 
     def test_interfaces(self):
-        verify.verifyClass(IUnibenContract, UnibenContract)
-        verify.verifyClass(ICustomerNavigation, UnibenContract)
-        verify.verifyObject(IUnibenContract, UnibenContract())
-        verify.verifyObject(ICustomerNavigation, UnibenContract())
+        verify.verifyClass(IRIAAContract, RIAAContract)
+        verify.verifyClass(ICustomerNavigation, RIAAContract)
+        verify.verifyObject(IRIAAContract, RIAAContract())
+        verify.verifyObject(ICustomerNavigation, RIAAContract())
         return
 
     def test_addContract(self):
         container = ContractsContainer()
-        contract = createObject(u'waeup.UnibenContract')
+        contract = createObject(u'waeup.RIAAContract')
         id = contract.contract_id
         container.addContract(contract)
         self.assertEqual(container[id], contract)
         self.assertRaises(TypeError, container.addContract, object())
-        self.assertEqual(contract.class_name, 'UnibenContract')
+        self.assertEqual(contract.class_name, 'RIAAContract')
         return
Index: main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/utils.py
===================================================================
--- main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/utils.py	(revision 14181)
+++ main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/utils.py	(revision 14184)
@@ -33,5 +33,5 @@
     #: A prefix used when generating new customer ids. Each customer id will
     #: start with this string. The default is 'K'.
-    CUSTOMER_ID_PREFIX = u'K'
+    CUSTOMER_ID_PREFIX = u'B'
 
     DOCMANAGE_CUSTOMER_STATES = (REQUESTED, APPROVED, PROVISIONALLY)
@@ -44,14 +44,10 @@
 
     DOCTYPES_DICT = {
-        #'CustomerSampleDocument': _('Sample Document'),
-        #'CustomerPDFDocument': _('PDF Document'),
-
-        'UnibenCustomerDocument': _('Uniben Document'),
+        #'UnibenCustomerDocument': _('Uniben Document'),
+        'UnibenCustomerPDFDocument': _('Uniben PDF Document'),
         }
 
     CONTYPES_DICT = {
-        #'SampleContract': _('Sample Contract'),
-
-        'UnibenContract': _('Uniben Contract'),
+        'RIAAContract': _('RIAA Contract'),
         }
 
@@ -62,4 +58,4 @@
     EXPORTER_NAMES = (
         'customers',
-        'unibencustomerdocuments',
-        'unibencontracts')
+        'unibencustomerpdfdocuments',
+        'riaacontracts')
