Class s.d.p.Product(Domain):

Part of stoqlib.domain.product View In Hierarchy

Class responsible to store basic products informations.
Method facet_IStorable_add Undocumented
Method remove Deletes this product from the database.
Method can_remove Whether we can delete this sellable from the database.
Method retain Undocumented
Method get_history Returns the list of ProductHistory for this product.
Method get_main_supplier_name Undocumented
Method get_main_supplier_info Gets a list of main suppliers for a Product, the main supplier
Method get_suppliers_info Returns a list of suppliers for this product
Method get_components Returns the products which are our components.
Method get_production_cost Return the production cost of a Product. The production cost
Method is_supplied_by If this product is supplied by the given supplier, returns the
Method is_composed_by Returns if we are composed by a given product or not.

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 facet_IStorable_add(self, **kwargs):
Undocumented
def remove(self):
Deletes this product from the database.
def can_remove(self):
Whether we can delete this sellable from the database.

False if the product/service was never sold or received. True otherwise.

def retain(self, quantity, branch, reason, product, cfop=None):
Undocumented
def get_history(self):
Returns the list of ProductHistory for this product.
def get_main_supplier_name(self):
Undocumented
def get_main_supplier_info(self):
Gets a list of main suppliers for a Product, the main supplier is the most recently selected supplier.
Returnsmain supplier info (type: ProductSupplierInfo or None if a product lacks a main suppliers )
def get_suppliers_info(self):
Returns a list of suppliers for this product
Returnsa list of suppliers (type: list of ProductSupplierInfo )
def get_components(self):
Returns the products which are our components.
Returnsa sequence of Product instances
def get_production_cost(self):
Return the production cost of a Product. The production cost is defined as the sum of the product cost plus the costs of its components.
Returnsthe production cost
def is_supplied_by(self, supplier):
If this product is supplied by the given supplier, returns the object with the supplier information. Returns None otherwise
def is_composed_by(self, product):
Returns if we are composed by a given product or not.
Parametersproducta possible component of this product
ReturnsTrue if the given product is one of our component or a component of our components, otherwise False.
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.