Commit c392a23a authored by Nicolas Wavrant's avatar Nicolas Wavrant

Follow the new format of DSN (p18v01) and allow declaration of end of contracts

/reviewed-on nexedi/erp5!688
parents b7c637a9 5f3e9864
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_list</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/PayrollDisenrollmentRecordModule_viewPayrollDisenrollmentRecordList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNDisenrollmentRecord_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<module>
<id>payroll_disenrollment_record_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Payroll Disenrollment Record Module</portal_type>
<title>Payroll Disenrollment Records</title>
</module>
\ No newline at end of file
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
<item>Pay Sheet Transaction Line</item> <item>Pay Sheet Transaction Line</item>
<item>Payment Condition</item> <item>Payment Condition</item>
</portal_type> </portal_type>
<portal_type id="Payroll Disenrollment Record Module">
<item>Payroll Disenrollment Record</item>
</portal_type>
<portal_type id="Payroll Enrollment Record Module"> <portal_type id="Payroll Enrollment Record Module">
<item>Payroll Enrollment Record</item> <item>Payroll Enrollment Record</item>
</portal_type> </portal_type>
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
<portal_type id="Pay Sheet Transaction"> <portal_type id="Pay Sheet Transaction">
<item>AccountingTransactionConstraint</item> <item>AccountingTransactionConstraint</item>
</portal_type> </portal_type>
<portal_type id="Payroll Disenrollment Record">
<item>SimpleItem</item>
</portal_type>
<portal_type id="Payroll Enrollment Record"> <portal_type id="Payroll Enrollment Record">
<item>SimpleItem</item> <item>SimpleItem</item>
</portal_type> </portal_type>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Payroll Disenrollment Record Module</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>content_icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>personal_item</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Payroll Disenrollment Record</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Item</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
<type>Pay Sheet Transaction Line</type> <type>Pay Sheet Transaction Line</type>
<workflow>delivery_movement_causality_interaction_workflow, delivery_movement_simulation_interaction_workflow, edit_workflow</workflow> <workflow>delivery_movement_causality_interaction_workflow, delivery_movement_simulation_interaction_workflow, edit_workflow</workflow>
</chain> </chain>
<chain>
<type>Payroll Disenrollment Record</type>
<workflow>edit_workflow, validation_workflow</workflow>
</chain>
<chain> <chain>
<type>Payroll Enrollment Record</type> <type>Payroll Enrollment Record</type>
<workflow>edit_workflow, validation_workflow</workflow> <workflow>edit_workflow, validation_workflow</workflow>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_doSelect</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PayrollDisenrollmentRecordModule_viewPayrollDisenrollmentRecordList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>PayrollDisenrollmentRecordModule_viewDSNDisenrollmentRecordList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payroll Disenrollment Records</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>portal_type</string>
<string>Record Type</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>DSN Disenrollment Record</string>
<string>DSN Disenrollment Record</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>payroll_disenrollment_record_module_selection</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payroll Disenrollment Records</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_validation_state_title</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PayrollDisenrollmentRecord_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>PayrollEnrollmentRecord_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Payroll Enrollment Record</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_validation_state_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_translated_workflow_state_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -26,8 +26,8 @@ else: ...@@ -26,8 +26,8 @@ else:
# and Organisation is taken into account # and Organisation is taken into account
career_step = career_step_list[0] career_step = career_step_list[0]
record = career_step.getAggregateValue() record = career_step.getAggregateValue(portal_type=portal_type)
if record is None: if record is None:
raise AttributeError("No Payroll Enrollment Record found for employee %s" % context.getRelativeUrl()) raise AttributeError("No %s found for employee %s" % (portal_type, context.getRelativeUrl()))
return record return record
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string>portal_type, organisation=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_getCareerRecord</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -32,6 +32,8 @@ Pay Sheet Transaction | view_profile ...@@ -32,6 +32,8 @@ Pay Sheet Transaction | view_profile
Pay Sheet Transaction | view_ratio_settings Pay Sheet Transaction | view_ratio_settings
Pay Sheet Transaction | view_social_declaration Pay Sheet Transaction | view_social_declaration
Payment Transaction | view_social_declaration Payment Transaction | view_social_declaration
Payroll Disenrollment Record Module | view
Payroll Disenrollment Record | view
Payroll Enrollment Record Module | view Payroll Enrollment Record Module | view
Payroll Enrollment Record | view Payroll Enrollment Record | view
Social Declaration Report Module | view Social Declaration Report Module | view
......
payroll_disenrollment_record_module
payroll_enrollment_record_module payroll_enrollment_record_module
paysheet_model_module paysheet_model_module
social_declaration_report_module social_declaration_report_module
\ No newline at end of file
...@@ -14,6 +14,7 @@ Pay Sheet Transaction | Pay Sheet Line ...@@ -14,6 +14,7 @@ Pay Sheet Transaction | Pay Sheet Line
Pay Sheet Transaction | Pay Sheet Model Ratio Line Pay Sheet Transaction | Pay Sheet Model Ratio Line
Pay Sheet Transaction | Pay Sheet Transaction Line Pay Sheet Transaction | Pay Sheet Transaction Line
Pay Sheet Transaction | Payment Condition Pay Sheet Transaction | Payment Condition
Payroll Disenrollment Record Module | Payroll Disenrollment Record
Payroll Enrollment Record Module | Payroll Enrollment Record Payroll Enrollment Record Module | Payroll Enrollment Record
Preference | Pay Sheet Transaction Preference | Pay Sheet Transaction
Social Declaration Report Module | Social Declaration Report Social Declaration Report Module | Social Declaration Report
\ No newline at end of file
...@@ -11,6 +11,8 @@ Pay Sheet Model Ratio Line ...@@ -11,6 +11,8 @@ Pay Sheet Model Ratio Line
Pay Sheet Model Slice Pay Sheet Model Slice
Pay Sheet Transaction Pay Sheet Transaction
Pay Sheet Transaction Line Pay Sheet Transaction Line
Payroll Disenrollment Record
Payroll Disenrollment Record Module
Payroll Enrollment Record Payroll Enrollment Record
Payroll Enrollment Record Module Payroll Enrollment Record Module
Social Declaration Report Social Declaration Report
......
Pay Sheet Transaction | AccountingTransactionConstraint Pay Sheet Transaction | AccountingTransactionConstraint
Payroll Disenrollment Record | SimpleItem
Payroll Enrollment Record | SimpleItem Payroll Enrollment Record | SimpleItem
Social Declaration Report | DublinCore Social Declaration Report | DublinCore
\ No newline at end of file
...@@ -20,6 +20,8 @@ Pay Sheet Transaction | delivery_causality_interaction_workflow ...@@ -20,6 +20,8 @@ Pay Sheet Transaction | delivery_causality_interaction_workflow
Pay Sheet Transaction | delivery_causality_workflow Pay Sheet Transaction | delivery_causality_workflow
Pay Sheet Transaction | delivery_simulation_interaction_workflow Pay Sheet Transaction | delivery_simulation_interaction_workflow
Pay Sheet Transaction | edit_workflow Pay Sheet Transaction | edit_workflow
Payroll Disenrollment Record | edit_workflow
Payroll Disenrollment Record | validation_workflow
Payroll Enrollment Record | edit_workflow Payroll Enrollment Record | edit_workflow
Payroll Enrollment Record | validation_workflow Payroll Enrollment Record | validation_workflow
Social Declaration Report | edit_workflow Social Declaration Report | edit_workflow
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </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>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNDisenrollmentRecord_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>generate_report</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Generate DSN Report</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNEndOfContractReport_makeReport</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_print</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_print</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>print</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Print DSN report</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNReport_printAsFile</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNEndOfContractReport_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view_editor</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Edit</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DSNReport_viewEditor</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
<portal_type id="DSN Monthly Report"> <portal_type id="DSN Monthly Report">
<item>DSN Change Block</item> <item>DSN Change Block</item>
</portal_type> </portal_type>
<portal_type id="Payroll Disenrollment Record Module">
<item>DSN Disenrollment Record</item>
</portal_type>
<portal_type id="Payroll Enrollment Record Module"> <portal_type id="Payroll Enrollment Record Module">
<item>DSN Enrollment Record</item> <item>DSN Enrollment Record</item>
</portal_type> </portal_type>
<portal_type id="Social Declaration Report Module"> <portal_type id="Social Declaration Report Module">
<item>DSN Early Recovery Report</item> <item>DSN Early Recovery Report</item>
<item>DSN End Of Contract Report</item>
<item>DSN Monthly Report</item> <item>DSN Monthly Report</item>
</portal_type> </portal_type>
</allowed_content_type_list> </allowed_content_type_list>
\ No newline at end of file
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<portal_type id="DSN Early Recovery Report"> <portal_type id="DSN Early Recovery Report">
<item>source_administration</item> <item>source_administration</item>
</portal_type> </portal_type>
<portal_type id="DSN End Of Contract Report">
<item>source_administration</item>
</portal_type>
<portal_type id="DSN Monthly Report"> <portal_type id="DSN Monthly Report">
<item>source_administration</item> <item>source_administration</item>
<item>source_section</item> <item>source_section</item>
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<item>Data</item> <item>Data</item>
<item>Event</item> <item>Event</item>
</portal_type> </portal_type>
<portal_type id="DSN Disenrollment Record">
<item>DsnDisenrollmentRecord</item>
</portal_type>
<portal_type id="DSN Enrollment Record"> <portal_type id="DSN Enrollment Record">
<item>DsnEnrollmentRecord</item> <item>DsnEnrollmentRecord</item>
</portal_type> </portal_type>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>content_icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addXMLObject</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>personal_item</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DSN Disenrollment Record</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Item</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>content_icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addXMLObject</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DSN End Of Contract Report</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>TextDocument</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<workflow_chain> <workflow_chain>
<chain>
<type>DSN Disenrollment Record</type>
<workflow>edit_workflow, validation_workflow</workflow>
</chain>
<chain> <chain>
<type>DSN Early Recovery Report</type> <type>DSN Early Recovery Report</type>
<workflow>dsn_social_declaration_report_workflow, edit_workflow</workflow> <workflow>dsn_social_declaration_report_workflow, edit_workflow</workflow>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DsnDisenrollmentRecord</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>end_of_contract_type_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>last_worked_date_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>notice_type_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/date</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>notification_date_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_notification_date</string>
<string>my_last_worked_date</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_notice_type</string>
<string>my_validation_state_title</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DSNDisenrollmentRecord_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DSNDisenrollmentRecord_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>DSN Disenrollment Records</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_last_worked_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date_time_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ContratFin.Djtp</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_notice_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Preavis.Type</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_notification_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date_time_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ContratFin.DateNotificationRupture</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_validation_state_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_translated_workflow_state_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
portal_categories = context.portal_categories
rubric_value_dict = {}
france_territory_code = ('FR' ,'GP', 'BL', 'MF', 'MQ', 'GF', 'RE', 'PM', 'YT', 'WF', 'PF', 'NC', 'MC')
def getCountryCode(target):
region = portal_categories.getCategoryValue(target.getDefaultAddressRegion(), base_category="region")
if region is None:
raise ValueError("Country should be defined in address field of %s" % target.getRelativeUrl())
codification = region.getCodification()
if codification is None:
raise ValueError("Region %s doesn't have codification" % region.getRelativeUrl())
return codification
def formatDate(datetime):
return "%02d%02d%04d" % (datetime.day(), datetime.month(), datetime.year())
def formatFloat(number):
return "{:.2f}".format(float(number))
# Declaration
if block_id == 'S20.G00.05':
now = DateTime()
rubric_value_dict['S20.G00.05.001'] = '02' # End of Contract DSN
rubric_value_dict['S20.G00.05.002'] = '01' # Normal Declaration
rubric_value_dict['S20.G00.05.003'] = '11'
rubric_value_dict['S20.G00.05.004'] = kw['order'] # Declaration.Ordre, incremented for each DSN
rubric_value_dict['S20.G00.05.006'] = ''
rubric_value_dict['S20.G00.05.007'] = formatDate(DateTime(now.year(), now.month(), now.day()))
rubric_value_dict['S20.G00.05.009'] = ''
rubric_value_dict['S20.G00.05.010'] = '01'
elif block_id == 'S21.G00.40':
item = target.getAggregateValue()
rubric_value_dict["S21.G00.40.001"] = formatDate(item.getCareerStartDate())
rubric_value_dict["S21.G00.40.009"] = '00000'
rubric_value_dict["S21.G00.40.019"] = target.getSubordinationValue().getCorporateRegistrationCode().replace(' ','')
rubric_value_dict["S21.G00.40.026"] = enrollment_record.getCivilServantStatus()
return rubric_value_dict
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string>block_id=None, target=None, enrollment_record=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DSNEndOfContractReport_getDataDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.DateUtils import getNumberOfDayInMonth
def getLastDateOfMonth(date):
return DateTime(date.year(), date.month(), getNumberOfDayInMonth(date))
if context.getSourceAdministration() is None:
return context.REQUEST.response.redirect("%s?portal_status_message=%s" % (context.absolute_url(), "DSN can't be built if some fields are empty"))
portal = context.getPortalObject()
getDSNBlockDict = context.DSNMonthlyReport_getDataDict
getEventDSNBlockDict = context.DSNEarlyRecoveryReport_getDataDict
# Get all paysheets for requested month
related_accounting_transaction_list = context.getAggregateRelatedValueList()
paysheet_list = sorted([transaction for transaction in related_accounting_transaction_list
if transaction.getPortalType() == "Pay Sheet Transaction"], key=lambda x: x.getTitle()) # Sorting for idempotent result in tests
if len(paysheet_list) != 1:
return context.Base_redirect(message='Exactly one paysheet should be declared')
# Retrieve related documents
paysheet = paysheet_list[0]
employee = paysheet.getSourceSectionValue()
career = employee.getDefaultCareerValue()
establishment = career.getSubordinationValue()
organisation = career.getDestinationValue()
disenrollment_record = employee.Person_getCareerRecord('DSN Disenrollment Record')
enrollment_record = employee.Person_getCareerRecord('DSN Enrollment Record')
# Set up variables needed for the DSN Report
dsn_file = []
nb_dsn = 1
organisation_contact = context.getSourceAdministrationValue()
dsn_order = portal.portal_ids.generateNewId(
id_generator='continuous_integer_increasing',
id_group='dsn_event_counter'
)
# Compute values related to the declaration
paysheet_data_dict = paysheet.PaySheetTransaction_getSocialContributionDict()
collective_contract_list = getDSNBlockDict(block_id='S21.G00.15')
# DSN HEADERS
dsn_file.append(getDSNBlockDict(block_id='S10.G00.00'))
dsn_file.append(getDSNBlockDict(block_id='S10.G00.01', target=organisation))
dsn_file.append(getDSNBlockDict(block_id='S10.G00.02', target=organisation_contact))
# DSN End Of Contract Report's Body
dsn_file.append(context.DSNEndOfContractReport_getDataDict(
block_id='S20.G00.05', order=dsn_order
))
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.06', target=organisation))
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.11', target=establishment))
for collective_contract in collective_contract_list:
if collective_contract['S21.G00.15.005'] in set([x[1] for x in paysheet_data_dict['taxable_base']]):
dsn_file.append({key: value for key, value in collective_contract.items() if key != 'S21.G00.15.004'})
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.30', target=employee))
dsn_file.append(
context.DSNEndOfContractReport_getDataDict(
block_id='S21.G00.40', target=employee.getDefaultCareerValue(), enrollment_record=enrollment_record
)
)
dsn_file.append(getDSNBlockDict("S21.G00.62", enrollment_record=enrollment_record, disenrollment_record=disenrollment_record))
dsn_file.append(getDSNBlockDict("S21.G00.63", enrollment_record=enrollment_record, disenrollment_record=disenrollment_record))
dsn_file.append(getDSNBlockDict(block_id='S21.G00.71', enrollment_record=enrollment_record))
dsn_file.append(getDSNBlockDict(block_id='S21.G00.50',
date=getLastDateOfMonth(paysheet.getStopDate()),
net_salary=paysheet_data_dict['net_salary'],
net_taxable_salary=paysheet_data_dict['net_taxable_salary']))
for remuneration_block in paysheet_data_dict['remuneration']:
if 'S21.G00.51.011' in remuneration_block and remuneration_block['S21.G00.51.011'] not in ('001', '002'):
continue
dsn_file.append(remuneration_block)
for bonus_category in paysheet_data_dict['other_bonus'].itervalues():
dsn_file.append(getDSNBlockDict(block_id='S21.G00.52', target=bonus_category))
for bonus_category in paysheet_data_dict['other_income'].itervalues():
dsn_file.append(getDSNBlockDict(block_id='S21.G00.54', target=bonus_category))
# Print DSN Record
rubric_counter = 0
dsn_report_string = ""
# NORMAL MODE
for block in dsn_file:
for rubric in sorted(block):
if block[rubric]:
rubric_counter += 1
dsn_report_string += "%s,'%s'\n" % (rubric, block[rubric])
# Footer block
footer = getDSNBlockDict(block_id='S90.G00.90', length=rubric_counter, dsn_record_counter=nb_dsn)
for rubric in sorted(footer.keys()):
dsn_report_string += "%s,'%s'\n" % (rubric, footer[rubric])
context.setTextContent(dsn_report_string.strip())
if batch_mode:
# Set charset for response
context.REQUEST.response.setHeader("Content-Type", "text/plain; charset=iso-8859-1")
return
context.REQUEST.response.redirect("%s?portal_status_message=%s" % (context.absolute_url(), "Monthly DSN Record Created."))
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>organisation=None</string> </value> <value> <string>batch_mode=False</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Person_getPayrollEnrollmentRecord</string> </value> <value> <string>DSNEndOfContractReport_makeReport</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>my_aggregate_related_title_list</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_source_administration_title</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_translated_simulation_state_title</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DSNEndOfContractReport_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DSNMonthlyReport_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>DSN Early Recovery Report</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>list_method</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_aggregate_related_title_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>source_section_title</string>
<string>Employee</string>
</tuple>
<tuple>
<string>start_date</string>
<string>Work Period Start</string>
</tuple>
<tuple>
<string>stop_date</string>
<string>Work Period Stop</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Accounting Transactions</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>getAggregateRelatedValueList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>base_category</string>
<string>catalog_index</string>
<string>portal_type</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_source_administration_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>base_category</string> </key>
<value> <string>source_administration</string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string>title</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_relation_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Person</string>
<string>Person</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Contact</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_translated_simulation_state_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_translated_workflow_state_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -53,7 +53,7 @@ if block_id == 'S10.G00.00': ...@@ -53,7 +53,7 @@ if block_id == 'S10.G00.00':
rubric_value_dict['S10.G00.00.003'] = '' rubric_value_dict['S10.G00.00.003'] = ''
rubric_value_dict['S10.G00.00.004'] = '' rubric_value_dict['S10.G00.00.004'] = ''
rubric_value_dict['S10.G00.00.005'] = '01' rubric_value_dict['S10.G00.00.005'] = '01'
rubric_value_dict['S10.G00.00.006'] = 'P03V01' rubric_value_dict['S10.G00.00.006'] = 'P18V01'
rubric_value_dict['S10.G00.00.007'] = '01' rubric_value_dict['S10.G00.00.007'] = '01'
rubric_value_dict['S10.G00.00.008'] = kw.get('type', '01') rubric_value_dict['S10.G00.00.008'] = kw.get('type', '01')
...@@ -110,7 +110,7 @@ if block_id == 'S21.G00.06': ...@@ -110,7 +110,7 @@ if block_id == 'S21.G00.06':
return '' return ''
def calculateManPower(): def calculateManPower():
manpower_dict = {} manpower_dict = {}
social_declaration_module = portal.getDefaultModule("DSN Monthly Report") social_declaration_module = portal.social_declaration_report_module
report_list = social_declaration_module.searchFolder( report_list = social_declaration_module.searchFolder(
portal_type="DSN Monthly Report", portal_type="DSN Monthly Report",
effective_date=str(context.getEffectiveDate().year()), effective_date=str(context.getEffectiveDate().year()),
...@@ -274,7 +274,7 @@ if block_id == 'S21.G00.40': ...@@ -274,7 +274,7 @@ if block_id == 'S21.G00.40':
rubric_value_dict["S21.G00.40.008"] = enrollment_record.getSpecialContractType() rubric_value_dict["S21.G00.40.008"] = enrollment_record.getSpecialContractType()
rubric_value_dict["S21.G00.40.009"] = '00000' rubric_value_dict["S21.G00.40.009"] = '00000'
rubric_value_dict["S21.G00.40.010"] = ('' if enrollment_record.getContractType() not in ('02', '29') else formatDate(enrollment_record.getCareerStopDate())) rubric_value_dict["S21.G00.40.010"] = ('' if enrollment_record.getContractType() not in ('02', '29') else formatDate(enrollment_record.getCareerStopDate()))
if enrollment_record.getCareerStopDate() and enrollment_record.getCareerStopDate() <= context.getEffectiveDate(): if enrollment_record.getCareerStopDate() and enrollment_record.getCareerStopDate() <= getLastDateOfMonth(context.getEffectiveDate()):
rubric_value_dict["S21.G00.40.010"] = formatDate(enrollment_record.getCareerStopDate()) rubric_value_dict["S21.G00.40.010"] = formatDate(enrollment_record.getCareerStopDate())
rubric_value_dict["S21.G00.40.011"] = enrollment_record.getWorkingUnitType() rubric_value_dict["S21.G00.40.011"] = enrollment_record.getWorkingUnitType()
rubric_value_dict["S21.G00.40.012"] = formatFloat(enrollment_record.getStandardWorkingUnit()) rubric_value_dict["S21.G00.40.012"] = formatFloat(enrollment_record.getStandardWorkingUnit())
...@@ -319,7 +319,7 @@ if block_id == 'S21.G00.44': ...@@ -319,7 +319,7 @@ if block_id == 'S21.G00.44':
# Versement Individu # Versement Individu
if block_id == 'S21.G00.50': if block_id == 'S21.G00.50':
# target is a paysheet # target is a paysheet
rubric_value_dict['S21.G00.50.001'] = formatDate(context.getEffectiveDate()) rubric_value_dict['S21.G00.50.001'] = formatDate(context.getEffectiveDate() or kw.get('date', None))
rubric_value_dict['S21.G00.50.002'] = formatFloat(kw['net_taxable_salary']) rubric_value_dict['S21.G00.50.002'] = formatFloat(kw['net_taxable_salary'])
rubric_value_dict['S21.G00.50.003'] = '' rubric_value_dict['S21.G00.50.003'] = ''
rubric_value_dict['S21.G00.50.004'] = formatFloat(kw['net_salary']) rubric_value_dict['S21.G00.50.004'] = formatFloat(kw['net_salary'])
...@@ -360,19 +360,20 @@ if block_id == 'S21.G00.62': ...@@ -360,19 +360,20 @@ if block_id == 'S21.G00.62':
rubric_value_dict['S21.G00.62.001'] = formatDate(enrollment_record.getCareerStopDate()) rubric_value_dict['S21.G00.62.001'] = formatDate(enrollment_record.getCareerStopDate())
if enrollment_record.getContractType() == '29': if enrollment_record.getContractType() == '29':
rubric_value_dict['S21.G00.62.002'] = '999' rubric_value_dict['S21.G00.62.002'] = '999'
# TODO : currently only works for end of training periods else:
rubric_value_dict['S21.G00.62.003'] = '' disenrollment_record = kw['disenrollment_record']
rubric_value_dict['S21.G00.62.004'] = '' rubric_value_dict['S21.G00.62.002'] = '059'
rubric_value_dict['S21.G00.62.005'] = '' rubric_value_dict['S21.G00.62.003'] = formatDate(disenrollment_record.getNotificationDate())
rubric_value_dict['S21.G00.62.006'] = '' rubric_value_dict['S21.G00.62.006'] = formatDate(disenrollment_record.getLastWorkedDate())
rubric_value_dict['S21.G00.62.007'] = '' rubric_value_dict['S21.G00.62.008'] = '02'
rubric_value_dict['S21.G00.62.008'] = ''
rubric_value_dict['S21.G00.62.009'] = '' if block_id == 'S21.G00.63':
rubric_value_dict['S21.G00.62.010'] = '' disenrollment_record = kw['disenrollment_record']
rubric_value_dict['S21.G00.62.011'] = '' rubric_value_dict['S21.G00.63.001'] = disenrollment_record.getNoticeType()
rubric_value_dict['S21.G00.62.012'] = '' # notified leave
rubric_value_dict['S21.G00.62.013'] = '' if disenrollment_record.getNoticeType() == '60':
rubric_value_dict['S21.G00.62.014'] = '' rubric_value_dict['S21.G00.63.001'] = formatDate(disenrollment_record.getNotificationDate())
rubric_value_dict['S21.G00.63.001'] = formatDate(enrollment_record.getContractStopDate())
# Autre suspension du contrat # Autre suspension du contrat
if block_id == 'S21.G00.65': if block_id == 'S21.G00.65':
......
...@@ -33,8 +33,6 @@ def getLeaveBlocAsDict(leave_period, leave_category): ...@@ -33,8 +33,6 @@ def getLeaveBlocAsDict(leave_period, leave_category):
bloc['S21.G00.60.001'] = leave_category.getCodification() bloc['S21.G00.60.001'] = leave_category.getCodification()
bloc['S21.G00.60.002'] = formatDate(leave_period.getStartDate()) bloc['S21.G00.60.002'] = formatDate(leave_period.getStartDate())
bloc['S21.G00.60.003'] = formatDate(leave_period.getStopDate()) bloc['S21.G00.60.003'] = formatDate(leave_period.getStopDate())
# employee left during this period
if from_date < leave_period.getStartDate() < effective_date:
bloc['S21.G00.60.004'] = '01' # we do subrogation bloc['S21.G00.60.004'] = '01' # we do subrogation
first_subrogation_day = addToDate(leave_period.getStartDate(), day=3) first_subrogation_day = addToDate(leave_period.getStartDate(), day=3)
bloc['S21.G00.60.005'] = formatDate(first_subrogation_day) bloc['S21.G00.60.005'] = formatDate(first_subrogation_day)
...@@ -42,8 +40,6 @@ def getLeaveBlocAsDict(leave_period, leave_category): ...@@ -42,8 +40,6 @@ def getLeaveBlocAsDict(leave_period, leave_category):
bloc['S21.G00.60.006'] = formatDate(addToDate(first_subrogation_day, month=3, days=-1)) bloc['S21.G00.60.006'] = formatDate(addToDate(first_subrogation_day, month=3, days=-1))
bloc['S21.G00.60.007'] = bank_account.getIban() bloc['S21.G00.60.007'] = bank_account.getIban()
bloc['S21.G00.60.008'] = bank_account.getBicCode() bloc['S21.G00.60.008'] = bank_account.getBicCode()
else:
bloc['S21.G00.60.004'] = '02' # we don't do subrogation
# employee restarted work during this period # employee restarted work during this period
if getattr(leave_period, 'expiration_date', None): if getattr(leave_period, 'expiration_date', None):
bloc['S21.G00.60.010'] = formatDate(leave_period.getExpirationDate()) bloc['S21.G00.60.010'] = formatDate(leave_period.getExpirationDate())
......
...@@ -62,6 +62,7 @@ else: ...@@ -62,6 +62,7 @@ else:
if bank_account.getValidationState() == 'validated'] if bank_account.getValidationState() == 'validated']
leave_period_dict = context.DSNMonthlyReport_getLeavePeriodDict(bank_account) leave_period_dict = context.DSNMonthlyReport_getLeavePeriodDict(bank_account)
employee_list = [] employee_list = []
leaving_employee_list = []
# DSN HEADERS # DSN HEADERS
dsn_type = ('01' if len(paysheet_list) else '02') dsn_type = ('01' if len(paysheet_list) else '02')
...@@ -70,7 +71,7 @@ dsn_file.append(getDSNBlockDict(block_id='S10.G00.01', target=organisation)) ...@@ -70,7 +71,7 @@ dsn_file.append(getDSNBlockDict(block_id='S10.G00.01', target=organisation))
dsn_file.append(getDSNBlockDict(block_id='S10.G00.02', target=organisation_contact)) dsn_file.append(getDSNBlockDict(block_id='S10.G00.02', target=organisation_contact))
# Monthly DSN # Monthly DSN
dsn_file.append(getDSNBlockDict(block_id='S20.G00.05', year=declared_year, month=declared_month, order=nb_dsn, type=dsn_type)) dsn_file.append(getDSNBlockDict(block_id='S20.G00.05', year=declared_year, month=declared_month, order=nb_dsn, type='01'))
dsn_file.append(getDSNBlockDict(block_id='S21.G00.06', target=organisation)) dsn_file.append(getDSNBlockDict(block_id='S21.G00.06', target=organisation))
...@@ -201,11 +202,9 @@ elif len(paysheet_list): ...@@ -201,11 +202,9 @@ elif len(paysheet_list):
target=aggregated_social_contribution_dict[ctp_code])) target=aggregated_social_contribution_dict[ctp_code]))
# Annual Taxes # Annual Taxes
if organisation == establishment: if organisation == establishment and declared_month == 12:
tax_list = organisation.Organisation_getAnnualTaxDictList(context) tax_list = organisation.Organisation_getAnnualTaxDictList(context)
for tax in tax_list: for tax in tax_list:
if tax['tax_code'] == '011':
dsn_file.append(getDSNBlockDict(block_id='S21.G00.42', target=establishment))
dsn_file.append(getDSNBlockDict(block_id='S21.G00.44', target=establishment, **tax)) dsn_file.append(getDSNBlockDict(block_id='S21.G00.44', target=establishment, **tax))
...@@ -243,6 +242,19 @@ for employee_data_dict, paysheet_data_dict in employee_result_list: ...@@ -243,6 +242,19 @@ for employee_data_dict, paysheet_data_dict in employee_result_list:
'S21.G00.60.012')} 'S21.G00.60.012')}
dsn_file.append(leave_block) dsn_file.append(leave_block)
if enrollment_record.getCareerStopDate() != None and \
first_date_of_month <= enrollment_record.getCareerStopDate() <= last_date_of_month:
if enrollment_record.getContractType() != '29':
leaving_employee_list.append(employee)
disenrollment_record = portal.restrictedTraverse(employee).Person_getCareerRecord('DSN Disenrollment Record')
dsn_file.append({rubric: value
for rubric, value in getDSNBlockDict("S21.G00.62", enrollment_record=enrollment_record, disenrollment_record=disenrollment_record).items()
if rubric in ('S21.G00.62.001',
'S21.G00.62.002',
'S21.G00.62.006',
'S21.G00.62.016',
'S21.G00.62.017')})
# All employees don't share all the insurance contract, so here we need to # All employees don't share all the insurance contract, so here we need to
# know to which the employee contributes. Let's loop over the keys of # know to which the employee contributes. Let's loop over the keys of
# paysheet_data_dict['taxable_base'], # paysheet_data_dict['taxable_base'],
...@@ -331,7 +343,7 @@ if len(leave_period_dict): ...@@ -331,7 +343,7 @@ if len(leave_period_dict):
id_generator='continuous_integer_increasing', id_generator='continuous_integer_increasing',
id_group='dsn_event_counter') id_group='dsn_event_counter')
employee = portal.restrictedTraverse(employee) employee = portal.restrictedTraverse(employee)
dsn_file.append(getEventDSNBlockDict(block_id='S20.G00.05', dsn_type='04', order=dsn_order)) #'04' is DSN Leave Event dsn_file.append(getEventDSNBlockDict(block_id='S20.G00.05', dsn_type='04', order=dsn_order))
dsn_file.append(getEventDSNBlockDict(block_id='S20.G00.07', target=organisation_contact)) dsn_file.append(getEventDSNBlockDict(block_id='S20.G00.07', target=organisation_contact))
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.06', target=organisation)) dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.06', target=organisation))
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.11', target=establishment)) dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.11', target=establishment))
...@@ -339,6 +351,53 @@ if len(leave_period_dict): ...@@ -339,6 +351,53 @@ if len(leave_period_dict):
dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.40', target=employee.getDefaultCareerValue())) dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.40', target=employee.getDefaultCareerValue()))
dsn_file.append(period) dsn_file.append(period)
# Add end of contract event DSN if needed
# Usually we don't merge the monthly DSN with the End of Contract DSN,
# but if we need the code is below :
#for employee in leaving_employee_list:
# nb_dsn += 1
# employee = portal.restrictedTraverse(employee)
# dsn_order = portal.portal_ids.generateNewId(
# id_generator='continuous_integer_increasing',
# id_group='dsn_event_counter')
# disenrollment_record = employee.Person_getCareerRecord('DSN Disenrollment Record')
# enrollment_record = employee.Person_getCareerRecord('DSN Enrollment Record')
# for employee_data_dict, paysheet_data_dict in employee_result_list:
# if employee_data_dict['person_relative_url'] == employee.getRelativeUrl():
# break
# dsn_file.append(context.DSNEndOfContractReport_getDataDict(
# block_id='S20.G00.05', order=dsn_order
# ))
# dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.06', target=organisation))
# dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.11', target=establishment))
# for collective_contract in collective_contract_list:
# if collective_contract['S21.G00.15.005'] in set([x[1] for x in paysheet_data_dict['taxable_base']]):
# dsn_file.append({key: value for key, value in collective_contract.items() if key != 'S21.G00.15.004'})
# dsn_file.append(getEventDSNBlockDict(block_id='S21.G00.30', target=employee))
# dsn_file.append(
# context.DSNEndOfContractReport_getDataDict(
# block_id='S21.G00.40', target=employee.getDefaultCareerValue(), enrollment_record=enrollment_record
# )
# )
# dsn_file.append(getDSNBlockDict("S21.G00.62", enrollment_record=enrollment_record, disenrollment_record=disenrollment_record))
# dsn_file.append(getDSNBlockDict("S21.G00.63", enrollment_record=enrollment_record, disenrollment_record=disenrollment_record))
# dsn_file.append(getDSNBlockDict(block_id='S21.G00.71', enrollment_record=enrollment_record))
# dsn_file.append(getDSNBlockDict(block_id='S21.G00.50',
# net_salary=paysheet_data_dict['net_salary'],
# net_taxable_salary=paysheet_data_dict['net_taxable_salary']))
# for remuneration_block in paysheet_data_dict['remuneration']:
# if 'S21.G00.51.011' in remuneration_block and remuneration_block['S21.G00.51.011'] not in ('001', '002'):
# continue
# dsn_file.append(remuneration_block)
# for bonus_category in paysheet_data_dict['other_bonus'].itervalues():
# dsn_file.append(getDSNBlockDict(block_id='S21.G00.52', target=bonus_category))
#
# for bonus_category in paysheet_data_dict['other_income'].itervalues():
# dsn_file.append(getDSNBlockDict(block_id='S21.G00.54', target=bonus_category))
# Print DSN Record # Print DSN Record
last_block = '' last_block = ''
rubric_counter = 0 rubric_counter = 0
......
...@@ -16,24 +16,17 @@ tax_property_name_list = { ...@@ -16,24 +16,17 @@ tax_property_name_list = {
'continuous_short_term_professional_training_fee_liability': ('013', '014'), 'continuous_short_term_professional_training_fee_liability': ('013', '014'),
} }
if dsn_report.getEffectiveDate().month() == 5:
tax = 'cvae_fee_liability'
result = {
'tax_code': '',
'amount': 0., # TODO: get amount right
}
if context.getProperty(tax, False):
result['tax_code'] = tax_property_name_list['cvae_fee_liability'][0]
else:
result['tax_code'] = tax_property_name_list['cvae_fee_liability'][1]
return result
year_start_date = DateTime(dsn_report.getEffectiveDate().year(), 1, 1) year_start_date = DateTime(dsn_report.getEffectiveDate().year(), 1, 1)
year_stop_date = DateTime(dsn_report.getEffectiveDate().year(), 12, 31) year_stop_date = DateTime(dsn_report.getEffectiveDate().year(), 12, 31)
for tax, value_list in tax_property_name_list.items(): for tax, value_list in tax_property_name_list.items():
# CVAE is now out of DSN's scope, so always declare as not subjected
# http://dsn-info.custhelp.com/app/answers/detail/a_id/1885
if tax == 'cvae_fee_liability':
is_subjected = False
else:
is_subjected = context.getProperty(tax, False) is_subjected = context.getProperty(tax, False)
amount = 0. amount = 0.
if is_subjected: if is_subjected:
amount = portal.portal_simulation.getInventory( amount = portal.portal_simulation.getInventory(
......
...@@ -26,6 +26,8 @@ all_other_income_set = set(portal_categories.getCategoryValue('base_amount/payro ...@@ -26,6 +26,8 @@ all_other_income_set = set(portal_categories.getCategoryValue('base_amount/payro
all_other_bonus_set = set(portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/other_bonus').objectValues(portal_type='Category')) all_other_bonus_set = set(portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/other_bonus').objectValues(portal_type='Category'))
trainee_base_contribution = portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/base/gratification_stage') trainee_base_contribution = portal_categories.getCategoryValue('base_amount/payroll/l10n/fr/base/gratification_stage')
enrollment_record = context.getSourceSectionValue().Person_getCareerRecord('DSN Enrollment Record')
def formatDate(datetime): def formatDate(datetime):
return "%02d%02d%04d" % (datetime.day(), datetime.month(), datetime.year()) return "%02d%02d%04d" % (datetime.day(), datetime.month(), datetime.year())
...@@ -90,7 +92,6 @@ def makeTaxableBaseComponentBlock(movement, category): ...@@ -90,7 +92,6 @@ def makeTaxableBaseComponentBlock(movement, category):
if isFullMonthPaysheet(context): if isFullMonthPaysheet(context):
base = minimum_salary base = minimum_salary
else: else:
enrollment_record = context.getSourceSectionValue().Person_getPayrollEnrollmentRecord()
worked_time = float(enrollment_record.getWorkingUnitQuantity()) worked_time = float(enrollment_record.getWorkingUnitQuantity())
normal_working_time = float(enrollment_record.getStandardWorkingUnit()) normal_working_time = float(enrollment_record.getStandardWorkingUnit())
base = minimum_salary * (worked_time / normal_working_time) base = minimum_salary * (worked_time / normal_working_time)
...@@ -141,8 +142,8 @@ def makeOtherBonusBlock(movement, category): ...@@ -141,8 +142,8 @@ def makeOtherBonusBlock(movement, category):
return { return {
'code': category, 'code': category,
'quantity': movement.base, 'quantity': movement.base,
'start_date': movement.getStartDate(), 'start_date': (movement.getStartDate() if category in ('026', '027', '029') else ''),
'stop_date': movement.getStopDate() 'stop_date': (movement.getStopDate() if category in ('026', '027', '029') else ''),
} }
for movement in context.PaySheetTransaction_getMovementList(): for movement in context.PaySheetTransaction_getMovementList():
...@@ -215,15 +216,15 @@ for movement in context.PaySheetTransaction_getMovementList(): ...@@ -215,15 +216,15 @@ for movement in context.PaySheetTransaction_getMovementList():
trainee_bonus = movement.base trainee_bonus = movement.base
result['taxable_base'][('02', '')] = { result['taxable_base'][('02', '')] = {
'code': '02', 'code': '02',
'start_date': '', 'start_date': movement.getStartDate(),
'stop_date': '', 'stop_date': movement.getStopDate(),
'base': 0., 'base': 0.,
'contract_id': '' 'contract_id': ''
} }
result['taxable_base'][('03', '')] = { result['taxable_base'][('03', '')] = {
'code': '03', 'code': '03',
'start_date': '', 'start_date': movement.getStartDate(),
'stop_date': '', 'stop_date': movement.getStopDate(),
'base': 0., 'base': 0.,
'contract_id': '' 'contract_id': ''
} }
...@@ -258,7 +259,6 @@ if len(result['ctp']): ...@@ -258,7 +259,6 @@ if len(result['ctp']):
###################################################################### ######################################################################
# Remuneration and Activity # Remuneration and Activity
enrollment_record = context.getSourceSectionValue().Person_getPayrollEnrollmentRecord()
is_trainee = (True if enrollment_record.getContractType() == '29' else False) is_trainee = (True if enrollment_record.getContractType() == '29' else False)
is_corporate_executive = (True if enrollment_record.getContractType() == '80' else False) is_corporate_executive = (True if enrollment_record.getContractType() == '80' else False)
career_start_date = enrollment_record.getCareerStartDate() career_start_date = enrollment_record.getCareerStartDate()
......
portal = context.getPortalObject() enrollment_record = context.Person_getCareerRecord('DSN Enrollment Record')
enrollment_record = context.Person_getPayrollEnrollmentRecord()
if dsn_report is None: if dsn_report is None:
dsn_report = context dsn_report = context
......
DSN Change Block | view DSN Change Block | view
DSN Disenrollment Record | view
DSN Early Recovery Report | generate_report DSN Early Recovery Report | generate_report
DSN Early Recovery Report | print DSN Early Recovery Report | print
DSN Early Recovery Report | view DSN Early Recovery Report | view
DSN Early Recovery Report | view_editor DSN Early Recovery Report | view_editor
DSN End Of Contract Report | generate_report
DSN End Of Contract Report | print
DSN End Of Contract Report | view
DSN End Of Contract Report | view_editor
DSN Enrollment Record | view DSN Enrollment Record | view
DSN Monthly Report | create_replacement DSN Monthly Report | create_replacement
DSN Monthly Report | generate_report DSN Monthly Report | generate_report
......
DSN Monthly Report | DSN Change Block DSN Monthly Report | DSN Change Block
Payroll Disenrollment Record Module | DSN Disenrollment Record
Payroll Enrollment Record Module | DSN Enrollment Record Payroll Enrollment Record Module | DSN Enrollment Record
Social Declaration Report Module | DSN Early Recovery Report Social Declaration Report Module | DSN Early Recovery Report
Social Declaration Report Module | DSN End Of Contract Report
Social Declaration Report Module | DSN Monthly Report Social Declaration Report Module | DSN Monthly Report
\ No newline at end of file
DSN Change Block | use DSN Change Block | use
DSN Early Recovery Report | source_administration DSN Early Recovery Report | source_administration
DSN End Of Contract Report | source_administration
DSN Monthly Report | source_administration DSN Monthly Report | source_administration
DSN Monthly Report | source_section DSN Monthly Report | source_section
DSN Monthly Report | source_trade DSN Monthly Report | source_trade
\ No newline at end of file
DSN Change Block DSN Change Block
DSN Disenrollment Record
DSN Early Recovery Report DSN Early Recovery Report
DSN End Of Contract Report
DSN Enrollment Record DSN Enrollment Record
DSN Monthly Report DSN Monthly Report
\ No newline at end of file
DSN Change Block | Data DSN Change Block | Data
DSN Change Block | Event DSN Change Block | Event
DSN Disenrollment Record | DsnDisenrollmentRecord
DSN Enrollment Record | DsnEnrollmentRecord DSN Enrollment Record | DsnEnrollmentRecord
DSN Monthly Report | Amount DSN Monthly Report | Amount
Organisation | DSNReportConfiguration Organisation | DSNReportConfiguration
\ No newline at end of file
DSN Disenrollment Record | edit_workflow
DSN Disenrollment Record | validation_workflow
DSN Early Recovery Report | dsn_social_declaration_report_workflow DSN Early Recovery Report | dsn_social_declaration_report_workflow
DSN Early Recovery Report | edit_workflow DSN Early Recovery Report | edit_workflow
DSN Enrollment Record | edit_workflow DSN Enrollment Record | edit_workflow
......
DsnDisenrollmentRecord
DsnEnrollmentRecord DsnEnrollmentRecord
DSNReportConfiguration DSNReportConfiguration
\ No newline at end of file
S10.G00.00.001,'Logiciel maison' S10.G00.00.001,'Logiciel maison'
S10.G00.00.002,'Logiciel maison' S10.G00.00.002,'Logiciel maison'
S10.G00.00.005,'01' S10.G00.00.005,'01'
S10.G00.00.006,'P03V01' S10.G00.00.006,'P18V01'
S10.G00.00.007,'01' S10.G00.00.007,'01'
S10.G00.00.008,'01' S10.G00.00.008,'01'
S10.G00.01.001,'440047504' S10.G00.01.001,'440047504'
......
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