-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue #174] several adjustment to fix issues created by the massive …
…change in the models. started to create the calculations for the final presentation of the planned vs effective chart
- Loading branch information
Showing
13 changed files
with
210 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from django.db import models | ||
from django.utils.translation import ugettext as _ | ||
from django.contrib import admin | ||
from rest_framework import serializers | ||
|
||
|
||
class EstimationStatus(models.Model): | ||
title = models.CharField(verbose_name=_("Title"), | ||
max_length=250, | ||
blank=False, | ||
null=False) | ||
description = models.TextField(verbose_name=_("Text"), | ||
blank=True, | ||
null=True) | ||
is_obsolete = models.BooleanField(verbose_name=_("Status represents estimation is obsolete"),) | ||
|
||
class Meta: | ||
app_label = "crm" | ||
verbose_name = _('Estimation Status') | ||
verbose_name_plural = _('Estimation Status') | ||
|
||
def __str__(self): | ||
return str(self.id) + " " + str(self.title) | ||
|
||
|
||
class EstimationStatusAdminView(admin.ModelAdmin): | ||
list_display = ('id', | ||
'title', | ||
'description', | ||
'is_obsolete') | ||
|
||
fieldsets = ( | ||
(_('Agreement Status'), { | ||
'fields': ('title', | ||
'description', | ||
'is_obsolete') | ||
}), | ||
) | ||
save_as = True | ||
|
||
|
||
class EstimationStatusJSONSerializer(serializers.HyperlinkedModelSerializer): | ||
class Meta: | ||
model = EstimationStatus | ||
fields = ('id', | ||
'title', | ||
'description',) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.