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
9e0a9384
Commit
9e0a9384
authored
Aug 01, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Configurator: Code style and drop getToolByName
parent
9bcb98c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
15 deletions
+11
-15
product/ERP5Configurator/Document/ConfigurationSave.py
product/ERP5Configurator/Document/ConfigurationSave.py
+2
-2
product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py
...onfigurator/Document/ExportCustomerBT5ConfiguratorItem.py
+3
-5
product/ERP5Configurator/Document/StandardBT5ConfiguratorItem.py
.../ERP5Configurator/Document/StandardBT5ConfiguratorItem.py
+0
-1
product/ERP5Configurator/Document/SystemPreferenceConfiguratorItem.py
...Configurator/Document/SystemPreferenceConfiguratorItem.py
+4
-4
product/ERP5Configurator/Tool/ConfiguratorTool.py
product/ERP5Configurator/Tool/ConfiguratorTool.py
+2
-3
No files found.
product/ERP5Configurator/Document/ConfigurationSave.py
View file @
9e0a9384
...
...
@@ -57,5 +57,5 @@ class ConfigurationSave(Path):
if
kw
.
has_key
(
'conf_title'
):
self
.
setTitle
(
kw
[
'conf_title'
])
kw
.
pop
(
'conf_title'
)
conf_item
=
self
.
newContent
(
portal_type
=
configuration_item_class_name
,
**
kw
)
return
conf_item
return
self
.
newContent
(
portal_type
=
configuration_item_class_name
,
**
kw
)
product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py
View file @
9e0a9384
...
...
@@ -30,7 +30,6 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.CMFCore.utils
import
getToolByName
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
ExportCustomerBT5ConfiguratorItem
(
XMLObject
,
ConfiguratorItemMixin
):
...
...
@@ -56,8 +55,7 @@ class ExportCustomerBT5ConfiguratorItem(XMLObject, ConfiguratorItemMixin):
,
PropertySheet
.
DublinCore
)
def
_build
(
self
,
business_configuration
):
portal
=
self
.
getPortalObject
()
template_tool
=
getToolByName
(
portal
,
'portal_templates'
)
template_tool
=
self
.
getPortalObject
().
portal_templates
bt5_obj
=
business_configuration
.
getSpecialiseValue
()
if
bt5_obj
.
getBuildingState
()
!=
'built'
:
## build template so it can be exported
...
...
@@ -66,5 +64,5 @@ class ExportCustomerBT5ConfiguratorItem(XMLObject, ConfiguratorItemMixin):
bt5_data
=
template_tool
.
export
(
bt5_obj
)
business_configuration
.
newContent
(
portal_type
=
'File'
,
title
=
bt5_obj
.
getTitle
(),
data
=
bt5_data
)
title
=
bt5_obj
.
getTitle
(),
data
=
bt5_data
)
product/ERP5Configurator/Document/StandardBT5ConfiguratorItem.py
View file @
9e0a9384
...
...
@@ -27,7 +27,6 @@
##############################################################################
import
zope.interface
from
Products.CMFCore.utils
import
getToolByName
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
...
...
product/ERP5Configurator/Document/SystemPreferenceConfiguratorItem.py
View file @
9e0a9384
...
...
@@ -102,10 +102,10 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
if
preference
is
None
:
preference
=
portal
.
portal_preferences
.
newContent
(
portal_type
=
'System Preference'
,
id
=
self
.
object_id
,
title
=
self
.
title
,
description
=
self
.
description
,
priority
=
1
)
id
=
self
.
object_id
,
title
=
self
.
title
,
description
=
self
.
description
,
priority
=
1
)
# XXX this have to be translated in user language.
preference_dict
=
{}
...
...
product/ERP5Configurator/Tool/ConfiguratorTool.py
View file @
9e0a9384
...
...
@@ -36,7 +36,6 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool
from
Products.ERP5Type.Cache
import
CachingMethod
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Configurator
import
_dtmldir
from
Products.CMFCore.utils
import
getToolByName
from
Products.Formulator.Errors
import
FormValidationError
import
cookielib
from
base64
import
encodestring
...
...
@@ -430,8 +429,8 @@ class ConfiguratorTool(BaseTool):
activities should not exists.
"""
global
installation_status
portal_activities
=
getToolByName
(
self
.
getPortalObject
(),
'portal_activities'
)
portal_activities
=
self
.
getPortalObject
().
portal_activities
is_bt5_installation_over
=
(
portal_activities
.
countMessageWithTag
(
'initialERP5Setup'
)
==
0
)
if
0
==
len
(
portal_activities
.
getMessageList
())
and
\
...
...
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