Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Léo-Paul Géneau
slapos.core
Commits
c9e6665e
Commit
c9e6665e
authored
Mar 02, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Remove useless code and simplify the query.
parent
68e44818
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/WebSection_getUserTicketList.py
...ins/slapos_crm_monitoring/WebSection_getUserTicketList.py
+3
-19
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/WebSection_getUserTicketList.py
View file @
c9e6665e
portal
=
context
.
getPortalObject
()
kw
[
'portal_type'
]
=
[
"Support Request"
,
"Regularisation Request"
,
"Upgrade Decision"
]
support_in_progress_url
=
context
.
REQUEST
.
get
(
'new_support_request'
,
''
)
person
=
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
if
person
:
kw
[
'default_destination_decision_uid'
]
=
person
.
getUid
()
kw
[
'simulation_state'
]
=
"NOT cancelled"
kw
[
'sort_on'
]
=
((
"catalog.simulation_state='suspended'"
,
'DESC'
),
(
"catalog.simulation_state='validated'"
,
'DESC'
),
(
"catalog.simulation_state='confirmed'"
,
'DESC'
),
(
'modification_date'
,
'DESC'
),)
kw
[
'sort_on'
]
=
((
'modification_date'
,
'DESC'
),)
kw
[
'limit'
]
=
50
if
not
support_in_progress_url
:
return
portal
.
portal_catalog
(
**
kw
)
support_in_progress
=
portal
.
restrictedTraverse
(
support_in_progress_url
,
None
)
kw
[
'uid'
]
=
"NOT %s"
%
support_in_progress
.
getUid
()
support_request_list
=
portal
.
portal_catalog
(
**
kw
)
if
support_in_progress
and
\
support_in_progress
.
getDestinationDecisionUid
()
==
person
.
getUid
():
support_request_list
=
list
(
portal
.
portal_catalog
(
**
kw
))
support_request_list
.
insert
(
0
,
support_in_progress
)
return
support_request_list
return
portal
.
portal_catalog
(
**
kw
)
else
:
return
[]
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