[Erp5-report] r7290 - in /erp5/trunk/bt5/erp5_accounting: ActionTemplateItem/portal_types/A...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 16 15:02:21 CEST 2006


Author: jerome
Date: Tue May 16 15:01:55 2006
New Revision: 7290

URL: http://svn.erp5.org?rev=7290&view=rev
Log:
Fix AccountingTransaction_is*CurrencyConvertible to return False if resource is not defined on the transaction
( + add create_closing_transaction which was missing )

Added:
    erp5/trunk/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/create_closing_transaction.xml
Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.xml
    erp5/trunk/bt5/erp5_accounting/bt/change_log

Added: erp5/trunk/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/create_closing_transaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%2520Transaction%2520Module/create_closing_transaction.xml?rev=7290&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/create_closing_transaction.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/create_closing_transaction.xml Tue May 16 15:01:55 2006
@@ -1,0 +1,114 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.ActionInformation</string>
+          <string>ActionInformation</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_action</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>create_closing_transaction</string> </value>
+        </item>
+        <item>
+            <key> <string>optional</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>24.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Create Closing Transaction</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/AccountingTransactionModule_viewCreateClosingTransactionDialog</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.CMFCore.Expression</string>
+          <string>Expression</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>python:"Assignor" in object.portal_membership.getAuthenticatedMember().getRolesInContext(object)</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.xml?rev=7290&r1=7289&r2=7290&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isDestinationCurrencyConvertible.xml Tue May 16 15:01:55 2006
@@ -14,7 +14,7 @@
       <dictionary>
         <item>
             <key> <string>Python_magic</string> </key>
-            <value> <string encoding="base64">O/INCg==</string> </value>
+            <value> <string encoding="base64">bfINCg==</string> </value>
         </item>
         <item>
             <key> <string>Script_magic</string> </key>
@@ -68,12 +68,14 @@
             <key> <string>_body</string> </key>
             <value> <string>section_value = context.getDestinationSectionValue()\n
 \n
-if section_value is None or section_value.getProperty(\'price_currency\', None) is None:\n
+if section_value is None or \\\n
+   section_value.getProperty(\'price_currency\', None) is None:\n
   # If no section defined, no way to convert currencies\n
   return 0\n
 \n
 transaction_currency = context.getResource()\n
-return transaction_currency != section_value.getProperty(\'price_currency\', None)\n
+return transaction_currency is not None and\\\n
+   transaction_currency != section_value.getProperty(\'price_currency\', None)\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.xml?rev=7290&r1=7289&r2=7290&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_isSourceCurrencyConvertible.xml Tue May 16 15:01:55 2006
@@ -14,7 +14,7 @@
       <dictionary>
         <item>
             <key> <string>Python_magic</string> </key>
-            <value> <string encoding="base64">O/INCg==</string> </value>
+            <value> <string encoding="base64">bfINCg==</string> </value>
         </item>
         <item>
             <key> <string>Script_magic</string> </key>
@@ -68,12 +68,14 @@
             <key> <string>_body</string> </key>
             <value> <string>section_value = context.getSourceSectionValue()\n
 \n
-if section_value is None or section_value.getProperty(\'price_currency\', None) is None:\n
+if section_value is None or \\\n
+   section_value.getProperty(\'price_currency\', None) is None:\n
   # If no section defined, no way to convert currencies\n
   return 0\n
 \n
 transaction_currency = context.getResource()\n
-return transaction_currency != section_value.getProperty(\'price_currency\', None)\n
+return transaction_currency is not None and\\\n
+   transaction_currency != section_value.getProperty(\'price_currency\', None)\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=7290&r1=7289&r2=7290&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log Tue May 16 15:01:55 2006
@@ -1,3 +1,7 @@
+2006-05-16 jerome
+* Fix AccountingTransaction_is*CurrencyConvertible
+to return False if resource is not defined on the transaction
+
 2006-05-12 yo
 * Specify maintainers.
 




More information about the Erp5-report mailing list