예제 #1
0
class RecipeQueryForm(forms.Form):
    sizeChoices = forms.MultipleChoiceField(label="Size")
    coatingChoices = forms.MultipleChoiceField(label="Coating")
    panelDepthChoices = forms.MultipleChoiceField(label="Panel Depth")
    cradleDepthChoices = forms.MultipleChoiceField(label="Cradle Depth")
    cradleWidthChoices = forms.MultipleChoiceField(label="Cradle Width")
    sprayColorChoices = forms.MultipleChoiceField(label="Color")

    sizeChoices.choices = recipe_component.retail_sizes()
    coatingChoices.choices = recipe_component.coatings()
    panelDepthChoices.choices = recipe_component.panel_depths()
    cradleDepthChoices.choices = recipe_component.cradle_depths()
    cradleWidthChoices.choices = recipe_component.cradle_widths()
    sprayColorChoices.choices = recipe_component.spray_colors()
예제 #2
0
class QueryForRetailCutsForm(forms.Form):
    retail_wip_type = forms.ChoiceField(label="WIP Type", required=False)
    retail_wip_date = forms.DateField(widget=SelectDateWidget(), label="WIP Date",\
            initial=date.today(), required=False)
    retail_coating_choices = forms.ChoiceField(label="Coating", required=False)
    retail_panel_depths = forms.ChoiceField(label="Panel Depth",
                                            required=False)
    retail_is_cradled = forms.BooleanField(label="Cradled?", required=False)
    retail_coating_choices.choices = recipe_component.coatings()
    retail_panel_depths.choices = recipe_component.panel_depths()
    retail_wip_type.choices = [
        ['daily', 'Daily'], ['adjustment', 'Adjustment'], ['loss', 'Loss'],
        ['beginningofperiodinventory', 'Beginning of Period Inventory']
    ]
예제 #3
0
class QueryForSprayedForm(forms.Form):
    sprayed_wip_type = forms.ChoiceField(label="WIP Type", required=False)
    sprayed_wip_date = forms.DateField(widget=SelectDateWidget(), label="WIP Date",\
            initial=date.today(), required=False)
    sprayed_spray_color_choices = forms.ChoiceField(label="Color",
                                                    required=False)
    sprayed_panel_depths = forms.ChoiceField(label="Panel Depth",
                                             required=False)
    #form field values
    sprayed_spray_color_choices.choices = recipe_component.spray_colors()
    sprayed_panel_depths.choices = recipe_component.panel_depths()
    sprayed_wip_type.choices = [
        ['daily', 'Daily'], ['adjustment', 'Adjustment'], ['loss', 'Loss'],
        ['beginningofperiodinventory', 'Beginning of Period Inventory']
    ]
예제 #4
0
class QueryForm(forms.Form):
    coatingChoices = forms.ChoiceField(label="Coating")
    panelDepths = forms.ChoiceField(label="Panel Depth")
    primarySizeChoices = forms.ChoiceField(label="Primary Size Desired")
    primarySizeQuantity = forms.IntegerField(label="Primary Quantity Desired",
                                             required=False,
                                             initial=0)
    isCradle = forms.BooleanField(label="Is Primary Cradled?", required=False)
    secondarySizeChoices = forms.ChoiceField(label="Secondary Size Desired",
                                             required=False)
    primarySizeChoices.choices = recipe_component.retail_sizes()
    #TODO: make this function and primary choice dropdown more useful
    secondarySizeChoices.choices = recipe_component.retail_sizes()
    secondarySizeChoices.choices.insert(0, ('', '----'))
    coatingChoices.choices = recipe_component.coatings()
    panelDepths.choices = recipe_component.panel_depths()
예제 #5
0
class QueryForTerceroForm(forms.Form):
    tercero_wip_type = forms.ChoiceField(label="WIP Type", required=False)
    tercero_wip_date = forms.DateField(widget=DateWidget(usel10n=True, bootstrap_version=3),\
            initial=date.today(), required=False)
    tercero_coating_choices = forms.ChoiceField(label="Coating",
                                                required=False)
    tercero_panel_depths = forms.ChoiceField(label="Panel Depth",
                                             required=False)
    tercero_panel_sizes = forms.ChoiceField(label="Panel Size", required=False)
    # form field values
    tercero_coating_choices.choices = recipe_component.coatings()
    tercero_panel_depths.choices = recipe_component.panel_depths()
    tercero_panel_sizes.choices = recipe_component.coating_cut_sizes()
    tercero_wip_type.choices = [
        ['daily', 'Daily'], ['adjustment', 'Adjustment'], ['loss', 'Loss'],
        ['beginningofperiodinventory', 'Beginning of Period Inventory']
    ]