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
2a582ada
Commit
2a582ada
authored
Mar 17, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'red-develop' into 'feature/RMS.v2.1-AMS'
Red develop See merge request rms/Backend/api-main-service!990
parents
e6088c5c
6cb4103f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
app/applicationlayer/ams/asset/serializers.py
app/applicationlayer/ams/asset/serializers.py
+2
-0
app/applicationlayer/ams/asset_stock/serializers.py
app/applicationlayer/ams/asset_stock/serializers.py
+6
-0
No files found.
app/applicationlayer/ams/asset/serializers.py
View file @
2a582ada
...
...
@@ -10,9 +10,11 @@ class AMSAssetSerializer(serializers.ModelSerializer):
ret
[
'in_qty'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'In-Store'
)
.
count
()
ret
[
'out_qty'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'Deployed'
)
.
count
()
ret
[
'unavailable'
]
=
instance
.
ams_asset_to_assetdetail
.
filter
(
status
=
'Faulty'
)
.
count
()
ret
[
'created_by'
]
=
instance
.
created_by
.
name
,
return
ret
class
Meta
:
model
=
AMSAsset
fields
=
'__all__'
read_only_fields
=
(
'created_by'
,)
app/applicationlayer/ams/asset_stock/serializers.py
View file @
2a582ada
...
...
@@ -9,6 +9,12 @@ class AMSAssetStockSerializer(serializers.ModelSerializer):
ret
[
'asset_group'
]
=
instance
.
asset_group
.
name
ret
[
'asset'
]
=
instance
.
asset
.
name
ret
[
'asset_type'
]
=
instance
.
asset
.
asset_type
.
name
ret
[
'manager'
]
=
instance
.
manager
.
name
ret
[
'user_client'
]
=
instance
.
user_client
.
name
# ret['created_by'] = {
# "name": instance.created_by.name,
# "code": instance.created_by.code
# }
return
ret
...
...
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