summaryrefslogtreecommitdiff
path: root/app/modules/products/forms.py
blob: f00441f8d94cb578d705c84e4a3c189fa81a1e37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from flask_wtf import FlaskForm
from wtforms import (
    SubmitField,
    SelectField,
    HiddenField,
    StringField,
    PasswordField,
    IntegerField,
    FloatField,
    BooleanField,
    DateTimeField,
)
from wtforms.validators import InputRequired, Length, NumberRange


class AddProduct(FlaskForm):
    name = StringField("Product name", validators=[InputRequired()])
    code_accounting = StringField("Accounting code", default=0)
    unit_weight = FloatField("Unit weight", default=0)
    price_net = FloatField("Price (net)", default=0)
    price_gross = FloatField("Price (gross)", default=0)
    tax_rate = FloatField("Tax rate", default=0)
    submit = SubmitField("Add/Update Product")
Copyright 2019--2024 Marius PETER