mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Specify 'default' functions for 'reference' field in SalesOrder and PurchaseOrder
- Refactor CreatePurchaseOrder form - Some migrations
This commit is contained in:
		
							
								
								
									
										20
									
								
								InvenTree/company/migrations/0040_alter_company_currency.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								InvenTree/company/migrations/0040_alter_company_currency.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| # Generated by Django 3.2.4 on 2021-07-02 13:21 | ||||
|  | ||||
| import InvenTree.validators | ||||
| import common.settings | ||||
| from django.db import migrations, models | ||||
|  | ||||
|  | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|         ('company', '0039_auto_20210701_0509'), | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
|         migrations.AlterField( | ||||
|             model_name='company', | ||||
|             name='currency', | ||||
|             field=models.CharField(blank=True, default=common.settings.currency_code_default, help_text='Default currency used for this company', max_length=3, validators=[InvenTree.validators.validate_currency_code], verbose_name='Currency'), | ||||
|         ), | ||||
|     ] | ||||
| @@ -115,16 +115,11 @@ | ||||
|     }); | ||||
|  | ||||
|     $("#company-order-2").click(function() { | ||||
|         launchModalForm("{% url 'po-create' %}", | ||||
|         { | ||||
|             data: { | ||||
|                 supplier: {{ company.id }}, | ||||
|             }, | ||||
|             follow: true, | ||||
|         createPurchaseOrder({ | ||||
|             supplier: {{ company.pk }}, | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|  | ||||
|     $('#company-delete').click(function() { | ||||
|         constructForm('{% url "api-company-detail" company.pk %}', { | ||||
|             method: 'DELETE', | ||||
|   | ||||
| @@ -39,14 +39,9 @@ | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|  | ||||
|     function newOrder() { | ||||
|         launchModalForm("{% url 'po-create' %}", | ||||
|         { | ||||
|             data: { | ||||
|                 supplier: {{ company.id }}, | ||||
|             }, | ||||
|             follow: true, | ||||
|         createPurchaseOrder({ | ||||
|             supplier: {{ company.pk }}, | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user