Commit f2e9b1a8 authored by Jérome Perrin's avatar Jérome Perrin

Fix AccountingTransaction_is*CurrencyConvertible to return False if resource...

Fix AccountingTransaction_is*CurrencyConvertible to return False if resource is not defined on the transaction
( + add create_closing_transaction which was missing )


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7290 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59464515
<?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>
......@@ -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>
......
......@@ -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>
......
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment