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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
351776a8
Commit
351776a8
authored
Jun 03, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdm_ui_test: fix pylint warnings and enable coding style test
parent
79b4a6a2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
13 deletions
+5
-13
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_createDelivery.py
.../portal_skins/erp5_pdm_ui_test/PdmZuite_createDelivery.py
+3
-7
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
...Item/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
+0
-2
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
+2
-3
bt5/erp5_pdm_ui_test/bt/skip_coding_style_test
bt5/erp5_pdm_ui_test/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_createDelivery.py
View file @
351776a8
...
@@ -15,8 +15,6 @@ destination_node_id = "erp5_pdm_ui_test_destination_node"
...
@@ -15,8 +15,6 @@ destination_node_id = "erp5_pdm_ui_test_destination_node"
resource_id
=
"erp5_pdm_ui_test_product"
resource_id
=
"erp5_pdm_ui_test_product"
business_process_id
=
'erp5_default_business_process'
business_process_id
=
'erp5_default_business_process'
quantity
=
1
business_process_module
=
portal
.
getDefaultModule
(
"Business Process"
)
business_process_module
=
portal
.
getDefaultModule
(
"Business Process"
)
business_process
=
getattr
(
business_process_module
,
business_process_id
,
None
)
business_process
=
getattr
(
business_process_module
,
business_process_id
,
None
)
if
business_process
is
None
:
if
business_process
is
None
:
...
@@ -40,7 +38,7 @@ if state in ['planned', 'ordered']:
...
@@ -40,7 +38,7 @@ if state in ['planned', 'ordered']:
specialise_value
=
business_process
,
specialise_value
=
business_process
,
start_date
=
DateTime
(),
start_date
=
DateTime
(),
)
)
order
_line
=
order
.
newContent
(
order
.
newContent
(
portal_type
=
order_line_portal_type
,
portal_type
=
order_line_portal_type
,
resource
=
'product_module/%s'
%
resource_id
,
resource
=
'product_module/%s'
%
resource_id
,
quantity
=
1
,
quantity
=
1
,
...
@@ -63,7 +61,7 @@ else:
...
@@ -63,7 +61,7 @@ else:
specialise_value
=
business_process
,
specialise_value
=
business_process
,
start_date
=
DateTime
(),
start_date
=
DateTime
(),
)
)
delivery
_line
=
delivery
.
newContent
(
delivery
.
newContent
(
portal_type
=
delivery_line_portal_type
,
portal_type
=
delivery_line_portal_type
,
resource
=
'product_module/%s'
%
resource_id
,
resource
=
'product_module/%s'
%
resource_id
,
quantity
=
1
,
quantity
=
1
,
...
@@ -87,8 +85,6 @@ else:
...
@@ -87,8 +85,6 @@ else:
break
break
if
delivery
.
getSimulationState
()
!=
state
:
if
delivery
.
getSimulationState
()
!=
state
:
raise
ImplementationError
,
'Delivery state is %s and not %s'
%
(
delivery
.
getSimulationState
(),
state
)
raise
NotImplementedError
(
'Delivery state is %s and not %s'
%
(
delivery
.
getSimulationState
(),
state
)
)
return
"Delivery Created."
return
"Delivery Created."
# vim: syntax=python
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
View file @
351776a8
...
@@ -2,8 +2,6 @@ portal = context.getPortalObject()
...
@@ -2,8 +2,6 @@ portal = context.getPortalObject()
resource_portal_type
=
"Product"
resource_portal_type
=
"Product"
node_portal_type
=
"Organisation"
node_portal_type
=
"Organisation"
site_portal_type
=
"Category"
resource_id
=
"erp5_pdm_ui_test_product"
resource_id
=
"erp5_pdm_ui_test_product"
source_node_id
=
"erp5_pdm_ui_test_source_node"
source_node_id
=
"erp5_pdm_ui_test_source_node"
...
...
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_reset.py
View file @
351776a8
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
self
=
context
resource_portal_type
=
"Product"
resource_portal_type
=
"Product"
node_portal_type
=
"Organisation"
node_portal_type
=
"Organisation"
...
@@ -42,7 +41,7 @@ resource.validate()
...
@@ -42,7 +41,7 @@ resource.validate()
base_category
=
portal
.
restrictedTraverse
(
'portal_categories/site'
)
base_category
=
portal
.
restrictedTraverse
(
'portal_categories/site'
)
for
site_id
,
site_title
in
((
source_site_id
,
source_site_title
),
for
site_id
,
site_title
in
((
source_site_id
,
source_site_title
),
(
destination_site_id
,
destination_site_title
)):
(
destination_site_id
,
destination_site_title
)):
site
=
base_category
.
newContent
(
base_category
.
newContent
(
portal_type
=
site_portal_type
,
portal_type
=
site_portal_type
,
id
=
site_id
,
id
=
site_id
,
title
=
site_title
title
=
site_title
...
@@ -52,7 +51,7 @@ for site_id, site_title in ((source_site_id, source_site_title),
...
@@ -52,7 +51,7 @@ for site_id, site_title in ((source_site_id, source_site_title),
for
node_id
,
node_title
,
site_url
in
((
source_node_id
,
source_node_title
,
source_site_id
),
for
node_id
,
node_title
,
site_url
in
((
source_node_id
,
source_node_title
,
source_site_id
),
(
destination_node_id
,
destination_node_title
,
destination_site_id
)):
(
destination_node_id
,
destination_node_title
,
destination_site_id
)):
module
=
portal
.
getDefaultModule
(
node_portal_type
)
module
=
portal
.
getDefaultModule
(
node_portal_type
)
node
=
module
.
newContent
(
module
.
newContent
(
portal_type
=
node_portal_type
,
portal_type
=
node_portal_type
,
id
=
node_id
,
id
=
node_id
,
title
=
node_title
,
title
=
node_title
,
...
...
bt5/erp5_pdm_ui_test/bt/skip_coding_style_test
deleted
100644 → 0
View file @
79b4a6a2
1
\ No newline at end of file
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