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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
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
Hide 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):
sale_order_module
.
manage_permission
(
'Access contents information'
,
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)
currency
=
currency_module
.
newContent
(
portal_type
=
'Currency'
,
id
=
'EUR'
)
...
...
@@ -176,12 +182,6 @@ class TestCommerce(ERP5TypeTestCase):
self
.
website
.
setProperty
(
'ecommerce_base_currency'
,
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
.
loginByUserName
(
'ivan'
)
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