mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
41 lines
769 B
Python
41 lines
769 B
Python
"""
|
|
Django Forms for interacting with Company app
|
|
"""
|
|
|
|
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from InvenTree.forms import HelperForm
|
|
|
|
from .models import Company
|
|
|
|
|
|
class EditCompanyForm(HelperForm):
|
|
""" Form for editing a Company object """
|
|
|
|
class Meta:
|
|
model = Company
|
|
fields = [
|
|
'name',
|
|
'description',
|
|
'website',
|
|
'address',
|
|
'phone',
|
|
'email',
|
|
'contact',
|
|
'image',
|
|
'is_customer',
|
|
'is_supplier',
|
|
'notes'
|
|
]
|
|
|
|
|
|
class CompanyImageForm(HelperForm):
|
|
""" Form for uploading a Company image """
|
|
|
|
class Meta:
|
|
model = Company
|
|
fields = [
|
|
'image'
|
|
]
|