<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django import forms
from InvenTree.forms import HelperForm

from .models import StockLocation, StockItem


class EditStockLocationForm(HelperForm):

    class Meta:
        model = StockLocation
        fields = [
            'name',
            'parent',
            'description'
        ]


class CreateStockItemForm(HelperForm):

    class Meta:
        model = StockItem
        fields = [
            'part',
            'supplier_part',
            'location',
            'belongs_to',
            'serial',
            'batch',
            'quantity',
            'status',
            # 'customer',
            'URL',
        ]


class MoveStockItemForm(forms.ModelForm):

    note = forms.CharField(label='Notes', required=True, help_text='Add note (required)')

    class Meta:
        model = StockItem

        fields = [
            'location',
        ]


class StocktakeForm(forms.ModelForm):

    class Meta:
        model = StockItem
<commit_msg>Allow editing of 'notes' field when creating new StockItem<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django import forms
from InvenTree.forms import HelperForm

from .models import StockLocation, StockItem


class EditStockLocationForm(HelperForm):

    class Meta:
        model = StockLocation
        fields = [
            'name',
            'parent',
            'description'
        ]


class CreateStockItemForm(HelperForm):

    class Meta:
        model = StockItem
        fields = [
            'part',
            'supplier_part',
            'location',
            'belongs_to',
            'serial',
            'batch',
            'quantity',
            'status',
            'notes',
            # 'customer',
            'URL',
        ]


class MoveStockItemForm(forms.ModelForm):

    note = forms.CharField(label='Notes', required=True, help_text='Add note (required)')

    class Meta:
        model = StockItem

        fields = [
            'location',
        ]


class StocktakeForm(forms.ModelForm):

    class Meta:
        model = StockItem

{'fraction_non_alphanumeric': 0.0974145891043398, 'fraction_numerical': 0.0009233610341643582, 'mean_word_length': 1.7853470437017995, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7452332', 'n_tokens_mistral': 597, 'n_tokens_neox': 568, 'n_words': 143}