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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
erp5
Commits
7c0fe44d
Commit
7c0fe44d
authored
Oct 30, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: fix
parent
0b70d293
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.py
...portal_skins/erp5_core/CategoryTool_importCategoryFile.py
+8
-4
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/CategoryTool_importCategoryFile.py
View file @
7c0fe44d
from
transaction
import
doom
from
zExceptions
import
Success
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Document
import
newTempBase
...
...
@@ -57,8 +59,9 @@ category_list_spreadsheet_dict = context.Base_getCategoriesSpreadSheetMapping(
if
detailed_report_result
:
REQUEST
.
other
[
'portal_status_message'
]
=
translateString
(
'Spreasheet contains errors'
)
REQUEST
.
other
[
'category_import_report'
]
=
detailed_report_result
REQUEST
.
RESPONSE
.
write
(
portal_categories
.
CategoryTool_viewImportReport
().
encode
(
'utf-8'
))
raise
Exception
(
'Spreadsheet contains errors'
)
# Spreadsheet contains errors
doom
()
raise
Success
(
portal_categories
.
CategoryTool_viewImportReport
().
encode
(
'utf-8'
))
for
base_category
,
category_list
in
category_list_spreadsheet_dict
.
iteritems
():
total_category_counter
+=
len
(
category_list
)
...
...
@@ -211,8 +214,9 @@ if detailed_report:
REQUEST
.
other
[
'category_import_report'
]
=
detailed_report_result
result
=
portal_categories
.
CategoryTool_viewImportReport
().
encode
(
'utf-8'
)
if
simulation_mode
:
REQUEST
.
RESPONSE
.
write
(
result
)
raise
Exception
(
'Dry run'
)
# Dry run
doom
()
raise
Success
(
result
)
return
result
portal_categories
.
Base_redirect
(
keep_items
=
{
...
...
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