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
17669c01
Commit
17669c01
authored
Oct 02, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm: fix pylint messages and enable coding style
parent
6db1da77
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
29 additions
and
46 deletions
+29
-46
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/AcknowledgementTool_getUserUnreadAcknowledgementList.py
...m/AcknowledgementTool_getUserUnreadAcknowledgementList.py
+4
-5
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.py
...portal_skins/erp5_crm/Base_getEntityListFromFromHeader.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/ERP5Site_getFollowUpItemList.py
...tem/portal_skins/erp5_crm/ERP5Site_getFollowUpItemList.py
+4
-3
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.py
..._skins/erp5_crm/Entity_createEventFromDefaultEventPath.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventActivityReportSectionList.py
...erp5_crm/EventModule_getEventActivityReportSectionList.py
+1
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventDetailedLineList.py
...al_skins/erp5_crm/EventModule_getEventDetailedLineList.py
+4
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventDetailedReportSectionList.py
...erp5_crm/EventModule_getEventDetailedReportSectionList.py
+1
-3
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_statEventActivityLineList.py
...l_skins/erp5_crm/EventModule_statEventActivityLineList.py
+0
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_statEventDetailedLineList.py
...l_skins/erp5_crm/EventModule_statEventDetailedLineList.py
+0
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createDocumentFromAttachment.py
...rtal_skins/erp5_crm/Event_createDocumentFromAttachment.py
+2
-2
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createDocumentFromAttachment.xml
...tal_skins/erp5_crm/Event_createDocumentFromAttachment.xml
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createRelatedEvent.py
...ateItem/portal_skins/erp5_crm/Event_createRelatedEvent.py
+2
-3
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createRespondEvent.py
...ateItem/portal_skins/erp5_crm/Event_createRespondEvent.py
+0
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getAttachmentFastInputList.py
...portal_skins/erp5_crm/Event_getAttachmentFastInputList.py
+1
-2
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPropertyDictFromContent.py
...portal_skins/erp5_crm/Event_getPropertyDictFromContent.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_setTextContentFromNotificationMessage.py
...s/erp5_crm/Event_setTextContentFromNotificationMessage.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/NotificationMessage_getSubstitutionMappingDictFromEvent.py
...otificationMessage_getSubstitutionMappingDictFromEvent.py
+0
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
...eItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
+1
-1
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_init.py
...crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_init.py
+2
-0
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMNotificationTool.py
...em/portal_components/test.erp5.testCRMNotificationTool.py
+1
-1
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_checkConsistency.py
...ent_simulation_workflow/scripts/Event_checkConsistency.py
+1
-2
bt5/erp5_crm/bt/skip_coding_style_test
bt5/erp5_crm/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/AcknowledgementTool_getUserUnreadAcknowledgementList.py
View file @
17669c01
...
@@ -4,14 +4,14 @@ connected. This script will use efficiently caches in order to slow
...
@@ -4,14 +4,14 @@ connected. This script will use efficiently caches in order to slow
down as less a possible the user interface
down as less a possible the user interface
"""
"""
from
DateTime
import
DateTime
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
user_name
=
context
.
portal_membership
.
getAuthenticatedMember
().
getId
()
user_name
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getId
()
def
getUnreadAcknowledgementListForUser
(
user_name
=
None
):
def
getUnreadAcknowledgementListForUser
(
user_name
=
None
):
# We give the portal type "Mass Notification" for now, we can
# We give the portal type "Mass Notification" for now, we can
# have a getPortalAcknowledgeableTypeList method in the future
# have a getPortalAcknowledgeableTypeList method in the future
portal_acknowledgements
=
getattr
(
context
.
getPortalObject
(),
portal_acknowledgements
=
getattr
(
portal
,
"portal_acknowledgements"
,
None
)
"portal_acknowledgements"
,
None
)
result
=
[]
result
=
[]
if
portal_acknowledgements
is
not
None
:
if
portal_acknowledgements
is
not
None
:
result
=
context
.
portal_acknowledgements
.
getUnreadDocumentUrlList
(
result
=
context
.
portal_acknowledgements
.
getUnreadDocumentUrlList
(
...
@@ -23,13 +23,12 @@ from Products.ERP5Type.Cache import CachingMethod
...
@@ -23,13 +23,12 @@ from Products.ERP5Type.Cache import CachingMethod
# Cache for every user the list of url of not acknowledge documents
# Cache for every user the list of url of not acknowledge documents
getUnreadAcknowledgementList
=
CachingMethod
(
getUnreadAcknowledgementListForUser
,
getUnreadAcknowledgementList
=
CachingMethod
(
getUnreadAcknowledgementListForUser
,
"getUnreadAcknowledgementListForUser"
)
"getUnreadAcknowledgementListForUser"
)
portal
=
context
.
getPortalObject
()
return_list
=
[]
return_list
=
[]
url_list
=
getUnreadAcknowledgementList
(
user_name
=
user_name
)
url_list
=
getUnreadAcknowledgementList
(
user_name
=
user_name
)
# For every not acknowledge document, check that documents are still not
# For every not acknowledge document, check that documents are still not
# acknowledged and return them for the user interface
# acknowledged and return them for the user interface
if
len
(
url_list
)
>
0
:
if
len
(
url_list
)
>
0
:
acknowledgement_list
=
context
.
portal_acknowledgements
.
getUnreadAcknowledgementList
(
acknowledgement_list
=
portal
.
portal_acknowledgements
.
getUnreadAcknowledgementList
(
url_list
=
url_list
,
user_name
=
user_name
)
url_list
=
url_list
,
user_name
=
user_name
)
for
acknowledgement
in
acknowledgement_list
:
for
acknowledgement
in
acknowledgement_list
:
#bulletin = acknowledgement.getCausalityValue()
#bulletin = acknowledgement.getCausalityValue()
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_getEntityListFromFromHeader.py
View file @
17669c01
...
@@ -3,7 +3,7 @@ getResultValue = context.portal_catalog.getResultValue
...
@@ -3,7 +3,7 @@ getResultValue = context.portal_catalog.getResultValue
from
Products.ERP5Type.Utils
import
Email_parseAddressHeader
from
Products.ERP5Type.Utils
import
Email_parseAddressHeader
result
=
[]
result
=
[]
for
name
,
recipient
in
Email_parseAddressHeader
(
text
):
for
_
,
recipient
in
Email_parseAddressHeader
(
text
):
if
recipient
:
if
recipient
:
email
=
getResultValue
(
url_string
=
{
'query'
:
recipient
,
'key'
:
'ExactMatch'
},
portal_type
=
'Email'
,
parent_portal_type
=
'Person'
)
email
=
getResultValue
(
url_string
=
{
'query'
:
recipient
,
'key'
:
'ExactMatch'
},
portal_type
=
'Email'
,
parent_portal_type
=
'Person'
)
if
email
is
None
:
if
email
is
None
:
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/ERP5Site_getFollowUpItemList.py
View file @
17669c01
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
This script returns all possible projects or tickets
This script returns all possible projects or tickets
which can be used a follow up to a CRM event.
which can be used a follow up to a CRM event.
"""
"""
type_list
=
context
.
getPortalTicketTypeList
()
+
context
.
getPortalProjectTypeList
()
portal
=
context
.
getPortalObject
()
node_list
=
context
.
portal_catalog
(
portal_type
=
type_list
,
simulation_state
=
[
'draft'
,
'open'
,
'validated'
,
'contacted'
])
type_list
=
portal
.
getPortalTicketTypeList
()
+
portal
.
getPortalProjectTypeList
()
return
map
(
lambda
x
:(
x
.
getTitle
(),
x
.
getRelativeUrl
()),
node_list
)
node_list
=
portal
.
portal_catalog
(
portal_type
=
type_list
,
simulation_state
=
[
'draft'
,
'open'
,
'validated'
,
'contacted'
])
return
[(
x
.
getTitle
(),
x
.
getRelativeUrl
)
for
x
in
node_list
]
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_createEventFromDefaultEventPath.py
View file @
17669c01
...
@@ -15,7 +15,7 @@ notification_message = portal.notification_message_module.NotificationTool_getDo
...
@@ -15,7 +15,7 @@ notification_message = portal.notification_message_module.NotificationTool_getDo
language
=
language
)
language
=
language
)
assert
notification_message
is
not
None
,
"%s not found."
%
resource_reference
assert
notification_message
is
not
None
,
"%s not found."
%
resource_reference
event
=
context
.
Base_addEvent
(
title
=
''
,
context
.
Base_addEvent
(
title
=
''
,
direction
=
'outgoing'
,
direction
=
'outgoing'
,
portal_type
=
event_portal_type
,
portal_type
=
event_portal_type
,
resource
=
notification_message
.
getSpecialise
(),
resource
=
notification_message
.
getSpecialise
(),
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventActivityReportSectionList.py
View file @
17669c01
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
result
=
[]
result
=
[]
request
=
context
.
REQUEST
params
=
{}
selection_columns
=
[(
'simulation_state'
,
'State'
)]
selection_columns
=
[(
'simulation_state'
,
'State'
)]
#Add dynamicaly ticket type columns to the form
#Add dynamicaly ticket type columns to the form
#The name of column must be without spaces
#The name of column must be without spaces
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventDetailedLineList.py
View file @
17669c01
...
@@ -31,14 +31,14 @@ unassigned_dic['ticket_type']=portal.Base_translateString("Unassigned")
...
@@ -31,14 +31,14 @@ unassigned_dic['ticket_type']=portal.Base_translateString("Unassigned")
#column_list.append(new_dic)
#column_list.append(new_dic)
#Return index of uid into the list and append if not exists
#Return index of uid into the list and append if not exists
def
createReturnLine
(
uid
,
list
):
def
createReturnLine
(
uid
,
list_
):
for
i
in
xrange
(
len
(
list
)):
for
i
in
xrange
(
len
(
list
_
)):
if
list
[
i
][
'uid'
]
==
uid
:
if
list
[
i
][
'uid'
]
==
uid
:
return
i
return
i
new_dic
=
default_dic
.
copy
()
new_dic
=
default_dic
.
copy
()
new_dic
[
'uid'
]
=
uid
new_dic
[
'uid'
]
=
uid
list
.
append
(
new_dic
)
list
_
.
append
(
new_dic
)
return
len
(
list
)
-
1
return
len
(
list
_
)
-
1
# Prepare the parameters to filter
# Prepare the parameters to filter
query_dict
=
{}
query_dict
=
{}
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_getEventDetailedReportSectionList.py
View file @
17669c01
from
Products.ERP5Form.Report
import
ReportSection
from
Products.ERP5Form.Report
import
ReportSection
result
=
[]
result
=
[]
request
=
context
.
REQUEST
selection_columns
=
[(
'ticket_title'
,
'Title'
)]
selection_columns
=
[(
'ticket_title'
,
'Title'
)]
selection_columns
.
append
((
'ticket_type'
,
'Module'
))
selection_columns
.
append
((
'ticket_type'
,
'Module'
))
selection_columns
.
append
((
'resource'
,
'Type'
))
selection_columns
.
append
((
'resource'
,
'Type'
))
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_statEventActivityLineList.py
View file @
17669c01
from
Products.PythonScripts.standard
import
Object
request
=
container
.
REQUEST
request
=
container
.
REQUEST
RESPONSE
=
request
.
RESPONSE
stat_line
=
request
.
get
(
'stat_line'
,
None
)
stat_line
=
request
.
get
(
'stat_line'
,
None
)
return
stat_line
return
stat_line
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/EventModule_statEventDetailedLineList.py
View file @
17669c01
from
Products.PythonScripts.standard
import
Object
request
=
container
.
REQUEST
request
=
container
.
REQUEST
RESPONSE
=
request
.
RESPONSE
stat_line
=
request
.
get
(
'stat_line'
,
None
)
stat_line
=
request
.
get
(
'stat_line'
,
None
)
return
stat_line
return
stat_line
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createDocumentFromAttachment.py
View file @
17669c01
...
@@ -8,7 +8,7 @@ if dms_module is not None:
...
@@ -8,7 +8,7 @@ if dms_module is not None:
# index is numeric and comes with uid
# index is numeric and comes with uid
attachment_index
=
int
(
uid
.
split
(
'index_'
)[
-
1
])
attachment_index
=
int
(
uid
.
split
(
'index_'
)[
-
1
])
attachment_info
=
[
i
for
i
in
attachment_info_list
if
i
[
'index'
]
==
attachment_index
][
0
]
attachment_info
=
[
i
for
i
in
attachment_info_list
if
i
[
'index'
]
==
attachment_index
][
0
]
file
=
context
.
getAttachmentData
(
index
=
attachment_index
)
file
_
=
context
.
getAttachmentData
(
index
=
attachment_index
)
document
=
dms_module
.
newContent
(
follow_up
=
context
.
getFollowUp
(),
document
=
dms_module
.
newContent
(
follow_up
=
context
.
getFollowUp
(),
portal_type
=
line
[
'content_type'
],
portal_type
=
line
[
'content_type'
],
description
=
line
[
'description'
],
description
=
line
[
'description'
],
...
@@ -17,7 +17,7 @@ if dms_module is not None:
...
@@ -17,7 +17,7 @@ if dms_module is not None:
language
=
line
[
'language'
],
language
=
line
[
'language'
],
reference
=
line
[
'reference'
],
reference
=
line
[
'reference'
],
title
=
line
[
'title'
])
title
=
line
[
'title'
])
document
.
edit
(
source_reference
=
attachment_info
[
'file_name'
],
file
=
file
)
document
.
edit
(
source_reference
=
attachment_info
[
'file_name'
],
file
=
file
_
)
if
len
(
uids
)
==
1
:
if
len
(
uids
)
==
1
:
message
=
Base_translateString
(
'${portal_type} created successfully.'
,
message
=
Base_translateString
(
'${portal_type} created successfully.'
,
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createDocumentFromAttachment.xml
View file @
17669c01
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
uids=
[]
, listbox=None, **kw
</string>
</value>
<value>
<string>
uids=
()
, listbox=None, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createRelatedEvent.py
View file @
17669c01
...
@@ -2,15 +2,14 @@
...
@@ -2,15 +2,14 @@
# the current event
# the current event
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.CMFCore.WorkflowCore
import
WorkflowException
N_
=
context
.
Base_translateString
date
=
DateTime
()
date
=
DateTime
()
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
if
portal_type
not
in
portal
.
event_module
.
getVisibleAllowedContentTypeList
():
if
portal_type
not
in
portal
.
event_module
.
getVisibleAllowedContentTypeList
():
raise
WorkflowException
,
"You Don't Have Permission to Add New Event"
raise
WorkflowException
(
"You Don't Have Permission to Add New Event"
)
# Create the draft Event
# Create the draft Event
related_event
=
portal
.
event_module
.
newContent
(
portal
.
event_module
.
newContent
(
portal_type
=
portal_type
,
portal_type
=
portal_type
,
title
=
title
,
title
=
title
,
description
=
description
,
description
=
description
,
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_createRespondEvent.py
View file @
17669c01
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
"""
"""
# this script allows to create a new follow up ticket for a given event
# this script allows to create a new follow up ticket for a given event
event_object
=
context
event_module
=
context
.
getPortalObject
().
getDefaultModule
(
respond_event_portal_type
)
event_module
=
context
.
getPortalObject
().
getDefaultModule
(
respond_event_portal_type
)
# Create the outgoing
# Create the outgoing
respond_event
=
event_module
.
newContent
(
respond_event
=
event_module
.
newContent
(
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getAttachmentFastInputList.py
View file @
17669c01
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ERP5Type.Document
import
newTempBase
contribution_registry
=
context
.
portal_contribution_registry
base_list
=
[]
base_list
=
[]
for
attachment
in
context
.
getAttachmentInformationList
():
for
attachment
in
context
.
getAttachmentInformationList
():
...
@@ -8,7 +7,7 @@ for attachment in context.getAttachmentInformationList():
...
@@ -8,7 +7,7 @@ for attachment in context.getAttachmentInformationList():
if
attachment
[
'uid'
]
not
in
[
'part_1'
,
'part_0'
]:
if
attachment
[
'uid'
]
not
in
[
'part_1'
,
'part_0'
]:
filename
=
context
.
getTitle
()
filename
=
context
.
getTitle
()
if
attachment
.
has_key
(
"file_name"
):
if
attachment
.
has_key
(
"file_name"
):
filename
=
attachment
[
"file_name"
]
filename
=
attachment
[
"file_name"
]
pt
=
"File"
pt
=
"File"
temp_base_id
=
'index_'
.
join
([
attachment
[
"uid"
],
str
(
attachment
[
"index"
])])
temp_base_id
=
'index_'
.
join
([
attachment
[
"uid"
],
str
(
attachment
[
"index"
])])
base_list
.
append
(
newTempBase
(
context
,
id
=
temp_base_id
,
base_list
.
append
(
newTempBase
(
context
,
id
=
temp_base_id
,
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_getPropertyDictFromContent.py
View file @
17669c01
...
@@ -45,7 +45,7 @@ subject = content_information.get('Subject', '')
...
@@ -45,7 +45,7 @@ subject = content_information.get('Subject', '')
body
=
context
.
asText
()
body
=
context
.
asText
()
portal_type
=
None
portal_type
=
None
for
text
in
(
subject
,
body
):
for
text
in
(
subject
,
body
):
portal_type
,
matched_value
=
context
.
Base_findPortalTypeNameAndMatchedValueForEvent
(
text
)
portal_type
,
_
=
context
.
Base_findPortalTypeNameAndMatchedValueForEvent
(
text
)
if
portal_type
is
not
None
:
if
portal_type
is
not
None
:
break
break
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_setTextContentFromNotificationMessage.py
View file @
17669c01
...
@@ -20,7 +20,7 @@ if notification_message is not None:
...
@@ -20,7 +20,7 @@ if notification_message is not None:
target_format
=
"txt"
target_format
=
"txt"
if
context
.
getContentType
()
==
'text/html'
:
if
context
.
getContentType
()
==
'text/html'
:
target_format
=
"html"
target_format
=
"html"
mime
,
text_content
=
notification_message
.
convert
(
target_format
,
_
,
text_content
=
notification_message
.
convert
(
target_format
,
substitution_method_parameter_dict
=
substitution_method_parameter_dict
)
substitution_method_parameter_dict
=
substitution_method_parameter_dict
)
context
.
setTextContent
(
text_content
)
context
.
setTextContent
(
text_content
)
context
.
setAggregateSet
(
context
.
setAggregateSet
(
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/NotificationMessage_getSubstitutionMappingDictFromEvent.py
View file @
17669c01
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
hmac
=
portal
.
Base_getHMACHexdigest
(
key
=
portal
.
Base_getEventHMACKey
(),
message
=
event_value
.
getId
())
def
getSubstitutionMappingDict
():
def
getSubstitutionMappingDict
():
destination
=
event_value
.
getDestinationValue
()
destination
=
event_value
.
getDestinationValue
()
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getResourceItemList.py
View file @
17669c01
...
@@ -75,7 +75,7 @@ def getResourceItemList():
...
@@ -75,7 +75,7 @@ def getResourceItemList():
getCategoryTitle
=
getCategoryTitle_
getCategoryTitle
=
getCategoryTitle_
else
:
else
:
getCategoryTitle
=
lambda
category
,
depth
:
None
getCategoryTitle
=
lambda
category
,
depth
:
None
def
getResourceTitle
(
resource
,
category
,
depth
):
def
getResourceTitle
(
resource
,
category
,
depth
):
# pylint:disable=function-redefined
resource_title
=
getattr
(
resource
,
accessor_id
)()
resource_title
=
getattr
(
resource
,
accessor_id
)()
# depth - 1 because we are at category's child level
# depth - 1 because we are at category's child level
category_path
=
getCategoryTitle_
(
category
,
depth
-
1
)
category_path
=
getCategoryTitle_
(
category
,
depth
-
1
)
...
...
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_init.py
View file @
17669c01
"""
"""
# XXX: Tickets are not documents, so content_type on them has no sense at all
# XXX: Tickets are not documents, so content_type on them has no sense at all
# Set preferred text format
# Set preferred text format
#context.edit(content_type = context.portal_preferences.getPreferredTextFormat())
#context.edit(content_type = context.portal_preferences.getPreferredTextFormat())
bt5/erp5_crm/TestTemplateItem/portal_components/test.erp5.testCRMNotificationTool.py
View file @
17669c01
...
@@ -56,7 +56,7 @@ class TestCRMNotificationTool(TestNotificationTool):
...
@@ -56,7 +56,7 @@ class TestCRMNotificationTool(TestNotificationTool):
message
=
'Message'
)
message
=
'Message'
)
self
.
tic
()
self
.
tic
()
last_message
,
=
self
.
portal
.
MailHost
.
_message_list
last_message
,
=
self
.
portal
.
MailHost
.
_message_list
mfrom
,
mto
,
messageText
=
last_message
mfrom
,
mto
,
_
=
last_message
self
.
assertEqual
(
'Portal Administrator <site@example.invalid>'
,
mfrom
)
self
.
assertEqual
(
'Portal Administrator <site@example.invalid>'
,
mfrom
)
self
.
assertEqual
([
'userA@example.invalid'
],
mto
)
self
.
assertEqual
([
'userA@example.invalid'
],
mto
)
...
...
bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_simulation_workflow/scripts/Event_checkConsistency.py
View file @
17669c01
object
=
state_change
[
'object'
]
state_change
[
'object'
].
Base_checkConsistency
()
object
.
Base_checkConsistency
()
bt5/erp5_crm/bt/skip_coding_style_test
deleted
100644 → 0
View file @
6db1da77
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