Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
a124989a
Commit
a124989a
authored
Nov 28, 2011
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding style improvement
parent
543515f8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
41 deletions
+44
-41
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
...n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
+43
-40
bt5/erp5_payroll_l10n_fr/bt/revision
bt5/erp5_payroll_l10n_fr/bt/revision
+1
-1
No files found.
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
View file @
a124989a
...
@@ -50,13 +50,15 @@
...
@@ -50,13 +50,15 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
translateString = context.Base_translateString\n
<value>
<string>
portal = context.getPortalObject()\n
translateString = portal.Base_translateString\n
request = context.REQUEST\n
request = context.REQUEST\n
quantity_renderer = context.Base_viewFieldLibrary.my_view_mode_money_quantity.render_pdf\n
quantity_renderer = portal.Base_viewFieldLibrary.my_view_mode_money_quantity.render_pdf\n
paysheet = context\n
\n
\n
model =
contex
t.getSpecialiseValue().getEffectiveModel(\\\n
model =
payshee
t.getSpecialiseValue().getEffectiveModel(\\\n
start_date=
contex
t.getStartDate(),\n
start_date=
payshee
t.getStartDate(),\n
stop_date=
contex
t.getStopDate())\n
stop_date=
payshee
t.getStopDate())\n
\n
\n
def getFieldAsString(field):\n
def getFieldAsString(field):\n
return \', \'.join(getFieldAsLineList(field))\n
return \', \'.join(getFieldAsLineList(field))\n
...
@@ -110,7 +112,9 @@ def getPriceCurrencyId(currency):\n
...
@@ -110,7 +112,9 @@ def getPriceCurrencyId(currency):\n
s += \'%s: %s\' % (translateString(\'Price Currency\'), currency)\n
s += \'%s: %s\' % (translateString(\'Price Currency\'), currency)\n
return s\n
return s\n
\n
\n
salaire_net_imposable = context.PaySheetTransaction_getMovementTotalPriceFromCategory(\\\n
getMovementTotalPriceFromCategory = paysheet.PaySheetTransaction_getMovementTotalPriceFromCategory\n
\n
salaire_net_imposable = getMovementTotalPriceFromCategory(\\\n
base_contribution=\'base_contribution/base_amount/payroll/base/income_tax\',\n
base_contribution=\'base_contribution/base_amount/payroll/base/income_tax\',\n
contribution_share=\'contribution_share/employee\')\n
contribution_share=\'contribution_share/employee\')\n
\n
\n
...
@@ -120,7 +124,7 @@ def getTaxableNetPayId(salaire_net_imposable):\n
...
@@ -120,7 +124,7 @@ def getTaxableNetPayId(salaire_net_imposable):\n
s += \'%s: %s\' % (translateString(\'Taxable Net Pay\'), salaire_net_imposable)\n
s += \'%s: %s\' % (translateString(\'Taxable Net Pay\'), salaire_net_imposable)\n
return s\n
return s\n
\n
\n
total_employee_tax =
context.PaySheetTransaction_
getMovementTotalPriceFromCategory(\\\n
total_employee_tax = getMovementTotalPriceFromCategory(\\\n
no_base_contribution=True,\n
no_base_contribution=True,\n
include_empty_contribution=False,\n
include_empty_contribution=False,\n
excluded_reference_list=[\'ticket_restaurant\',],\n
excluded_reference_list=[\'ticket_restaurant\',],\n
...
@@ -132,7 +136,7 @@ def getTotalEmployeeTaxId(total_employee_tax):\n
...
@@ -132,7 +136,7 @@ def getTotalEmployeeTaxId(total_employee_tax):\n
quantity_renderer(total_employee_tax*-1))\n
quantity_renderer(total_employee_tax*-1))\n
return s\n
return s\n
\n
\n
total_employer_tax =
context.PaySheetTransaction_
getMovementTotalPriceFromCategory(\\\n
total_employer_tax = getMovementTotalPriceFromCategory(\\\n
no_base_contribution=True,\n
no_base_contribution=True,\n
include_empty_contribution=False,\n
include_empty_contribution=False,\n
excluded_reference_list=[\'ticket_restaurant\',],\n
excluded_reference_list=[\'ticket_restaurant\',],\n
...
@@ -145,7 +149,7 @@ def getTotalEmployerTaxId(total_employer_tax):\n
...
@@ -145,7 +149,7 @@ def getTotalEmployerTaxId(total_employer_tax):\n
return s\n
return s\n
\n
\n
\n
\n
preferred_date_order =
context.getPortalObject()
.portal_preferences\\\n
preferred_date_order =
portal
.portal_preferences\\\n
.getPreferredDateOrder() or \'ymd\'\n
.getPreferredDateOrder() or \'ymd\'\n
separator = \'/\'\n
separator = \'/\'\n
def getOrderedDate(date):\n
def getOrderedDate(date):\n
...
@@ -177,35 +181,34 @@ def getPaymentConditionText(paysheet):\n
...
@@ -177,35 +181,34 @@ def getPaymentConditionText(paysheet):\n
date)\n
date)\n
return \'\'\n
return \'\'\n
\n
\n
gross_salary =
context.PaySheetTransaction_
getMovementTotalPriceFromCategory(\\\n
gross_salary = getMovementTotalPriceFromCategory(\\\n
base_contribution=\'base_contribution/base_amount/payroll/report/salary/gross\',\n
base_contribution=\'base_contribution/base_amount/payroll/report/salary/gross\',\n
contribution_share=\'contribution_share/employee\')\n
contribution_share=\'contribution_share/employee\')\n
#year_to_date_gross_salary = context.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\\n
# paysheet=context, base_contribution_list=\'payroll/report/salary/gross\') + gross_salary\n
year_to_date_gross_salary = context.PaySheetTransaction_getYearToDateSlice()\n
year_to_date_slice_a = context.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_a\')\n
year_to_date_slice_b = context.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_b\')\n
\n
\n
worked_hour_count = context.getWorkTimeAnnotationLineQuantity(0)\n
year_to_date_gross_salary = paysheet.PaySheetTransaction_getYearToDateSlice()\n
year_to_date_slice_a = paysheet.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_a\')\n
year_to_date_slice_b = paysheet.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_b\')\n
\n
worked_hour_count = paysheet.getWorkTimeAnnotationLineQuantity(0)\n
year_to_date_worked_hour_count = worked_hour_count + \\\n
year_to_date_worked_hour_count = worked_hour_count + \\\n
contex
t.PaySheetTransaction_getYearToDateWorkTimeSalary() or 0\n
payshee
t.PaySheetTransaction_getYearToDateWorkTimeSalary() or 0\n
\n
\n
over_time_small_rate =
contex
t.getAnnotationLineFromReference(reference=\'overtime_small_rate\')\n
over_time_small_rate =
payshee
t.getAnnotationLineFromReference(reference=\'overtime_small_rate\')\n
over_time_big_rate =
contex
t.getAnnotationLineFromReference(reference=\'overtime_big_rate\')\n
over_time_big_rate =
payshee
t.getAnnotationLineFromReference(reference=\'overtime_big_rate\')\n
bonus_worked_hour_count = over_time_small_rate is not None and \\\n
bonus_worked_hour_count = over_time_small_rate is not None and \\\n
over_time_big_rate is not None and \\\n
over_time_big_rate is not None and \\\n
over_time_small_rate.getQuantity() + over_time_big_rate.getQuantity() or 0\n
over_time_small_rate.getQuantity() + over_time_big_rate.getQuantity() or 0\n
year_to_date_bonus_worked_hour_count = bonus_worked_hour_count + \\\n
year_to_date_bonus_worked_hour_count = bonus_worked_hour_count + \\\n
contex
t.PaySheetTransaction_getYearToDateOvertimeHours() or 0\n
payshee
t.PaySheetTransaction_getYearToDateOvertimeHours() or 0\n
\n
\n
year_to_date_bonus_worked_hour_amount =
context
.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\\n
year_to_date_bonus_worked_hour_amount =
portal
.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\\n
paysheet=
contex
t, base_contribution_list=\'payroll/report/overtime\') + \\\n
paysheet=
payshee
t, base_contribution_list=\'payroll/report/overtime\') + \\\n
context.PaySheetTransaction_
getMovementTotalPriceFromCategory(\\\n
getMovementTotalPriceFromCategory(\\\n
base_contribution=\'base_contribution/base_amount/payroll/report/overtime\', \\\n
base_contribution=\'base_contribution/base_amount/payroll/report/overtime\', \\\n
contribution_share=\'contribution_share/employee\') or 0\n
contribution_share=\'contribution_share/employee\') or 0\n
\n
\n
year_to_date_taxable_net_salary =
context
.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\\n
year_to_date_taxable_net_salary =
portal
.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\\n
paysheet=
contex
t, base_contribution_list=\'payroll/report/salary/net\') + salaire_net_imposable\n
paysheet=
payshee
t, base_contribution_list=\'payroll/report/salary/net\') + salaire_net_imposable\n
\n
\n
def unicodeDict(d):\n
def unicodeDict(d):\n
for k, v in d.items():\n
for k, v in d.items():\n
...
@@ -213,30 +216,30 @@ def unicodeDict(d):\n
...
@@ -213,30 +216,30 @@ def unicodeDict(d):\n
d.update({k:unicode(v, \'utf8\')})\n
d.update({k:unicode(v, \'utf8\')})\n
return d\n
return d\n
\n
\n
source_section =
contex
t.getSourceSectionValue()\n
source_section =
payshee
t.getSourceSectionValue()\n
\n
\n
data_dict = {\n
data_dict = {\n
\'source_section_title\': source_section.getProperty(\'corporate_name\') or\\\n
\'source_section_title\': source_section.getProperty(\'corporate_name\') or\\\n
source_section.getTitle(),\n
source_section.getTitle(),\n
\'source_section_career_title\': getCareerId(
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_career_title\': getCareerId(
payshee
t.getSourceSectionValue() is not None\\\n
and source_section.getProperty(\'default_career_title\') or \'\'),\n
and source_section.getProperty(\'default_career_title\') or \'\'),\n
\'source_section_default_career_start_date\': getHiringDateId(
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_default_career_start_date\': getHiringDateId(
payshee
t.getSourceSectionValue() is not None\\\n
and getOrderedDate(source_section.getProperty(\'default_career_start_date\')) or \'\'),\n
and getOrderedDate(source_section.getProperty(\'default_career_start_date\')) or \'\'),\n
\'source_section_default_career_stop_date\':
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_default_career_stop_date\':
payshee
t.getSourceSectionValue() is not None\\\n
and getOrderedDate(source_section.getProperty(\'default_career_stop_date\')) or \'\',\n
and getOrderedDate(source_section.getProperty(\'default_career_stop_date\')) or \'\',\n
\'source_section_default_career_coefficient\' : getCareerCoefficientId(
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_default_career_coefficient\' : getCareerCoefficientId(
payshee
t.getSourceSectionValue() is not None\\\n
and source_section.getProperty(\'career_salary_coefficient\') or \'\'),\n
and source_section.getProperty(\'career_salary_coefficient\') or \'\'),\n
\'source_section_default_career_salary_level\' : getSalaryLevelId(
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_default_career_salary_level\' : getSalaryLevelId(
payshee
t.getSourceSectionValue() is not None\\\n
and source_section.getProperty(\'default_career_salary_level\') or \'\'),\n
and source_section.getProperty(\'default_career_salary_level\') or \'\'),\n
\'source_section_default_career_social_code\' : getSocialCodeId(
contex
t.getSourceSection() and\n
\'source_section_default_career_social_code\' : getSocialCodeId(
payshee
t.getSourceSection() and\n
contex
t.getSourceSectionValue().getProperty(\'social_code\') or \'\'),\n
payshee
t.getSourceSectionValue().getProperty(\'social_code\') or \'\'),\n
\'source_section_default_career_collective_agreement_title\' : getCollectiveAgreementId(
contex
t.getSourceSectionValue() is not None\\\n
\'source_section_default_career_collective_agreement_title\' : getCollectiveAgreementId(
payshee
t.getSourceSectionValue() is not None\\\n
and source_section.getProperty(\'default_career_collective_agreement_title\') or \'\'),\n
and source_section.getProperty(\'default_career_collective_agreement_title\') or \'\'),\n
\'default_payment_condition_payment_text\' :
contex
t.getDefaultPaymentConditionValue() is not None\\\n
\'default_payment_condition_payment_text\' :
payshee
t.getDefaultPaymentConditionValue() is not None\\\n
and getPaymentConditionText(
contex
t) or \'\',\n
and getPaymentConditionText(
payshee
t) or \'\',\n
\'price_currency\': getPriceCurrencyId(
contex
t.getPriceCurrencyReference() or \'\'),\n
\'price_currency\': getPriceCurrencyId(
payshee
t.getPriceCurrencyReference() or \'\'),\n
\'year\': str(
context.getStartDate() is not None and contex
t.getStartDate().year() or \'\'),\n
\'year\': str(
paysheet.getStartDate() is not None and payshee
t.getStartDate().year() or \'\'),\n
\'description\': getFieldAsLineList(
contex
t.getDescription() or \'\'),\n
\'description\': getFieldAsLineList(
payshee
t.getDescription() or \'\'),\n
\'year_to_date_gross_salary\': year_to_date_gross_salary,\n
\'year_to_date_gross_salary\': year_to_date_gross_salary,\n
\'year_to_date_slice_a\': year_to_date_slice_a,\n
\'year_to_date_slice_a\': year_to_date_slice_a,\n
\'year_to_date_slice_b\': year_to_date_slice_b,\n
\'year_to_date_slice_b\': year_to_date_slice_b,\n
...
...
bt5/erp5_payroll_l10n_fr/bt/revision
View file @
a124989a
137
138
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment