[Erp5-report] r24856 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 11 10:37:26 CET 2008


Author: jerome
Date: Thu Dec 11 10:37:24 2008
New Revision: 24856

URL: http://svn.erp5.org?rev=24856&view=rev
Log:
- Use GAP reference or ID (it's bad to use ID)
- when using 'account_reference' as account number method, fallback to GAP
reference or ID of no reference defined on the account.


Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml?rev=24856&r1=24855&r2=24856&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapId.xml [utf8] Thu Dec 11 10:37:24 2008
@@ -62,7 +62,9 @@
 number_method = preference_tool.getPreferredAccountNumberMethod()\n
 \n
 if number_method == \'account_reference\':\n
-  return context.getReference(\'\')\n
+  reference = context.getReference()\n
+  if reference:\n
+    return reference\n
 \n
 # elif number_method == \'gap_id\':\n
 else:\n
@@ -72,7 +74,7 @@
 \n
   for gap in context.getGapValueList() : \n
     if current_gap in gap.getPath() : \n
-       return gap.getId()\n
+       return gap.getReference() or gap.getId()\n
   return \'\'\n
 </string> </value>
         </item>
@@ -114,6 +116,7 @@
                             <string>context</string>
                             <string>preference_tool</string>
                             <string>number_method</string>
+                            <string>reference</string>
                             <string>current_gap</string>
                             <string>_getiter_</string>
                             <string>gap</string>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=24856&r1=24855&r2=24856&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Thu Dec 11 10:37:24 2008
@@ -1,1 +1,1 @@
-826
+827




More information about the Erp5-report mailing list