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
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
4ac86cfd
Commit
4ac86cfd
authored
Mar 16, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: support Py3 in delivery printouts WIP
🚧
parent
c7c5726f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
8 deletions
+20
-8
bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_getDataDict.py
...tem/portal_skins/erp5_apparel/ApparelModel_getDataDict.py
+5
-2
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
...ateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
+5
-2
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
..._skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
+5
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
...0n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
+5
-2
No files found.
bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_getDataDict.py
View file @
4ac86cfd
import
six
translateString
=
context
.
Base_translateString
translateString
=
context
.
Base_translateString
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
portal_preferences
=
portal
.
portal_preferences
portal_preferences
=
portal
.
portal_preferences
...
@@ -61,9 +62,11 @@ def getPrototype():
...
@@ -61,9 +62,11 @@ def getPrototype():
return
None
return
None
def
unicodeDict
(
d
):
def
unicodeDict
(
d
):
for
k
,
v
in
d
.
items
():
if
six
.
PY3
:
return
d
for
k
,
v
in
six
.
iteritems
(
d
):
if
isinstance
(
v
,
str
):
if
isinstance
(
v
,
str
):
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
return
d
return
d
data_dict
=
{
data_dict
=
{
...
...
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
View file @
4ac86cfd
# coding: utf-8
# coding: utf-8
import
six
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
translateString
=
portal
.
Base_translateString
translateString
=
portal
.
Base_translateString
request
=
context
.
REQUEST
request
=
context
.
REQUEST
...
@@ -110,9 +111,11 @@ total_tax_price = 0.0
...
@@ -110,9 +111,11 @@ total_tax_price = 0.0
number_line_not_tax
=
0
number_line_not_tax
=
0
def
unicodeDict
(
d
):
def
unicodeDict
(
d
):
for
k
,
v
in
d
.
items
():
if
six
.
PY3
:
return
d
for
k
,
v
in
six
.
iteritems
(
d
):
if
isinstance
(
v
,
str
):
if
isinstance
(
v
,
str
):
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
return
d
return
d
...
...
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
View file @
4ac86cfd
import
six
translateString
=
context
.
Base_translateString
translateString
=
context
.
Base_translateString
...
@@ -110,9 +111,11 @@ line_list = []
...
@@ -110,9 +111,11 @@ line_list = []
total_price
=
0.0
total_price
=
0.0
def
unicodeDict
(
d
):
def
unicodeDict
(
d
):
for
k
,
v
in
d
.
items
():
if
six
.
PY3
:
return
d
for
k
,
v
in
six
.
iteritems
(
d
):
if
isinstance
(
v
,
str
):
if
isinstance
(
v
,
str
):
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
return
d
return
d
line_list
=
context
.
PaySheetTransaction_getLineListAsDict
()
line_list
=
context
.
PaySheetTransaction_getLineListAsDict
()
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
View file @
4ac86cfd
import
six
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
translateString
=
portal
.
Base_translateString
translateString
=
portal
.
Base_translateString
request
=
context
.
REQUEST
request
=
context
.
REQUEST
...
@@ -166,9 +167,11 @@ year_to_date_taxable_net_salary = paysheet.PaySheetTransaction_getYearToDateSlic
...
@@ -166,9 +167,11 @@ year_to_date_taxable_net_salary = paysheet.PaySheetTransaction_getYearToDateSlic
'base_contribution/base_amount/payroll/base/income_tax'
)
'base_contribution/base_amount/payroll/base/income_tax'
)
def
unicodeDict
(
d
):
def
unicodeDict
(
d
):
for
k
,
v
in
d
.
items
():
if
six
.
PY3
:
return
d
for
k
,
v
in
six
.
iteritems
(
d
):
if
isinstance
(
v
,
str
):
if
isinstance
(
v
,
str
):
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
d
.
update
({
k
:
unicode
(
v
,
'utf8'
)})
return
d
return
d
source_section
=
paysheet
.
getSourceSectionValue
()
source_section
=
paysheet
.
getSourceSectionValue
()
...
...
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