Class s.d.p.PurchaseOrder(ValidatableDomain):

Part of stoqlib.domain.purchase View In Hierarchy

Purchase and order definition.
Method get_items Undocumented
Method remove_item Undocumented
Method add_item Undocumented
Method _set_discount_by_percentage Sets a discount by percentage.
Method _get_discount_by_percentage Undocumented
Method _set_surcharge_by_percentage Sets a surcharge by percentage.
Method _get_surcharge_by_percentage Undocumented
Method order_number Undocumented
Method payments Undocumented
Method _get_percentage_value Undocumented
Method is_paid Undocumented
Method can_cancel Find out if it's possible to cancel the order
Method can_close Find out if it's possible to close the order
Method confirm Confirms the purchase order
Method close Closes the purchase order
Method cancel Cancels the purchase order
Method receive_item Undocumented
Method increase_quantity_received Undocumented
Method get_status_str Undocumented
Method get_freight_type_name Undocumented
Method get_branch_name Undocumented
Method get_supplier_name Undocumented
Method get_transporter_name Undocumented
Method get_order_number_str Undocumented
Method get_purchase_subtotal Get the subtotal of the purchase.
Method get_purchase_total Undocumented
Method get_received_total Like {get_purchase_subtotal} but only takes into account the
Method get_remaining_total The total value to be paid for the items not received yet
Method get_pending_items Returns a sequence of all items which we haven't received yet.
Method get_partially_received_items Returns a sequence of all items which are partially received.
Method get_open_date_as_string Undocumented
Method get_quote_deadline_as_string Undocumented
Method get_receiving_orders Returns all ReceivingOrder related to this purchase order
Class Method translate_status Undocumented

Inherited from ValidatableDomain:

Method set_valid Undocumented
Method set_invalid Undocumented
Method get_valid Undocumented
Class Method select Undocumented
Class Method selectBy Undocumented
Class Method selectOne Undocumented
Class Method selectOneBy Undocumented

Inherited from Domain (via ValidatableDomain):

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 ValidatableDomain, 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 ValidatableDomain, Domain):

Class Method registerFacet Registers a facet for class cls.

Inherited from Adaptable (via ValidatableDomain, 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 get_items(self):
Undocumented
@argcheck(PurchaseItem)
def remove_item(self, item):
Undocumented
def add_item(self, sellable, quantity=Decimal(1)):
Undocumented
def _set_discount_by_percentage(self, value):
Sets a discount by percentage. Note that percentage must be added as an absolute value not as a factor like 1.05 = 5 % of surcharge The correct form is 'percentage = 3' for a discount of 3 %
def _get_discount_by_percentage(self):
Undocumented
def _set_surcharge_by_percentage(self, value):
Sets a surcharge by percentage. Note that surcharge must be added as an absolute value not as a factor like 0.97 = 3 % of discount. The correct form is 'percentage = 3' for a surcharge of 3 %
def _get_surcharge_by_percentage(self):
Undocumented
@property
def order_number(self):
Undocumented
@property
def payments(self):
Undocumented
def _get_percentage_value(self, percentage):
Undocumented
def is_paid(self):
Undocumented
def can_cancel(self):
Find out if it's possible to cancel the order
ReturnsTrue if it's possible to cancel the order, otherwise False
def can_close(self):
Find out if it's possible to close the order
ReturnsTrue if it's possible to close the order, otherwise False
def confirm(self, confirm_date=None):
Confirms the purchase order
Parametersconfirm_dataoptional, datetime
def close(self):
Closes the purchase order
def cancel(self):
Cancels the purchase order
def receive_item(self, item, quantity_to_receive):
Undocumented
def increase_quantity_received(self, purchase_item, quantity_received):
Undocumented
def get_status_str(self):
Undocumented
def get_freight_type_name(self):
Undocumented
def get_branch_name(self):
Undocumented
def get_supplier_name(self):
Undocumented
def get_transporter_name(self):
Undocumented
def get_order_number_str(self):
Undocumented
def get_purchase_subtotal(self):
Get the subtotal of the purchase. The sum of all the items cost * items quantity
def get_purchase_total(self):
Undocumented
def get_received_total(self):
Like {get_purchase_subtotal} but only takes into account the received items
def get_remaining_total(self):
The total value to be paid for the items not received yet
def get_pending_items(self):
Returns a sequence of all items which we haven't received yet.
def get_partially_received_items(self):
Returns a sequence of all items which are partially received.
def get_open_date_as_string(self):
Undocumented
def get_quote_deadline_as_string(self):
Undocumented
def get_receiving_orders(self):
Returns all ReceivingOrder related to this purchase order
@classmethod
def translate_status(cls, status):
Undocumented
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.