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
Alexander Emmerich
erp5
Commits
0d03838b
Commit
0d03838b
authored
Nov 03, 2014
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved Politesses 2
parent
a7933c2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+4
-5
product/ERP5/tests/testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+4
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
0d03838b
...
...
@@ -85,6 +85,7 @@ from urllib import quote, unquote
from
difflib
import
unified_diff
import
posixpath
import
transaction
import
threading
from
ZODB.broken
import
Broken
from
Products.ERP5.genbt5list
import
BusinessTemplateRevision
,
\
...
...
@@ -116,9 +117,6 @@ catalog_method_filter_list = ('_filter_expression_archive',
INSTALLED_BT_FOR_DIFF
=
'installed_bt_for_diff'
_MARKER
=
[]
def
_getCatalog
(
acquisition_context
):
"""
Return the id of the SQLCatalog which correspond to the current BT.
...
...
@@ -5867,8 +5865,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
for
act_id
in
action_list
:
if
act_id
is
None
:
return
(
1
,
Base_translateString
(
"ERROR: An action has an empty id on portal_type ${id}"
,
mapping
=
dict
(
id
=
id
)))
return
(
1
,
Base_translateString
(
"ERROR: An action has an empty id on portal_type ${id}"
,
mapping
=
dict
(
id
=
id
)))
action_id
=
id
+
' | '
+
act_id
if
action_id
not
in
bt_action_list
:
bt_action_list
.
append
(
action_id
)
...
...
product/ERP5/tests/testBusinessTemplate.py
View file @
0d03838b
...
...
@@ -1494,14 +1494,14 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
float_index
=
2.0
)
sequence
.
edit
(
first_action_id
=
'become_geek'
)
def
stepTestFirstAction
(
self
,
sequence
=
None
,
**
kw
):
def
stepTestFirstAction
(
self
,
sequence
=
None
,
**
kw
):
pt
=
self
.
getTypeTool
()
object_id
=
sequence
.
get
(
'object_ptype_id'
)
object_pt
=
pt
.
_getOb
(
object_id
)
bt
=
sequence
.
get
(
'current_bt'
,
None
)
self
.
assertTrue
(
bt
is
not
None
)
result
,
message
=
bt
.
getPortalTypesProperties
()
self
.
assertEqual
(
result
,
0
)
self
.
assertEqual
(
result
,
0
)
def
stepCreateEmptyAction
(
self
,
sequence
=
None
,
**
kw
):
"""
...
...
@@ -1515,14 +1515,14 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
action_permission_list
=
(),
float_index
=
1.2
)
def
stepTestEmptyAction
(
self
,
sequence
=
None
,
**
kw
):
def
stepTestEmptyAction
(
self
,
sequence
=
None
,
**
kw
):
pt
=
self
.
getTypeTool
()
object_id
=
sequence
.
get
(
'object_ptype_id'
)
object_pt
=
pt
.
_getOb
(
object_id
)
bt
=
sequence
.
get
(
'current_bt'
,
None
)
self
.
assertTrue
(
bt
is
not
None
)
result
,
message
=
bt
.
getPortalTypesProperties
()
self
.
assertEqual
(
result
,
1
)
self
.
assertEqual
(
result
,
1
)
def
stepCreateSecondAction
(
self
,
sequence
=
None
,
**
kw
):
"""
...
...
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