Class s.d.i.InventoryItem(Domain):

Part of stoqlib.domain.inventory View In Hierarchy

The InventoryItem belongs to an Inventory. It contains the recorded quantity and the actual quantity related to a specific product. If those quantities are not identitical, it will also contain a reason and a cfop describing that.
Instance Variablesproductthe item
recorded_quantitythe recorded quantity of a product
actual_quantitythe actual quantity of a product
product_costthe product's cost when the product was adjusted.
inventorythe inventory process that contains this item
cfopthe cfop used to adjust this item, this is only set when an adjustment is done
reasonthe reason of why this item has been adjusted
Method _add_inventory_fiscal_entry Undocumented
Method adjust Create an entry in fiscal book registering the adjustment
Method adjusted Returns True if the item have already been adjusted,
Method get_code Returns the product code
Method get_description Returns the product description
Method get_fiscal_description Returns a description of the product tax constant
Method get_unit_description Returns the product unit description or None if it's not set
Method get_adjustment_quantity Returns the adjustment quantity, the actual quantity minus
Method get_total_cost Returns the total cost of this item, the actual quantity multiplied

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.
def _add_inventory_fiscal_entry(self, invoice_number):
Undocumented
def adjust(self, invoice_number):
Create an entry in fiscal book registering the adjustment with the related cfop data and change the product quantity available in stock.
def adjusted(self):
Returns True if the item have already been adjusted, False otherwise.
def get_code(self):
Returns the product code
def get_description(self):
Returns the product description
def get_fiscal_description(self):
Returns a description of the product tax constant
def get_unit_description(self):
Returns the product unit description or None if it's not set
def get_adjustment_quantity(self):
Returns the adjustment quantity, the actual quantity minus the recorded quantity or None if there is no actual quantity yet.
def get_total_cost(self):
Returns the total cost of this item, the actual quantity multiplied by the product cost in the moment it was adjusted. If the item was not adjusted yet, the total cost will be zero.
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.