Commit 0abc5bbc authored by Fabien Morin's avatar Fabien Morin

- modify PaySheetTransaction_getLineListAsDict and...

- modify PaySheetTransaction_getLineListAsDict and PaySheetTransaction_getMovementList to return the Payroll Service
- readd the removed script PaySheetTransaction_buildAccountingLine

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18007 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e7bf7c2
...@@ -67,11 +67,8 @@ ...@@ -67,11 +67,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<string>Products.CMFCore.Expression</string> <tuple/>
<string>Expression</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -67,11 +67,8 @@ ...@@ -67,11 +67,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<string>Products.CMFCore.Expression</string> <tuple/>
<string>Expression</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -37,12 +37,24 @@ ...@@ -37,12 +37,24 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>acquisition_base_category</string> </key> <key> <string>acquisition_base_category</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>acquisition_object_id</string> </key> <key> <string>acquisition_object_id</string> </key>
<value> <value>
...@@ -53,6 +65,10 @@ ...@@ -53,6 +65,10 @@
<key> <string>acquisition_portal_type</string> </key> <key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value> <value> <string>python: []</string> </value>
</item> </item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
...@@ -64,24 +80,100 @@ ...@@ -64,24 +80,100 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value> <value>
<none/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>base_amount</string> </value> <value> <string>base_amount</string> </value>
</item> </item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>last_id</string> </key> <key> <string>last_id</string> </key>
<value> <string>1</string> </value> <value> <string>1</string> </value>
</item> </item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value> <value> <string>Base Category</string> </value>
</item> </item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Base Amount</string> </value> <value> <string>Base Amount</string> </value>
...@@ -92,6 +184,12 @@ ...@@ -92,6 +184,12 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -89,9 +89,7 @@ ...@@ -89,9 +89,7 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value> <string></string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>fallback_base_category</string> </key> <key> <string>fallback_base_category</string> </key>
......
...@@ -93,9 +93,7 @@ ...@@ -93,9 +93,7 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value> <string></string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>fallback_base_category</string> </key> <key> <string>fallback_base_category</string> </key>
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
An ERP5 Binder document class will eventually be defined\n An ERP5 Binder document class will eventually be defined\n
in order to implement a binder of documents which can itself\n in order to implement a binder of documents which can itself\n
be categorized.\n be categorized.\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>factory</string> </key> <key> <string>factory</string> </key>
......
<?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>
...@@ -82,6 +82,7 @@ for line in line_list: \n ...@@ -82,6 +82,7 @@ for line in line_list: \n
line_dict = {\n line_dict = {\n
\'group\' : line.getSourceSectionTitle(),\n \'group\' : line.getSourceSectionTitle(),\n
\'title\' : line.getTitle(),\n \'title\' : line.getTitle(),\n
\'payroll_service\' : getattr(line, \'payroll_service\', None)\n
}\n }\n
\n \n
line_dict[\'slice\'] = getattr(line, \'slice\', None)\n line_dict[\'slice\'] = getattr(line, \'slice\', None)\n
...@@ -171,9 +172,9 @@ return line_dict_list\n ...@@ -171,9 +172,9 @@ return line_dict_list\n
<string>line_dict_list</string> <string>line_dict_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>line</string> <string>line</string>
<string>line_dict</string>
<string>getattr</string> <string>getattr</string>
<string>None</string> <string>None</string>
<string>line_dict</string>
<string>_write_</string> <string>_write_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>round</string> <string>round</string>
......
...@@ -107,6 +107,7 @@ for paysheet_line in paysheet_line_list:\n ...@@ -107,6 +107,7 @@ for paysheet_line in paysheet_line_list:\n
base_name=base_name,\n base_name=base_name,\n
base=base,\n base=base,\n
base_participation_list=base_participation_list,\n base_participation_list=base_participation_list,\n
payroll_service=payroll_service.getId(),\n
**share_dict))\n **share_dict))\n
\n \n
if kw.has_key(\'sort_on\'):\n if kw.has_key(\'sort_on\'):\n
......
...@@ -294,9 +294,9 @@ ...@@ -294,9 +294,9 @@
<key> <string>date</string> </key> <key> <string>date</string> </key>
<value> <value>
<list> <list>
<string>year</string> <string>year</string>
<string>month</string> <string>month</string>
<string>day</string> <string>day</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -304,9 +304,9 @@ ...@@ -304,9 +304,9 @@
<key> <string>time</string> </key> <key> <string>time</string> </key>
<value> <value>
<list> <list>
<string>hour</string> <string>hour</string>
<string>minute</string> <string>minute</string>
<string>ampm</string> <string>ampm</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -294,9 +294,9 @@ ...@@ -294,9 +294,9 @@
<key> <string>date</string> </key> <key> <string>date</string> </key>
<value> <value>
<list> <list>
<string>year</string> <string>year</string>
<string>month</string> <string>month</string>
<string>day</string> <string>day</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -304,9 +304,9 @@ ...@@ -304,9 +304,9 @@
<key> <string>time</string> </key> <key> <string>time</string> </key>
<value> <value>
<list> <list>
<string>hour</string> <string>hour</string>
<string>minute</string> <string>minute</string>
<string>ampm</string> <string>ampm</string>
</list> </list>
</value> </value>
</item> </item>
......
177 178
\ No newline at end of file \ 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