stalker.models.budget.BudgetEntry¶
-
class
stalker.models.budget.BudgetEntry(budget=None, good=None, price=0, realized_total=0, amount=0.0, **kwargs)[source]¶ Bases:
stalker.models.entity.Entity,stalker.models.mixins.AmountMixin,stalker.models.mixins.UnitMixinManages entries in a Budget.
With BudgetEntries one can manage project budget entries one by one. Each entry shows one component of a bigger budget. Entries are generally a reflection of a
Goodinstance and shows how many of that Good has been included in this Budget, and what was the discounted price of that Good.Parameters: - budget – The
Budgetthat this entry is a part of. - good – Stores a
Goodinstance to carry all the cost/msrp/unit data from. - price (float) – The decided price of this entry. This is generally
bigger than the
costand should be also bigger thanmsrpbut the person that is editing the budget which this entry is related to can decide to do a discount on this entry and give a different price. This attribute holds the proposed final price. - realized_total (float) – This attribute is for holding the realized
price of this entry. It can be the same number of the
pricemultiplied by theamountor can be something else that reflects the reality. Generally it is for calculating the “service” cost/profit. - amount (float) – Defines the amount of
Goodthat is in consideration for this entry.
-
__init__(budget=None, good=None, price=0, realized_total=0, amount=0.0, **kwargs)¶
Methods
__init__([budget, good, price, …])Attributes
amountbudgetbudget_idcostcreated_byThe Userwho has created this object.created_by_idThe id of the Userwho has created this entity.date_createdA datetime.datetimeinstance showing the creation date and time of this object.date_updatedA datetime.datetimeinstance showing the update date and time of this object.descriptionDescription of this object. entity_groupsentity_identity_typeentry_idgeneric_dataThis attribute can hold any kind of data which exists in SOM. generic_textThis attribute can hold any text. goodgood_idhtml_classhtml_styleidmetadatamsrpnameName of this object nice_nameNice name of this object. notesAll the Notess attached to this entity.plural_class_namethe plural name of this class pricequeryrealized_totaltagsA list of tags attached to this object. thumbnailthumbnail_idtjp_idreturns TaskJuggler compatible id to_tjprenders a TaskJuggler compliant string used for TaskJuggler typeThe type of the object. type_idThe id of the Typeof this entity.unitupdated_byThe Userwho has updated this object.updated_by_idThe id of the Userwho has updated this entity.-
date_created¶ A
datetime.datetimeinstance showing the creation date and time of this object.
-
date_updated¶ A
datetime.datetimeinstance showing the update date and time of this object.
-
description¶ Description of this object.
-
generic_data¶ This attribute can hold any kind of data which exists in SOM.
-
generic_text¶ This attribute can hold any text.
-
name¶ Name of this object
-
nice_name¶ Nice name of this object.
It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.
-
notes¶ All the
Notess attached to this entity.It is a list of
Noteinstances or an empty list, setting it to None will raise a TypeError.
-
plural_class_name¶ the plural name of this class
A list of tags attached to this object.
It is a list of
Taginstances which shows the tags of this object
-
tjp_id¶ returns TaskJuggler compatible id
-
to_tjp¶ renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.
-
type¶ The type of the object.
It is a
Typeinstance with a properType.target_entity_type.
- budget – The