[Erp5-report] r45044 aurel - in /erp5/trunk/bt5/erp5_payroll: SkinTemplateItem/portal_skins...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 4 14:32:14 CEST 2011
Author: aurel
Date: Mon Apr 4 14:32:14 2011
New Revision: 45044
URL: http://svn.erp5.org?rev=45044&view=rev
Log:
update & improve scripts which are used in render of paysheet as ODT
Modified:
erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementTotalPriceFromCategory.xml
erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.xml
erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseContributionTotalPrice.xml
erp5/trunk/bt5/erp5_payroll/bt/revision
Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementTotalPriceFromCategory.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementTotalPriceFromCategory.xml?rev=45044&r1=45043&r2=45044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementTotalPriceFromCategory.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementTotalPriceFromCategory.xml [utf8] Mon Apr 4 14:32:14 2011
@@ -55,17 +55,26 @@
category_list parameter is in variation_category_list of the PaySheet line \n
and wich has a base_contribution in the base_contribution_list\n
\'\'\'\n
+if excluded_reference_list is None:\n
+ excluded_reference_list = []\n
\n
total_price = 0\n
movement_list = context.getMovementList(portal_type=(\'Pay Sheet Line\', \'Pay Sheet Cell\'))\n
for movement in movement_list:\n
- if base_contribution is not None and movement.isMemberOf(base_contribution):\n
+ # Reference must be checked on line\n
+ if "Cell" in movement.getPortalType():\n
+ line = movement.getParentValue()\n
+ else:\n
+ line = movement\n
+ if line.getReference() in excluded_reference_list:\n
+ continue\n
+ if base_contribution is not None and movement.isMemberOf(base_contribution) or no_base_contribution:\n
\n
# base_contribution is mandatory, but not contribution_share. If contribution_share is\n
# given, search with it, if not, care only about base_contribution\n
if contribution_share is not None and movement.isMemberOf(contribution_share):\n
total_price += movement.getTotalPrice()\n
- elif contribution_share is None or len(movement.getContributionShareList()) == 0:\n
+ elif include_empty_contribution and (contribution_share is None or len(movement.getContributionShareList()) == 0):\n
total_price += movement.getTotalPrice()\n
\n
\n
@@ -78,7 +87,7 @@ return amount\n
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>base_contribution=None, contribution_share=None</string> </value>
+ <value> <string>base_contribution=None, contribution_share=None, no_base_contribution=False, include_empty_contribution=True, excluded_reference_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.xml?rev=45044&r1=45043&r2=45044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.xml [utf8] Mon Apr 4 14:32:14 2011
@@ -55,10 +55,6 @@
translateString = context.Base_translateString\n
specialise_value = context.getSpecialiseValue()\n
\n
-#XXX `model` is not used.\n
-model = None\n
-if specialise_value is not None:\n
- model = specialise_value.getEffectiveModel(start_date=context.getStartDate(), stop_date=context.getStopDate())\n
\n
def getFieldAsString(field):\n
return \', \'.join(getFieldAsLineList(field))\n
@@ -232,6 +228,7 @@ if destination_administration is None:\n
if destination_administration is None:\n
destination_administration = EmptyOrganisation()\n
\n
+social_organisation = getSocialOrganisationValue()\n
\n
data_dict = {\n
\'source_section_title\': source_section.getProperty(\'corporate_name\') or\\\n
@@ -355,10 +352,10 @@ data_dict = {\n
context.getDestinationSectionValue().getProperty(\'activity_code\') or \'\'),\n
\'destination_section_social_codeid\': getSocialCodeId(context.getDestinationSection() and\n
context.getDestinationSectionValue().getProperty(\'social_code\') or \'\'),\n
- \'destination_section_social_company_title\' : getSocialOrganisationValue() is not None and getSocialOrganisationValue().getTitle() or \'\',\n
- \'destination_section_social_address\': getSocialOrganisationValue() is not None and getOneLineAddress(\\\n
- getSocialOrganisationValue().getDefaultAddressText(),\n
- getSocialOrganisationValue().getDefaultAddressRegionTitle()) or \'\',\n
+ \'destination_section_social_company_title\' : social_organisation is not None and social_organisation.getTitle() or \'\',\n
+ \'destination_section_social_address\': social_organisation is not None and getOneLineAddress(\\\n
+ social_organisation.getDefaultAddressText(),\n
+ social_organisation.getDefaultAddressRegionTitle()) or \'\',\n
\'destination_administration_title\':\\\n
destination_administration.getProperty(\'corporate_name\') or \\\n
destination_administration.getTitle(),\n
Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseContributionTotalPrice.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseContributionTotalPrice.xml?rev=45044&r1=45043&r2=45044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseContributionTotalPrice.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateBaseContributionTotalPrice.xml [utf8] Mon Apr 4 14:32:14 2011
@@ -56,6 +56,9 @@
the start_date of this current paysheet. Return 0.0 if there is no amount.\n
\'\'\'\n
\n
+# XXX-Aurel : this script is currently not working as paysheet transaction line/cell\n
+# are not in stock table due to the lack of source/destination definition\n
+\n
if paysheet is None:\n
paysheet = context\n
\n
Modified: erp5/trunk/bt5/erp5_payroll/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/bt/revision?rev=45044&r1=45043&r2=45044&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/bt/revision [utf8] Mon Apr 4 14:32:14 2011
@@ -1 +1 @@
-583
\ No newline at end of file
+584
\ No newline at end of file
More information about the Erp5-report
mailing list