mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add migration file
This commit is contained in:
parent
314cec5ad0
commit
24da5d41b8
19
InvenTree/stock/migrations/0074_alter_stockitem_batch.py
Normal file
19
InvenTree/stock/migrations/0074_alter_stockitem_batch.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.2.12 on 2022-04-26 10:19
|
||||
|
||||
from django.db import migrations, models
|
||||
import stock.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0073_alter_stockitem_belongs_to'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='batch',
|
||||
field=models.CharField(blank=True, default=stock.models.generate_batch_code, help_text='Batch code for this stock item', max_length=100, null=True, verbose_name='Batch Code'),
|
||||
),
|
||||
]
|
@ -227,6 +227,8 @@ def generate_batch_code():
|
||||
|
||||
now = datetime.now()
|
||||
|
||||
# Pass context data through to the template randering.
|
||||
# The folowing context variables are availble for custom batch code generation
|
||||
context = {
|
||||
'date': now,
|
||||
'year': now.year,
|
||||
|
Loading…
Reference in New Issue
Block a user