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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
9fce83e0
Commit
9fce83e0
authored
Feb 26, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_payroll_l10n_fr: get correct address accroding to date
parent
0378c29a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
2 deletions
+98
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_generatePayslipReportHeader.zpt
...0n_fr/PaySheetTransaction_generatePayslipReportHeader.zpt
+3
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getAddressAccordingToDate.py
..._l10n_fr/PaySheetTransaction_getAddressAccordingToDate.py
+25
-0
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getAddressAccordingToDate.xml
...l10n_fr/PaySheetTransaction_getAddressAccordingToDate.xml
+70
-0
No files found.
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_generatePayslipReportHeader.zpt
View file @
9fce83e0
<tal:block tal:define="data_dict here/PaySheetTransaction_getODTDataDict;
<tal:block tal:define="data_dict here/PaySheetTransaction_getODTDataDict;
other_data_dict here/PaySheetTransaction_getOtherInformationsDataDict;
other_data_dict here/PaySheetTransaction_getOtherInformationsDataDict;
address here/PaySheetTransaction_getAddressAccordingToDate;
language python: options.get('language');
language python: options.get('language');
date_renderer nocall:here/Base_viewFieldLibrary/my_date_time_field/render_pdf;
date_renderer nocall:here/Base_viewFieldLibrary/my_date_time_field/render_pdf;
">
">
...
@@ -20,8 +21,8 @@
...
@@ -20,8 +21,8 @@
</div>
</div>
<div class="payslip-header-employee">
<div class="payslip-header-employee">
<span class='payslip-report-emphasis' tal:content='python:data_dict["source_section_title"].upper()'>source_section</span>
<span class='payslip-report-emphasis' tal:content='python:data_dict["source_section_title"].upper()'>source_section</span>
<tal:block tal:condition="
data_dict/source_section_
address"
<tal:block tal:condition="
python:
address"
tal:define="address_list python:
data_dict['source_section_address']
.split('\n');">
tal:define="address_list python:
address
.split('\n');">
<tal:block tal:repeat="line address_list">
<tal:block tal:repeat="line address_list">
<span tal:content='line'></span>
<span tal:content='line'></span>
</tal:block>
</tal:block>
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getAddressAccordingToDate.py
0 → 100644
View file @
9fce83e0
address_dict
=
{
'street_address'
:
''
,
'zip_code'
:
''
,
'city'
:
''
}
stop_date
=
context
.
getStopDate
()
person
=
context
.
getSourceSectionValue
()
if
person
:
if
stop_date
.
isCurrentMonth
():
return
person
.
getDefaultAddressText
()
default_address
=
person
.
getDefaultAddress
()
if
default_address
:
for
dict_
in
default_address
.
Base_getZODBChangeHistoryList
(
default_address
,
size
=
100
):
if
stop_date
>
dict_
[
'datetime'
]:
for
key
in
address_dict
:
if
key
in
dict_
[
'changes'
]:
address_dict
[
key
]
=
dict_
[
'changes'
][
key
]
zip_code_city
=
[]
if
address_dict
[
'zip_code'
]:
zip_code_city
.
append
(
address_dict
[
'zip_code'
])
if
address_dict
[
'city'
]:
zip_code_city
.
append
(
address_dict
[
'city'
])
return
'
\
n
'
.
join
([
address_dict
[
'street_address'
]
or
''
,
' '
.
join
(
zip_code_city
)])
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getAddressAccordingToDate.xml
0 → 100644
View file @
9fce83e0
<?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></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaySheetTransaction_getAddressAccordingToDate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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