[Erp5-report] r23527 - in /erp5/trunk/bt5/erp5_egov: WorkflowTemplateItem/portal_workflow/e...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 9 18:05:44 CEST 2008


Author: fabien
Date: Tue Sep  9 18:05:42 2008
New Revision: 23527

URL: http://svn.erp5.org?rev=23527&view=rev
Log:
report_section refactoring to be more generic and easier to customize with more pdf

Modified:
    erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/PDFDocument_validateFormDataBeforeSubmission.xml
    erp5/trunk/bt5/erp5_egov/bt/revision

Modified: erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/PDFDocument_validateFormDataBeforeSubmission.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/PDFDocument_validateFormDataBeforeSubmission.xml?rev=23527&r1=23526&r2=23527&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/PDFDocument_validateFormDataBeforeSubmission.xml (original)
+++ erp5/trunk/bt5/erp5_egov/WorkflowTemplateItem/portal_workflow/egov_interaction_workflow/scripts/PDFDocument_validateFormDataBeforeSubmission.xml Tue Sep  9 18:05:42 2008
@@ -74,19 +74,8 @@
 portal_type = document.getPortalType()\n
 \n
 # dict of required documents\n
-attachement_type_dict = { \'Declaration TVA\':\n
-                            {\n
-                             \'ID Card\':\'Required\',\n
-                             \'Expenditure Table\':\'Optional\',\n
-                             \'Exemptions Details\':\'Required\',\n
-                             \'Application Certificate\':\'Optional\',\n
-                            },\n
-                          \'Subscription Form\':\n
-                            {\n
-                             \'ID Card\':\'Required\',\n
-                             \'M0 Form\':\'Required\',\n
-                            }\n
-                        }\n
+attachement_method = getattr(context, \'%s_getApplicationIncomeDict\' % context.getPortalType().replace(\' \', \'\'))\n
+attachement_type_dict = attachement_method()\n
 \n
 # if the portal type is not mapped, no attached files are required\n
 if not attachement_type_dict.has_key(portal_type):\n
@@ -157,6 +146,9 @@
                             <string>portal</string>
                             <string>N_</string>
                             <string>portal_type</string>
+                            <string>getattr</string>
+                            <string>context</string>
+                            <string>attachement_method</string>
                             <string>attachement_type_dict</string>
                             <string>append</string>
                             <string>$append0</string>

Modified: erp5/trunk/bt5/erp5_egov/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/bt/revision?rev=23527&r1=23526&r2=23527&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/bt/revision (original)
+++ erp5/trunk/bt5/erp5_egov/bt/revision Tue Sep  9 18:05:42 2008
@@ -1,1 +1,1 @@
-276
+278




More information about the Erp5-report mailing list