[Erp5-report] r34554 daniele - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 14 13:40:28 CEST 2010


Author: daniele
Date: Wed Apr 14 13:40:27 2010
New Revision: 34554

URL: http://svn.erp5.org?rev=34554&view=rev
Log:
Change the generateNewId for the new API of id tool

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.xml
    erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/setReferences.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.xml?rev=34554&r1=34553&r2=34554&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.xml [utf8] Wed Apr 14 13:40:27 2010
@@ -142,10 +142,8 @@
     total_price = round(total_price, default_currency.getQuantityPrecision())\n
   if total_price == 0 or allow_grouping_with_different_quantity:\n
     id_group = (\'grouping_reference\', node, section, mirror_section)\n
-    # before, we where using generateNewId, we are now using generateNewLengthId which\n
-    # is using another storage. Get the last value generated with generateNewId and use it as default.\n
     previous_default = context.portal_ids.getLastGeneratedId(id_group=id_group, default=0)\n
-    grouping_reference = portal.portal_ids.generateNewLengthId(\n
+    grouping_reference = portal.portal_ids.generateNewId(id_generator=\'uid\',\n
                                                   id_group=id_group,\n
                                                   default=previous_default + 1)\n
     \n

Modified: erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/setReferences.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/setReferences.xml?rev=34554&r1=34553&r2=34554&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/setReferences.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/setReferences.xml [utf8] Wed Apr 14 13:40:27 2010
@@ -75,16 +75,17 @@
       destination_section_value.Organisation_getMappingRelatedOrganisation()\n
   destination_section = destination_section_value.getRelativeUrl()\n
 \n
-id_generator = state_change.getPortal().portal_ids.generateNewLengthId\n
+id_generator = state_change.getPortal().portal_ids.generateNewId\n
 previous_id_getter = state_change.getPortal().portal_ids.getLastGeneratedId\n
 \n
 # Invoice Reference is automatically filled only for Sale Invoice Transaction.\n
 if transaction.getPortalType() == \'Sale Invoice Transaction\':\n
   if not transaction.getReference():\n
     invoice_id_group = (\'accounting\', \'invoice\', source_section)\n
-    invoice_reference = id_generator(id_group=invoice_id_group,\n
+    invoice_reference = id_generator(id_generator=\'uid\',\n
+                                     id_group=invoice_id_group,\n
                                      default=previous_id_getter(invoice_id_group,\n
-                                                                default=0) + 1)\n
+                                     default=0) + 1)\n
     transaction.setReference(invoice_reference)\n
 \n
 \n
@@ -97,7 +98,8 @@
   if not period_code:\n
     period_code = str(transaction.getStartDate().year())\n
   source_id_group = (\'accounting\', \'section\', source_section, period_code)\n
-  source_reference = id_generator(id_group=source_id_group,\n
+  source_reference = id_generator(id_generator=\'uid\',\n
+                                  id_group=source_id_group,\n
                                   default=previous_id_getter(source_id_group,\n
                                                              default=0) + 1)\n
   transaction.setSourceReference(\'%s-%s\' % (period_code, source_reference))\n
@@ -110,9 +112,10 @@
   if not period_code:\n
     period_code = str(transaction.getStopDate().year())\n
   destination_id_group = (\'accounting\', \'section\', destination_section, period_code)\n
-  destination_reference = id_generator(id_group=destination_id_group,\n
+  destination_reference = id_generator(id_generator=\'uid\',\n
+                                       id_group=destination_id_group,\n
                                        default=previous_id_getter(destination_id_group,\n
-                                                                  default=0) + 1)\n
+                                                                    default=0) + 1)\n
   transaction.setDestinationReference(\'%s-%s\' % (period_code, destination_reference))\n
 </string> </value>
         </item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=34554&r1=34553&r2=34554&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Wed Apr 14 13:40:27 2010
@@ -1,1 +1,1 @@
-1176
+1177




More information about the Erp5-report mailing list