Part of stoqlib.domain.inventory View In Hierarchy
The Inventory handles the logic related to creating inventories for the available products (or a group of) in a certain branch. It has two different states:
| Instance Variables | open_date | the date inventory process was started |
| close_date | the date inventory process was closed | |
| branch | branch where the inventory process was done | |
| Class Variables | STATUS_OPEN | The inventory process is open |
| STATUS_CLOSED | The inventory process is closed |
| Method | is_open | Returns True if the inventory process is open, False |
| Method | close | Closes the inventory process |
| Method | all_items_counted | Returns True if all inventory items are counted, False |
| Method | get_items | Returns all the inventory items related to this inventory |
| Class Method | get_open_branches | Retuns all the branches available to open the inventory |
| Class Method | has_open | Returns if there is an inventory opened at the moment or not. |
| Method | get_items_for_adjustment | Returns all the inventory items that needs adjustment, that is |
| Method | has_adjusted_items | Returns if we already have an item adjusted or not. |
| Method | cancel | Cancel this inventory. Notice that, to cancel an inventory no |
| Method | get_status_str | Undocumented |
Inherited from Domain:
| Method | __init__ | Undocumented |
| Method | _create | Undocumented |
| Method | user | Undocumented |
| Class Method | iselect | Like select, but search on the adapter implementing the interface iface |
| Class Method | iselectBy | Like selectBy, but search on the adapter implementing the interface iface |
| Class Method | iselectOne | Like selectOne, but search on the adapter implementing the interface iface |
| Class Method | iselectOneBy | Like selectOneBy, but search on the adapter implementing the interface iface |
| Class Method | iget | Like get, but gets on the adapter implementing the interface iface |
Inherited from AbstractModel (via Domain, BaseDomain):
| Method | __ne__ | Undocumented |
| Method | __eq__ | Undocumented |
| Method | _SO_setValue | Undocumented |
| Method | clone | Get a persistent copy of an existent object. Remember that we can |
| Method | get_connection | Undocumented |
Inherited from AdaptableORMObject (via Domain):
| Class Method | registerFacet | Registers a facet for class cls. |
Inherited from Adaptable (via Domain, AdaptableORMObject):
| Class Method | getFacetType | Fetches a facet type associated with an interface, or raise |
| Class Method | getFacetTypes | Returns facet classes for this object |
| Method | addFacet | Adds a facet implementing iface for the current object |
| Method | removeFacet | Removes a facet from the current object |
| Method | getFacets | Gets a list of facets assoicated with the current object. |
| Parameters | close_date | the closing date or None for right now. |
| (type: datetime.datetime ) | ||
| Returns | items
(type: a sequence of InventoryItem
) | |
| Returns | branches
(type: a sequence of PersonAdaptToBranch
) | |
| Returns | The open inventory, if there is one. None otherwise. | |
| Returns | items
(type: a sequence of InventoryItem
) | |
| Returns | True if there is one or more items adjusted, False otherwise. | |