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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
d2bdd041
Commit
d2bdd041
authored
Feb 08, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ooo_import: py3
parent
53d0d1f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_getReportResultList.py
.../portal_skins/erp5_ooo_import/Base_getReportResultList.py
+1
-1
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_importFile.py
...plateItem/portal_skins/erp5_ooo_import/Base_importFile.py
+3
-1
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_importFileLineDefaultScript.py
...skins/erp5_ooo_import/Base_importFileLineDefaultScript.py
+3
-2
No files found.
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_getReportResultList.py
View file @
d2bdd041
...
@@ -17,7 +17,7 @@ if active_process_path is None:
...
@@ -17,7 +17,7 @@ if active_process_path is None:
active_process_value
=
context
.
getPortalObject
().
restrictedTraverse
(
active_process_path
)
active_process_value
=
context
.
getPortalObject
().
restrictedTraverse
(
active_process_path
)
result_list
=
[[
x
.
method_id
,
x
.
result
]
for
x
in
active_process_value
.
getResultList
()]
result_list
=
[[
x
.
method_id
,
x
.
result
]
for
x
in
active_process_value
.
getResultList
()]
result_list
.
sort
()
result_list
.
sort
(
key
=
str
)
for
[
method_id
,
result
]
in
result_list
:
for
[
method_id
,
result
]
in
result_list
:
safe_id
=
context
.
Base_getSafeIdFromString
(
'result %s'
%
num
)
safe_id
=
context
.
Base_getSafeIdFromString
(
'result %s'
%
num
)
...
...
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_importFile.py
View file @
d2bdd041
...
@@ -153,7 +153,9 @@ else:
...
@@ -153,7 +153,9 @@ else:
if
property_value
:
if
property_value
:
# Create a new property value
# Create a new property value
property_id
=
column_mapping
[
line_property_index
]
property_id
=
column_mapping
[
line_property_index
]
imported_line_property_dict
[
property_id
]
=
property_value
.
encode
(
'UTF-8'
)
if
six
.
PY2
:
property_value
=
property_value
.
encode
(
'UTF-8'
)
imported_line_property_dict
[
property_id
]
=
property_value
# If the line is not empty, activate an activity for it
# If the line is not empty, activate an activity for it
...
...
bt5/erp5_ooo_import/SkinTemplateItem/portal_skins/erp5_ooo_import/Base_importFileLineDefaultScript.py
View file @
d2bdd041
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
from
Products.ERP5Type.Message
import
Message
from
Products.ERP5Type.Message
import
Message
import
six
#Create new ERP5 objects In Activity from OOo document
#Create new ERP5 objects In Activity from OOo document
imported_line
=
object_url
=
None
imported_line
=
object_url
=
None
...
@@ -46,7 +47,7 @@ else:
...
@@ -46,7 +47,7 @@ else:
# Separate categories from properties
# Separate categories from properties
imported_line_category_dict
=
{}
imported_line_category_dict
=
{}
for
prop_key
in
imported_line_property_dict
.
keys
(
):
for
prop_key
in
list
(
six
.
iterkeys
(
imported_line_property_dict
)
):
if
prop_key
in
base_category_list
:
if
prop_key
in
base_category_list
:
imported_line_category_dict
[
prop_key
]
=
imported_line_property_dict
.
pop
(
prop_key
)
imported_line_category_dict
[
prop_key
]
=
imported_line_property_dict
.
pop
(
prop_key
)
...
@@ -67,7 +68,7 @@ else:
...
@@ -67,7 +68,7 @@ else:
success
=
0
success
=
0
# Save the categories
# Save the categories
for
category
,
value
in
imported_line_category_dict
.
items
(
):
for
category
,
value
in
list
(
six
.
iteritems
(
imported_line_category_dict
)
):
category_dict
=
context
.
ERP5Site_getCategoriesFullPath
(
category_dict
=
context
.
ERP5Site_getCategoriesFullPath
(
category_dict
=
{
category
:
value
})
category_dict
=
{
category
:
value
})
if
category_dict
not
in
(
None
,
{}):
if
category_dict
not
in
(
None
,
{}):
...
...
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