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
113a5a3f
Commit
113a5a3f
authored
Dec 27, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm,Formulator: fix handling of non breakable space unicode characters
This was not correct on python3
parent
6ee95ea3
Pipeline
#38780
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
...eItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
+2
-1
product/Formulator/Widget.py
product/Formulator/Widget.py
+2
-2
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
View file @
113a5a3f
...
...
@@ -38,6 +38,7 @@ getPreferredCategoryChildItemListMethodId.
# - all resource child must be properly indented
# It is much simpler if only "empty_category=False" case is handled.
from
Products.ERP5Type.Cache
import
CachingMethod
from
Products.ERP5Type.Utils
import
bytes2str
from
AccessControl
import
getSecurityManager
from
six.moves
import
range
portal
=
context
.
getPortalObject
()
...
...
@@ -58,7 +59,7 @@ if indent_category == indent_resource == compact == None:
accessor_id
=
'getCompactTranslatedTitle'
if
compact
else
'getTranslatedTitle'
def
getResourceItemList
():
INDENT
=
portal_preferences
.
getPreferredWhitespaceNumberForChildItemIndentation
()
*
'
\
xc2
\
xa0
'
# UTF-8 Non-breaking space
INDENT
=
portal_preferences
.
getPreferredWhitespaceNumberForChildItemIndentation
()
*
bytes2str
(
b'
\
xc2
\
xa0
'
)
# UTF-8 Non-breaking space
RESOURCE_INDENT
=
INDENT
if
indent_resource
else
''
getResourceTitle
=
lambda
resource
,
category
,
depth
:
RESOURCE_INDENT
*
depth
+
getattr
(
resource
,
accessor_id
)()
if
indent_category
:
...
...
product/Formulator/Widget.py
View file @
113a5a3f
...
...
@@ -12,7 +12,7 @@ from six.moves.urllib.parse import urljoin
from
lxml
import
etree
from
lxml.etree
import
Element
,
SubElement
from
lxml.builder
import
ElementMaker
from
Products.ERP5Type.Utils
import
unicode2str
,
str2unicode
from
Products.ERP5Type.Utils
import
bytes2str
,
unicode2str
,
str2unicode
import
re
import
sys
import
six
...
...
@@ -1145,7 +1145,7 @@ class MultiItemsWidget(ItemsWidget):
d
[
item_value
]
=
item_text
result
=
[]
for
e
in
value
:
result
.
append
(
d
[
e
].
replace
(
'
\
xc2
\
xa0
'
,
''
))
result
.
append
(
d
[
e
].
replace
(
bytes2str
(
b'
\
xc2
\
xa0
'
)
,
''
))
return
result
def
render_odg
(
self
,
field
,
value
,
as_string
,
ooo_builder
,
REQUEST
,
...
...
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