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
Léo-Paul Géneau
erp5
Commits
1a1498fe
Commit
1a1498fe
authored
Jul 29, 2019
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_pdm_ui_test: validate product used in tests
parent
9810bcc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_reset.py
...plateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_reset.py
+11
-1
No files found.
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_reset.py
View file @
1a1498fe
...
...
@@ -15,18 +15,28 @@ source_site_title = "erp5_pdm_ui_test_source_site_title"
destination_site_id
=
"erp5_pdm_ui_test_destination_site"
destination_site_title
=
"erp5_pdm_ui_test_destination_site_title"
quantity_unit_category
=
portal
.
portal_categories
.
quantity_unit
# validate rules
for
rule
in
portal
.
portal_rules
.
objectValues
():
if
rule
.
getValidationState
()
!=
'validated'
:
rule
.
validate
()
# Create resource
if
getattr
(
quantity_unit_category
,
"unit"
,
None
)
is
None
:
quantity_unit_category
.
newContent
(
portal_type
=
"Category"
,
id
=
"unit"
)
module
=
portal
.
getDefaultModule
(
resource_portal_type
)
resource
=
module
.
newContent
(
portal_type
=
resource_portal_type
,
id
=
resource_id
,
title
=
resource_title
title
=
resource_title
,
quantity_unit
=
'unit'
,
)
resource
.
validate
()
# Create site categories
base_category
=
portal
.
restrictedTraverse
(
'portal_categories/site'
)
...
...
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