mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			81303b8ef8
			...
			be168c5ada
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						be168c5ada
	
				 | 
					
					
						|||
| 
						
						
							
						
						b46ae6f856
	
				 | 
					
					
						|||
| 
						
						
							
						
						ec0bcbf015
	
				 | 
					
					
						
@@ -3,6 +3,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import json
 | 
					import json
 | 
				
			||||||
from datetime import datetime, date
 | 
					from datetime import datetime, date
 | 
				
			||||||
 | 
					from decimal import Decimal
 | 
				
			||||||
from urllib.parse import quote_plus
 | 
					from urllib.parse import quote_plus
 | 
				
			||||||
from warnings import warn
 | 
					from warnings import warn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -152,6 +153,8 @@ class TestAPI(TestCase):
 | 
				
			|||||||
                value = value.isoformat()
 | 
					                value = value.isoformat()
 | 
				
			||||||
            elif isinstance(value, ImageFieldFile):
 | 
					            elif isinstance(value, ImageFieldFile):
 | 
				
			||||||
                value = value.name
 | 
					                value = value.name
 | 
				
			||||||
 | 
					            elif isinstance(value, Decimal):
 | 
				
			||||||
 | 
					                value = str(value)
 | 
				
			||||||
            query = json.dumps({field.name: value})
 | 
					            query = json.dumps({field.name: value})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Create sample permission
 | 
					            # Create sample permission
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3511,6 +3511,7 @@
 | 
				
			|||||||
				56,
 | 
									56,
 | 
				
			||||||
				57,
 | 
									57,
 | 
				
			||||||
				58,
 | 
									58,
 | 
				
			||||||
 | 
									135,
 | 
				
			||||||
				137,
 | 
									137,
 | 
				
			||||||
				143,
 | 
									143,
 | 
				
			||||||
				147,
 | 
									147,
 | 
				
			||||||
@@ -3521,8 +3522,7 @@
 | 
				
			|||||||
				176,
 | 
									176,
 | 
				
			||||||
				177,
 | 
									177,
 | 
				
			||||||
				180,
 | 
									180,
 | 
				
			||||||
				181,
 | 
									181
 | 
				
			||||||
				182
 | 
					 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# Generated by Django 2.2.19 on 2021-03-13 11:35
 | 
					# Generated by Django 2.2.19 on 2021-03-21 09:34
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import django.core.validators
 | 
					import django.core.validators
 | 
				
			||||||
from django.db import migrations, models
 | 
					from django.db import migrations, models
 | 
				
			||||||
@@ -15,7 +15,7 @@ class Migration(migrations.Migration):
 | 
				
			|||||||
        migrations.AlterField(
 | 
					        migrations.AlterField(
 | 
				
			||||||
            model_name='product',
 | 
					            model_name='product',
 | 
				
			||||||
            name='quantity',
 | 
					            name='quantity',
 | 
				
			||||||
            field=models.FloatField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
 | 
					            field=models.DecimalField(decimal_places=2, max_digits=7, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
        migrations.AlterField(
 | 
					        migrations.AlterField(
 | 
				
			||||||
            model_name='specialtransactionproxy',
 | 
					            model_name='specialtransactionproxy',
 | 
				
			||||||
@@ -132,7 +132,9 @@ class Product(models.Model):
 | 
				
			|||||||
        verbose_name=_("Designation"),
 | 
					        verbose_name=_("Designation"),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    quantity = models.FloatField(
 | 
					    quantity = models.DecimalField(
 | 
				
			||||||
 | 
					        decimal_places=2,
 | 
				
			||||||
 | 
					        max_digits=7,
 | 
				
			||||||
        verbose_name=_("Quantity"),
 | 
					        verbose_name=_("Quantity"),
 | 
				
			||||||
        validators=[MinValueValidator(0)],
 | 
					        validators=[MinValueValidator(0)],
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user