Commit 333c1176 authored by Fabien Morin's avatar Fabien Morin

remove PaySheetTransaction_buildAccountingLine, because in fact it's strange...

remove PaySheetTransaction_buildAccountingLine, because in fact it's strange and not use (thanks to Jerome ;)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18012 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9747f175
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</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 encoding="cdata"><![CDATA[
PRIORITY = 1\n
\n
pay_sheet = context\n
\n
# Delete Accounting Lines\n
for accounting_line in pay_sheet.objectValues(portal_type = [\'Pay Sheet Transaction Line\']):\n
pay_sheet.deleteContent(accounting_line.getId())\n
\n
applied_rule = context.getCausalityRelatedValue()\n
# Delete the applied rule if present\n
if applied_rule != None:\n
simulation_tool = context.portal_simulation\n
ar_id = applied_rule.getId()\n
ar_url = applied_rule.absolute_url()\n
simulation_tool.deleteObject(ar_id)\n
\n
for applied_rule in simulation_tool.objectValues():\n
if ar_id == applied_rule.getId():\n
return "Applied rule <a href=\'%s\'>%s</a> of <a href=\'\'>%s</a> paysheet not deleted" % (ar_url, ar_id, pay_sheet.absolute_url(), pay_sheet.getPath())\n
\n
previous_tag = pay_sheet.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = pay_sheet.getPath() + \'_expand\'\n
\n
activate_kw = { \'tag\' : expand_tag\n
, \'priority\': PRIORITY\n
}\n
\n
pay_sheet.activate( tag = expand_tag\n
, after_tag = previous_tag\n
, priority = PRIORITY\n
).updateAppliedRule( rule_id = \'default_invoice_rule\'\n
, activate_kw = activate_kw\n
)\n
\n
builder = pay_sheet.portal_deliveries.pay_sheet_transaction_builder\n
builder.activate( activity = \'SQLQueue\'\n
, after_tag = expand_tag\n
, priority = PRIORITY\n
).build( explanation_uid = pay_sheet.getUid()\n
, activate_kw = activate_kw\n
)\n
\n
return None\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>PRIORITY</string>
<string>context</string>
<string>pay_sheet</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>accounting_line</string>
<string>applied_rule</string>
<string>None</string>
<string>simulation_tool</string>
<string>ar_id</string>
<string>ar_url</string>
<string>previous_tag</string>
<string>expand_tag</string>
<string>activate_kw</string>
<string>builder</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_buildAccountingLine</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
178
\ No newline at end of file
179
\ No newline at end of file
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