[Erp5-report] r26850 - in /erp5/trunk/bt5/erp5_accounting: WorkflowTemplateItem/portal_work...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 6 17:03:13 CEST 2009
Author: jerome
Date: Wed May 6 17:03:13 2009
New Revision: 26850
URL: http://svn.erp5.org?rev=26850&view=rev
Log:
if the reference is generated based on the year, cast it to string, this way if later you have an accounting period with same short title, you will not have duplicated references
Modified:
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/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=26850&r1=26849&r2=26850&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 May 6 17:03:13 2009
@@ -78,7 +78,7 @@
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
- period_code = transaction.getStartDate().year()\n
+ period_code = str(transaction.getStartDate().year())\n
source_id_group = (\'accounting\', \'section\', source_section, period_code)\n
source_reference = transaction.generateNewId(id_group=source_id_group,\n
default=1)\n
@@ -90,7 +90,7 @@
if period is not None:\n
period_code = period.getShortTitle() or period.getTitle() or \'\'\n
if not period_code:\n
- period_code = transaction.getStopDate().year()\n
+ period_code = str(transaction.getStopDate().year())\n
destination_id_group = (\'accounting\', \'section\', destination_section, period_code)\n
destination_reference = transaction.generateNewId(\n
id_group=destination_id_group, default=1)\n
@@ -150,6 +150,7 @@
<string>period</string>
<string>period_code</string>
<string>None</string>
+ <string>str</string>
<string>source_id_group</string>
<string>source_reference</string>
<string>destination_id_group</string>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=26850&r1=26849&r2=26850&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Wed May 6 17:03:13 2009
@@ -1,1 +1,1 @@
-907
+908
More information about the Erp5-report
mailing list