Skip to content

Commit

Permalink
[#17] 采购模块 (#277)
Browse files Browse the repository at this point in the history
* [#17] 采购模块
修改一个字段、给前端展示相应字段的中文

* flake8

* pretty status
  • Loading branch information
eyeeco authored and Time1ess committed Jan 17, 2018
1 parent 9a8a710 commit 77e6744
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Procurement/serializers/materialsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ def create(self, validated_data):


class MaterialSubApplyUpdateSerializer(serializers.ModelSerializer):

class Meta:
model = MaterialSubApply
fields = '__all__'
read_only_fields = ('applicant',)
fields = ('figure_code', 'work_order', 'production', 'reason')


class MaterialSubApplyListSerializer(MaterialSubApplySerializer):
Expand Down
4 changes: 4 additions & 0 deletions Procurement/serializers/status_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@


class StatusChangeSerializer(serializers.ModelSerializer):
pretty_original_status = serializers.CharField(
source='get_original_status_display')
pretty_new_status = serializers.CharField(
source='get_new_status_display')

class Meta:
model = StatusChange
Expand Down

0 comments on commit 77e6744

Please sign in to comment.