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
Thomas Gambier
erp5
Commits
5a2c520a
Commit
5a2c520a
authored
Dec 28, 2017
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERP5/tests/testERP5Commerce.py] Category must be defined before creating products and web sites.
parent
af8a1249
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5/tests/testERP5Commerce.py
product/ERP5/tests/testERP5Commerce.py
+6
-6
No files found.
product/ERP5/tests/testERP5Commerce.py
View file @
5a2c520a
...
@@ -128,6 +128,12 @@ class TestCommerce(ERP5TypeTestCase):
...
@@ -128,6 +128,12 @@ class TestCommerce(ERP5TypeTestCase):
sale_order_module
.
manage_permission
(
'Access contents information'
,
sale_order_module
.
manage_permission
(
'Access contents information'
,
roles
=
[
'Anonymous'
],
acquire
=
0
)
roles
=
[
'Anonymous'
],
acquire
=
0
)
# add quantity_unit/unit/piece
if
getattr
(
self
.
portal
.
portal_categories
.
quantity_unit
,
'unit'
,
None
)
is
None
:
self
.
portal
.
portal_categories
.
quantity_unit
.
newContent
(
id
=
'unit'
)
if
getattr
(
self
.
portal
.
portal_categories
.
quantity_unit
.
unit
,
'piece'
,
None
)
is
None
:
self
.
portal
.
portal_categories
.
quantity_unit
.
unit
.
newContent
(
id
=
'piece'
)
# create default currency (EUR)
# create default currency (EUR)
currency
=
currency_module
.
newContent
(
portal_type
=
'Currency'
,
currency
=
currency_module
.
newContent
(
portal_type
=
'Currency'
,
id
=
'EUR'
)
id
=
'EUR'
)
...
@@ -176,12 +182,6 @@ class TestCommerce(ERP5TypeTestCase):
...
@@ -176,12 +182,6 @@ class TestCommerce(ERP5TypeTestCase):
self
.
website
.
setProperty
(
'ecommerce_base_currency'
,
self
.
website
.
setProperty
(
'ecommerce_base_currency'
,
currency
.
getRelativeUrl
())
currency
.
getRelativeUrl
())
# add quantity_unit/unit/piece
if
getattr
(
self
.
portal
.
portal_categories
.
quantity_unit
,
'unit'
,
None
)
is
None
:
self
.
portal
.
portal_categories
.
quantity_unit
.
newContent
(
id
=
'unit'
)
if
getattr
(
self
.
portal
.
portal_categories
.
quantity_unit
.
unit
,
'piece'
,
None
)
is
None
:
self
.
portal
.
portal_categories
.
quantity_unit
.
unit
.
newContent
(
id
=
'piece'
)
self
.
app
.
REQUEST
.
set
(
'session_id'
,
SESSION_ID
)
self
.
app
.
REQUEST
.
set
(
'session_id'
,
SESSION_ID
)
self
.
loginByUserName
(
'ivan'
)
self
.
loginByUserName
(
'ivan'
)
self
.
tic
()
self
.
tic
()
...
...
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