Commit 852ef34e authored by Jérome Perrin's avatar Jérome Perrin

This script has been removed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6931 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 085cb207
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># Return default precision\n
if mapping_id in (None, \'\'):\n
return 2\n
\n
# Get the category that hold the organisation\n
from Products.ERP5Type.Utils import convertToUpperCase\n
method_id = "get" + convertToUpperCase(mapping_id) + "Value"\n
if not hasattr(context, method_id):\n
raise "Error in roundDebitCredit", "\'%s\' is not defined on %s" % (method_id, context.getRelativeUrl())\n
method = getattr(context, method_id, None)\n
mapping_category = method()\n
\n
# Get the organisation that hold the currency\n
organisation = None\n
mapping_portal_type = mapping_category.getPortalType()\n
if mapping_portal_type == \'Category\':\n
organisation = mapping_category.getMappingRelatedValue(portal_type=\'Organisation\')\n
elif mapping_portal_type == \'Organisation\':\n
organisation = mapping_category\n
if organisation == None:\n
raise "Error in roundDebitCredit", "Organisation not found via \'%s\' category on %s" % (mapping_id, context.getRelativeUrl())\n
\n
# Get the currency\n
currency = organisation.getPriceCurrencyValue()\n
if currency in (\'\', None):\n
raise "Error in roundDebitCredit", "Currency on %s is required" % (organisation.getRelativeUrl())\n
\n
# Return the precision of the currency\n
return currency.getQuantityPrecision()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/Section_getCurrencyPrecision</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>mapping_id=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>mapping_id</string>
<string>None</string>
<string>Products.ERP5Type.Utils</string>
<string>convertToUpperCase</string>
<string>method_id</string>
<string>hasattr</string>
<string>context</string>
<string>_getattr_</string>
<string>getattr</string>
<string>method</string>
<string>mapping_category</string>
<string>organisation</string>
<string>mapping_portal_type</string>
<string>currency</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Section_getCurrencyPrecision</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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