Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
b4668f59
Commit
b4668f59
authored
Jan 15, 2020
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
history added on_behalf
parent
eba39661
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
app/applicationlayer/cms/form/header/views.py
app/applicationlayer/cms/form/header/views.py
+15
-2
app/applicationlayer/cms/form/onbehalf/views.py
app/applicationlayer/cms/form/onbehalf/views.py
+0
-15
No files found.
app/applicationlayer/cms/form/header/views.py
View file @
b4668f59
...
...
@@ -708,7 +708,20 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
self
.
perform_update
(
serializer
)
new_instance
=
serializer
.
data
original_user
=
new_instance
[
'user'
][
'code'
]
if
original_user
==
current_user
:
data_update
=
{
"on_behalf"
:
None
}
else
:
data_update
=
{
"on_behalf"
:
current_user
}
new_instance
=
{
**
new_instance
,
**
data_update
}
crhistory_save
(
batchno
,
enums
.
CREnum
.
ACTION
.
value
,
...
...
@@ -1063,7 +1076,7 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
"date_sent"
:
convert
[
'date_sent'
],
"delegation"
:
convert
[
'delegation'
],
"action"
:
convert
[
'action'
],
"remarks"
:
convert
[
'remarks'
],
"remarks"
:
convert
[
'remarks'
]
&
convert
[
'on_behalf'
]
,
"created"
:
convert
[
'action_date'
]
}
...
...
app/applicationlayer/cms/form/onbehalf/views.py
View file @
b4668f59
...
...
@@ -71,21 +71,6 @@ from django.core.files.base import ContentFile
from
django.conf
import
settings
from
io
import
BytesIO
from
django.http
import
HttpResponse
from
xhtml2pdf
import
pisa
config
=
configparser
.
ConfigParser
()
config_file
=
os
.
path
.
join
(
'./'
,
'env.ini'
)
config
.
read
(
config_file
)
APPROVER_MESSAGE
=
settings
.
APPROVER_MESSAGE
REQUESTOR_MESSAGE
=
settings
.
REQUESTOR_MESSAGE
REQUESTOR_REJECT_MESSAGE
=
settings
.
REQUESTOR_REJECT_MESSAGE
VENDOR_ACKNOWLEDGE_MESSAGE
=
settings
.
VENDOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_ACKNOWLEDGE_MESSAGE
=
settings
.
REQUESTOR_ACKNOWLEDGE_MESSAGE
REQUESTOR_COMPLETION_MESSAGE
=
settings
.
REQUESTOR_COMPLETION_MESSAGE
VENDOR_ACCEPTANCE_MESSAGE
=
settings
.
VENDOR_ACCEPTANCE_MESSAGE
VENDOR_REJECT_MESSAGE
=
settings
.
VENDOR_REJECT_MESSAGE
class
ChangeRequestFormsViewset
(
viewsets
.
ModelViewSet
):
...
...
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