Augmente le nombre de chiffres dans les prix

This commit is contained in:
Benjamin Dauvergne 2015-04-03 21:33:24 +02:00
parent 7fc61654f7
commit 5c01fb762c
3 changed files with 16 additions and 16 deletions

View File

@ -10,22 +10,22 @@ class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'ProfileOptionChoice.ppd'
db.alter_column(u'base_profileoptionchoice', 'ppd', self.gf('django.db.models.fields.DecimalField')(max_digits=7, decimal_places=5))
db.alter_column(u'base_profileoptionchoice', 'ppd', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=5))
# Changing field 'ProfileOptionChoice.ppp'
db.alter_column(u'base_profileoptionchoice', 'ppp', self.gf('django.db.models.fields.DecimalField')(max_digits=7, decimal_places=5))
db.alter_column(u'base_profileoptionchoice', 'ppp', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=5))
# Changing field 'Entity.parent'
db.alter_column(u'base_entity', 'parent_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['base.Entity']))
# Changing field 'Request.cost'
db.alter_column(u'base_request', 'cost', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=7, decimal_places=5))
db.alter_column(u'base_request', 'cost', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=5))
# Changing field 'Profile.ppd'
db.alter_column(u'base_profile', 'ppd', self.gf('django.db.models.fields.DecimalField')(max_digits=7, decimal_places=5))
db.alter_column(u'base_profile', 'ppd', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=5))
# Changing field 'Profile.ppp'
db.alter_column(u'base_profile', 'ppp', self.gf('django.db.models.fields.DecimalField')(max_digits=7, decimal_places=5))
db.alter_column(u'base_profile', 'ppp', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=5))
# Changing field 'RoleAssociation.role'
db.alter_column(u'base_roleassociation', 'role_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['base.Role']))
@ -197,8 +197,8 @@ class Migration(SchemaMigration):
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '5'}),
'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '5'}),
'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '10', 'decimal_places': '5'}),
'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '10', 'decimal_places': '5'}),
'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
'base.profileoption': {
@ -217,8 +217,8 @@ class Migration(SchemaMigration):
'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'option': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.ProfileOption']"}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '5'}),
'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '7', 'decimal_places': '5'}),
'ppd': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '10', 'decimal_places': '5'}),
'ppp': ('django.db.models.fields.DecimalField', [], {'default': "'0.00'", 'max_digits': '10', 'decimal_places': '5'}),
'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
'base.request': {
@ -232,9 +232,9 @@ class Migration(SchemaMigration):
'contact_telephone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
'copies': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
'copyright': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '7', 'decimal_places': '5', 'blank': 'True'}),
'cost': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '5', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2015, 4, 6, 0, 0)', 'null': 'True', 'blank': 'True'}),
'delivery_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2015, 4, 7, 0, 0)', 'null': 'True', 'blank': 'True'}),
'delivery_place': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.DeliveryPlace']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'details': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['base.Entity']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),

View File

@ -65,9 +65,9 @@ class ProfileOptionChoice(models.Model):
name = models.CharField(max_length=128, verbose_name=_(u'Nom du choix'))
visible = models.BooleanField(verbose_name=_(u'Visible'), default=True, blank=True)
option = models.ForeignKey(ProfileOption, verbose_name=_(u'Option de profil à laquelle ce choix est lié'))
ppp = models.DecimalField(max_digits=7, decimal_places=5,
ppp = models.DecimalField(max_digits=10, decimal_places=5,
verbose_name=_(u'Prix par page (en euros)'), default=Zero)
ppd = models.DecimalField(max_digits=7, decimal_places=5,
ppd = models.DecimalField(max_digits=10, decimal_places=5,
verbose_name=_(u'Prix par document (en euros)'), default=Zero)
description = models.TextField(verbose_name=_(u'Description'), blank=True)
order = models.IntegerField(verbose_name=_(u'Ordre'), default=0)
@ -92,9 +92,9 @@ class Profile(models.Model):
name = models.CharField(max_length=128, verbose_name=_(u"Nom du profil d'impression"))
visible = models.BooleanField(verbose_name=_(u'Visible'), default=True, blank=True)
choices = models.ManyToManyField(ProfileOptionChoice, verbose_name=_(u'Choix associés au profil'), blank=True)
ppp = models.DecimalField(max_digits=7, decimal_places=5,
ppp = models.DecimalField(max_digits=10, decimal_places=5,
verbose_name=_(u'Prix par page (en euros)'), default=Zero)
ppd = models.DecimalField(max_digits=7, decimal_places=5,
ppd = models.DecimalField(max_digits=10, decimal_places=5,
verbose_name=_(u'Prix par document (en euros)'), default=Zero)
description = models.TextField(verbose_name=_(u'Description'), blank=True)
order = models.IntegerField(verbose_name=_(u'Ordre'), default=0)

View File

@ -237,7 +237,7 @@ class Request(models.Model):
financial_comment = models.TextField(
verbose_name=_(u"Commentaire pour la facturation"), blank=True)
cost = models.DecimalField(verbose_name=_(u'Coût'), blank=True, null=True,
max_digits=7, decimal_places=5)
max_digits=10, decimal_places=5)
is_from_remote_request = models.BooleanField(blank=True,
verbose_name=_(u'Demande initiée via un Web-Service'),
default=False)