[Erp5-report] r38785 fabien - in /experimental/bt5/erp5_credential: PortalTypePropertySheet...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 30 11:22:02 CEST 2010


Author: fabien
Date: Thu Sep 30 11:21:59 2010
New Revision: 38785

URL: http://svn.erp5.org?rev=38785&view=rev
Log:
add CredentialOrganisationProperties property sheet to make possible to store informations related to the organisation the new user belongs to. Associate this new propertysheet to the Credential Request

Added:
    experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialOrganisationProperties.py
Modified:
    experimental/bt5/erp5_credential/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
    experimental/bt5/erp5_credential/bt/revision
    experimental/bt5/erp5_credential/bt/template_portal_type_property_sheet_list
    experimental/bt5/erp5_credential/bt/template_property_sheet_id_list

Modified: experimental/bt5/erp5_credential/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/PortalTypePropertySheetTemplateItem/property_sheet_list.xml?rev=38785&r1=38784&r2=38785&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/PortalTypePropertySheetTemplateItem/property_sheet_list.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/PortalTypePropertySheetTemplateItem/property_sheet_list.xml [utf8] Thu Sep 30 11:21:59 2010
@@ -3,6 +3,7 @@
   <item>CredentialQuestion</item>
  </portal_type>
  <portal_type id="Credential Request">
+  <item>CredentialOrganisationProperties</item>
   <item>CredentialRequest</item>
  </portal_type>
  <portal_type id="Credential Update">

Added: experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialOrganisationProperties.py
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialOrganisationProperties.py?rev=38785&view=auto
==============================================================================
--- experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialOrganisationProperties.py (added)
+++ experimental/bt5/erp5_credential/PropertySheetTemplateItem/CredentialOrganisationProperties.py [utf8] Thu Sep 30 11:21:59 2010
@@ -0,0 +1,87 @@
+##############################################################################
+#
+# Copyright (c) 2002-2010 Nexedi SA and Contributors. All Rights Reserved.
+#                         Fabien Morin <fabien at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+##############################################################################
+
+class CredentialOrganisationProperties:
+  """
+    Used to store properties related to organisation
+  """
+
+  _properties = (
+    # Acquisition
+    { 'id'          : 'organisation_default_address',
+      'storage_id'  : 'organisation_default_address',
+      'description' : 'The organisation address of the person',
+      'type'        : 'content',
+      'portal_type' : ('Address'),
+      'acquired_property_id'      : ( 'text', 'street_address', 'city',
+                                     'zip_code', 'region', 'region_title',
+                                     'prefecture'),
+      'acquisition_base_category' : ('region', ),
+      'acquisition_portal_type'   : ('Category',),
+      'acquisition_copy_value'    : 0,
+      'acquisition_mask_value'    : 1,
+      'acquisition_sync_value'    : 0,
+      'acquisition_accessor_id'   : 'getDefaultAddressValue',
+      'acquisition_depends'       : None,
+      'mode'        : 'w' },
+    { 'id'          : 'organisation_default_telephone',
+      'storage_id'  : 'organisation_default_telephone',
+      'description' : 'The organisation phone of the person',
+      'type'        : 'content',
+      'portal_type' : ('Telephone'),
+      'acquired_property_id'      : ( 'text', 'telephone_number' ),
+      'acquisition_base_category' : ('region', ),
+      'acquisition_portal_type'   : ('Category',),
+      'acquisition_copy_value'    : 0,
+      'acquisition_mask_value'    : 1,
+      'acquisition_sync_value'    : 0,
+      'acquisition_accessor_id'   : 'getDefaultTelephoneValue',
+      'acquisition_depends'       : None,
+      'mode'        : 'w' },
+    { 'id'          : 'organisation_title',
+      'description' : '',
+      'type'        : 'string',
+      'translatable'  : 1,
+      'translation_domain' : 'erp5_content',
+      'default'     : '',
+      'acquisition_base_category': (),
+      'acquisition_portal_type': (),
+      'acquisition_copy_value': 0,
+      'acquisition_mask_value': 1,
+      'acquisition_accessor_id': 'getTitle',
+      'acquisition_depends': None,
+      'mode'        : 'w' },
+    { 'id'          : 'organisation_description',
+      'description' : '',
+      'default'     : '',
+      'type'        : 'text',
+      'mode'        : 'w' },
+  )
+
+
+  _categories = ('question', )

Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38785&r1=38784&r2=38785&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Thu Sep 30 11:21:59 2010
@@ -1 +1 @@
-223
+223
\ No newline at end of file

Modified: experimental/bt5/erp5_credential/bt/template_portal_type_property_sheet_list
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/template_portal_type_property_sheet_list?rev=38785&r1=38784&r2=38785&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/template_portal_type_property_sheet_list [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/template_portal_type_property_sheet_list [utf8] Thu Sep 30 11:21:59 2010
@@ -1,4 +1,5 @@
 Credential Question | CredentialQuestion
+Credential Request | CredentialOrganisationProperties
 Credential Request | CredentialRequest
 Credential Update | DefaultImage
 Person | DefaultCredentialQuestion
\ No newline at end of file

Modified: experimental/bt5/erp5_credential/bt/template_property_sheet_id_list
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/template_property_sheet_id_list?rev=38785&r1=38784&r2=38785&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/template_property_sheet_id_list [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/template_property_sheet_id_list [utf8] Thu Sep 30 11:21:59 2010
@@ -1,4 +1,5 @@
 CredentialQuestion
 DefaultCredentialQuestion
 CredentialRequest
-CredentialPreference
\ No newline at end of file
+CredentialPreference
+CredentialOrganisationProperties
\ No newline at end of file




More information about the Erp5-report mailing list