From 5c01fb762c08e2814ce3e62de0a12095262912cc Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 3 Apr 2015 21:33:24 +0200 Subject: [PATCH] Augmente le nombre de chiffres dans les prix --- ...oice_ppd__chg_field_profileoptionchoice.py | 22 +++++++++---------- polynum/base/models/profile.py | 8 +++---- polynum/base/models/request.py | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/polynum/base/migrations/0029_auto__chg_field_profileoptionchoice_ppd__chg_field_profileoptionchoice.py b/polynum/base/migrations/0029_auto__chg_field_profileoptionchoice_ppd__chg_field_profileoptionchoice.py index 4493e49..8fbed31 100644 --- a/polynum/base/migrations/0029_auto__chg_field_profileoptionchoice_ppd__chg_field_profileoptionchoice.py +++ b/polynum/base/migrations/0029_auto__chg_field_profileoptionchoice_ppd__chg_field_profileoptionchoice.py @@ -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'}), diff --git a/polynum/base/models/profile.py b/polynum/base/models/profile.py index 6c7dcc5..bb205ce 100644 --- a/polynum/base/models/profile.py +++ b/polynum/base/models/profile.py @@ -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) diff --git a/polynum/base/models/request.py b/polynum/base/models/request.py index 1d43d31..f405951 100644 --- a/polynum/base/models/request.py +++ b/polynum/base/models/request.py @@ -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)