Common forms
Below you will find the API documentation for the forms that are used throughout the Centurion ERP application.
Model Form
Bases: ModelForm
Abstract Form class for form inclusion
This class exists so that common functions can be conducted against forms as they are loaded.
Attributes
organization_field: str = 'organization'
Organization Field
Name of the field that contains Organizations.
This field will be filtered to those that the user is part of.
model_name_plural = self.instance._meta.verbose_name_plural
Functions
__init__(*args, **kwargs)
Form initialization.
Initialize the form using the super classes first then continue to initialize the form using logic contained within this method.
Tenancy Objects
Fields that contain an attribute called organization
will have the objects filtered to
the organizations the user is part of. If the object has is_global=True
, that object will not be
filtered out.
Requirement
This method may be overridden however must still be called from the overriding function. i.e. super().__init__(*args, **kwargs)
About:
This page forms part of our Project Centurion ERP.
Page Metadata
Version: ToDo: place files short git commit hereDate Created: 2024-07-12
Date Edited: 2024-07-16
Contribution:
Would You like to contribute to our Centurion ERP project? You can assist in the following ways:
- Edit This Page If there is a mistake or a way you can improve it.
- Add a Page to the Manual if you would like to add an item to our manual
- Raise an Issue if there is something about this page you would like to improve, and git is unfamiliar to you.
ToDo: Add the page list of contributors