wizards Package¶
wizards
Package¶
abstractwizard
Module¶
Abstract wizard and wizard steps definition
Note that a good aproach for all wizards steps defined here is do not require some specific implementation details for the main wizard. Use instead signals and interfaces for that.
-
class
stoqlib.gui.wizards.abstractwizard.
SellableItemSlave
(store, parent, model=None, visual_mode=None)[source]¶ Bases:
stoqlib.gui.editors.baseeditor.BaseEditorSlave
A slave for selecting sellable items.
It defines the following:
- barcode entry
- quantity spinbutton
- cost entry
- add button
- find product button
- sellable objectlist
Optionally buttons to modify the list
- Add
- Remove
- Edit
Subclasses should define a sellable_view property and a get_sellable_view_query, both used to define what sellables can be added to the step.
The view used should have the following properties:
- barcode
- description
- category_description
and should also provide an acessor that returns the sellable object.
-
gladefile
= 'SellableItemSlave'¶
-
proxy_widgets
= ('quantity', 'unit_label', 'cost', 'minimum_quantity', 'stock_quantity', 'sellable_description')¶
-
summary_label_text
= None¶
-
summary_label_column
= 'total'¶
-
value_column
= 'cost'¶
-
sellable_view
¶ alias of
ProductFullStockItemView
-
sellable_editable
= False¶
-
validate_stock
= False¶
-
validate_price
= False¶ If we should also validate the price of the sellable. (checking if it is respecting the rules of discount
-
cost_editable
= True¶
-
item_editor
= None¶
-
batch_selection_dialog
= None¶
-
sellable_search
¶ the sellable search class used to select a sellable to add on the list
alias of
SellableSearch
-
allow_no_batch
= False¶ if we should allow to add an item without available batches (no stock). Can happen when selecting a product that control batches for decrease, in that case,
get_order_item()
will receive batch=None
-
calculator_mode
= None¶ the mode to pass to the
stoqlib.gui.widgets.calculator.CalculatorPopup
. IfNone
, the calculator will not be attached
-
add_sellable_on_barcode_activate
= False¶ If we should add the sellable on the list when activating the barcode. This is useful when the barcode is supposed to work with barcode readers. Note that, if the sellable with the given barcode wasn’t found, it’ll just be cleared and no error message will be displayed
-
stock_labels_visible
= True¶ If we should make visible a label showing the stock and the minimum quantity of a sellable when one is selected. Note that sellables without storables (e.g. services) won’t have them shown anyway
-
add_sellable
(sellable, parent=None)[source]¶ Add a sellable to the current step
This will call step.get_order_item to create the correct item for the current model, and this created item will be returned.
-
remove_items
(items)[source]¶ Remove items from the current
IContainer
.Subclasses can override this if special logic is necessary.
Hides the add button
Hides the del button
Hides the edit button
-
get_quantity
()[source]¶ Returns the quantity of the current model or 1 if there is no model :returns: the quantity
-
get_model_item_by_sellable
(sellable)[source]¶ Returns a model instance by the given sellable. :returns: a model instance or None if we could not find the model.
-
get_remaining_quantity
(sellable, batch=None)[source]¶ Returns the remaining quantity in stock for the given sellable
This will check the remaining quantity in stock taking the items on the list in consideration. This is very useful since these items still haven’t decreased stock.
Parameters: Returns: the remaining quantity or
None
if the sellable doesn’t control stock (e.g. a service)
-
get_sellable_view_query
()[source]¶ This method should return a tuple containing the viewable that should be used and a query that should filter the sellables that can and cannot be added to this step.
-
get_order_item
(sellable, value, quantity, batch=None, parent=None)[source]¶ Adds the sellable to the current model
This method is called when the user added the sellable in the wizard step. Subclasses should implement this method to add the sellable to the current model.
Parameters: - sellable – the selected
sellable
- value – the value selected for the sellable
- quantity – the quantity selected for the sellable
- batch – the batch that was selected for the sellable.
Note that this argument will only be passed if
batch_selection_dialog
is defined.
- sellable – the selected
-
can_add_sellable
(sellable)[source]¶ Whether we can add a sellable to the list or not
This is a hook method that gets called when trying to add a sellable to the list. It can be rewritten on child classes for extra functionality :param sellable: the selected sellable :returns: True or False (True by default)
-
get_sellable_model
(sellable, batch=None)[source]¶ Create a Settable containing multiple information to be used on the slave.
Parameters: sellable – a sellable
we are adding to wizardReturns: a Settable containing some information of the item
-
sellable_selected
(sellable, batch=None)[source]¶ This will be called when a sellable is selected in the combo. It can be overriden in a subclass if they wish to do additional logic at that point
Parameters:
-
get_batch_items
()[source]¶ Get batch items for sellables inside this slave
Returns: a dict mapping the batch to it’s quantity
-
get_batch_order_items
(sellable, value, quantity)[source]¶ Get order items for sellable considering it’s
batches
By default, this will run
batch_selection_dialog
to get the batches and their quantities and then callget_order_item()
on each one.Parameters: - sellable – a
sellable
- value – the value (e.g. price, cost) of the sellable
- quantity – the quantity of the sellable
- sellable – a
-
get_extra_discount
(sellable)[source]¶ Called to get an extra discount for the sellable being added
Subclasses can implement this to allow some extra discount for the sellable being added. For example, one can implement this to allow some extra discount based on the unused discount on the already added items
Note that, if you need to get the manager to check for max discount, you can use
manager
Parameters: sellable – the sellable being added Returns: the extra discount for the sellable being added, or None
if not extra discount should be allowed
-
get_sellable_search_extra_kwargs
()[source]¶ Called to get extra args for
sellable_search
A subclass can override this and return a dict with extra keywords to pass to the sellable search defined on the class.
Returns: a dict
of extra keywords
-
class
stoqlib.gui.wizards.abstractwizard.
SellableItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemSlave
,stoqlib.gui.base.wizards.WizardStep
-
model_type
= None¶
-
consignmentwizard
Module¶
Consignment wizard definition
-
class
stoqlib.gui.wizards.consignmentwizard.
ConsignmentItemStep
(wizard, previous, store, model)[source]¶
-
class
stoqlib.gui.wizards.consignmentwizard.
ConsignmentSelectionStep
(wizard, store)[source]¶ Bases:
stoqlib.gui.wizards.receivingwizard.PurchaseSelectionStep
-
class
stoqlib.gui.wizards.consignmentwizard.
ConsignmentItemSelectionStep
(wizard, previous, store, consignment)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'ConsignmentItemSelectionStep'¶
-
-
class
stoqlib.gui.wizards.consignmentwizard.
CloseConsignmentPaymentStep
(wizard, previous, store, consignment, outstanding_value=Decimal('0'))[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
slave_holder
= 'place_holder'¶
-
-
class
stoqlib.gui.wizards.consignmentwizard.
ConsignmentWizard
(store, model=None)[source]¶ Bases:
stoqlib.gui.wizards.purchasewizard.PurchaseWizard
-
title
= 'New Consignment'¶
-
help_section
= None¶
-
inventorywizard
Module¶
-
class
stoqlib.gui.wizards.inventorywizard.
InventoryCountTypeStep
(store, wizard, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
Step responsible for defining the type of the count
A simple step that will present 2 radiobutton options for the user to choose between an assisted count and a manual count.
-
gladefile
= 'InventoryCountTypeStep'¶
-
-
class
stoqlib.gui.wizards.inventorywizard.
InventoryCountItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
Step responsible for the real products counting
This step will behave different, depending on the
InventoryCountTypeStep
‘s choice. For example:- If we choose to do a manual counting, all items will be populated and the user will be able to inform the quantity of each one
- If we choose to do an assisted counting, no items will be populated (with the exception of the ones already counted before) and the user will be able to add items as it scans the barcode.
Note that on the assisted count, pressing enter on the barcode will add the item on the list and not focus the quantity entry. That’s done to make it easier for counting items using a barcode scanner.
-
model_type
¶ alias of
Inventory
-
item_table
¶ alias of
_TemporaryInventoryItem
-
summary_label_text
= u'<b>Total quantity:</b>'¶
-
summary_label_column
= 'quantity'¶
-
sellable_editable
= False¶
-
stock_labels_visible
= False¶
-
batch_selection_dialog
¶ alias of
_InventoryBatchSelectionDialog
-
add_sellable_on_barcode_activate
= True¶
loanwizard
Module¶
Loan wizard
-
class
stoqlib.gui.wizards.loanwizard.
StartNewLoanStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'SalesPersonStep'¶
-
model_type
¶ alias of
Loan
-
proxy_widgets
= ['client', 'salesperson', 'expire_date', 'client_category']¶
-
-
class
stoqlib.gui.wizards.loanwizard.
LoanItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.salequotewizard.SaleQuoteItemStep
Wizard step for loan items selection
-
change_remove_btn_sensitive
= False¶
-
model_type
¶ alias of
Loan
-
item_table
¶ alias of
LoanItem
-
sellable_view
¶ alias of
ProductWithStockBranchView
-
item_editor
¶ alias of
LoanItemEditor
-
validate_stock
= True¶
-
batch_selection_dialog
¶ alias of
BatchDecreaseSelectionDialog
-
-
class
stoqlib.gui.wizards.loanwizard.
LoanSelectionStep
(wizard, store)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
-
class
stoqlib.gui.wizards.loanwizard.
LoanItemSelectionStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
-
model_type
¶ alias of
list
-
item_table
¶ alias of
LoanItem
-
cost_editable
= False¶
-
summary_label_column
= None¶
-
-
class
stoqlib.gui.wizards.loanwizard.
NewLoanWizard
(store, model=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (775, 400)¶
-
help_section
= 'loan'¶
-
-
class
stoqlib.gui.wizards.loanwizard.
CloseLoanWizard
(store, create_sale=True, require_sale_items=False)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (775, 400)¶
-
title
= u'Close Loan Wizard'¶
-
help_section
= 'loan'¶
-
personwizard
Module¶
Person role wizards definition
-
class
stoqlib.gui.wizards.personwizard.
RoleEditorStep
(wizard, store, previous, role_type, person=None, document=None, description=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
-
class
stoqlib.gui.wizards.personwizard.
PersonRoleTypeStep
(wizard, store, document=None, description=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'PersonRoleTypeStep'¶
-
model_type
¶ alias of
Settable
-
-
class
stoqlib.gui.wizards.personwizard.
PersonRoleWizard
(store, role_editor, document=None, description=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (650, 450)¶
-
productionwizard
Module¶
Production wizard definition
-
class
stoqlib.gui.wizards.productionwizard.
OpenProductionOrderStep
(store, wizard, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'OpenProductionOrderStep'¶
-
model_type
¶ alias of
ProductionOrder
-
proxy_widgets
= ['open_date', 'expected_start_date', 'identifier', 'branch', 'responsible', 'description']¶
-
-
class
stoqlib.gui.wizards.productionwizard.
ProductionServiceStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
-
model_type
¶ alias of
ProductionOrder
-
item_table
¶ alias of
ProductionService
-
summary_label_text
= u'<b>Total:</b>'¶
-
summary_label_column
= 'quantity'¶
-
sellable_view
¶ alias of
ServiceView
-
item_editor
¶ alias of
ProductionServiceEditor
-
-
class
stoqlib.gui.wizards.productionwizard.
ProductionItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
Wizard step for production items selection
-
model_type
¶ alias of
ProductionOrder
-
item_table
¶ alias of
ProductionItem
-
summary_label_text
= u'<b>Total:</b>'¶
-
summary_label_column
= 'quantity'¶
-
sellable_view
¶ alias of
ProductComponentView
-
item_editor
¶ alias of
ProductionItemEditor
-
productwizard
Module¶
-
class
stoqlib.gui.wizards.productwizard.
ProductTypeStep
(store, wizard, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'ProductTypeStep'¶
-
-
class
stoqlib.gui.wizards.productwizard.
ProductAttributeEditorStep
(store, wizard, previous)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
-
class
stoqlib.gui.wizards.productwizard.
ProductEditorStep
(store, wizard, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
-
class
stoqlib.gui.wizards.productwizard.
ProductCreateWizard
(store, *args, **kwargs)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (800, 450)¶
-
title
= 'Product creation wizard'¶
-
help_section
= 'product-new'¶
-
need_cancel_confirmation
= True¶
-
classmethod
run_wizard
(parent)[source]¶ Run the wizard to create a product
This will run the wizard and after finishing, ask if the user wants to create another product alike. The product will be cloned and stoqlib.gui.editors.producteditor.ProductEditor will run as long as the user chooses to create one alike
-
purchasefinishwizard
Module¶
Purchase Finish Wizard
-
class
stoqlib.gui.wizards.purchasefinishwizard.
PurchaseFinishProductListStep
(store, wizard, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'PurchaseFinishProductListStep'¶
-
model_type
¶ alias of
Settable
-
proxy_widgets
= ()¶
-
-
class
stoqlib.gui.wizards.purchasefinishwizard.
PurchaseFinishPaymentAdjustStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'PurchaseFinishPaymentAdjustStep'¶
-
model_type
¶ alias of
Settable
-
proxy_widgets
= ('received_value', 'paid_value', 'missing_value')¶
-
-
class
stoqlib.gui.wizards.purchasefinishwizard.
PurchaseFinishPaymentStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.purchasewizard.PurchasePaymentStep
-
class
stoqlib.gui.wizards.purchasefinishwizard.
PurchaseFinishWizard
(store, purchase)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (775, 400)¶
-
title
= 'Purchase Finish'¶
-
purchasequotewizard
Module¶
Purchase quote wizard definition
-
class
stoqlib.gui.wizards.purchasequotewizard.
StartQuoteStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'StartQuoteStep'¶
-
model_type
¶ alias of
PurchaseOrder
-
proxy_widgets
= ['open_date', 'quote_deadline', 'branch_combo', 'notes']¶
-
-
class
stoqlib.gui.wizards.purchasequotewizard.
QuoteItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.purchasewizard.PurchaseItemStep
-
item_editor
¶ alias of
PurchaseQuoteItemEditor
-
-
class
stoqlib.gui.wizards.purchasequotewizard.
QuoteSupplierStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'QuoteSupplierStep'¶
-
model_type
¶ alias of
PurchaseOrder
-
product_columns
= [<Column: {'_property_helper_attribute': 'description', '_property_helper_expand': True, '_objectlist': None, '_data_type': <type 'str'>, '_property_helper_ellipsize': <enum PANGO_ELLIPSIZE_END of type PangoEllipsizeMode>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Product'}>]¶
-
-
class
stoqlib.gui.wizards.purchasequotewizard.
QuoteGroupSelectionStep
(wizard, store)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'QuoteGroupSelectionStep'¶
-
-
class
stoqlib.gui.wizards.purchasequotewizard.
QuoteGroupItemsSelectionStep
(wizard, store, group, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'QuoteGroupItemsSelectionStep'¶
-
-
class
stoqlib.gui.wizards.purchasequotewizard.
QuotePurchaseWizard
(store, model=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (775, 400)¶
-
purchasewizard
Module¶
Purchase wizard definition
-
class
stoqlib.gui.wizards.purchasewizard.
StartPurchaseStep
(wizard, store, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'StartPurchaseStep'¶
-
model_type
¶ alias of
PurchaseOrder
-
proxy_widgets
= ['open_date', 'identifier', 'supplier', 'branch', 'expected_freight']¶
-
-
class
stoqlib.gui.wizards.purchasewizard.
PurchaseItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
Wizard step for purchase order’s items selection
-
model_type
¶ alias of
PurchaseOrder
-
item_table
¶ alias of
PurchaseItem
-
summary_label_text
= u'<b>Total Ordered:</b>'¶
-
sellable_editable
= True¶
-
item_editor
¶ alias of
PurchaseItemEditor
-
sellable_search
¶ alias of
PurchaseSellableSearch
-
-
class
stoqlib.gui.wizards.purchasewizard.
PurchasePaymentStep
(wizard, previous, store, model, outstanding_value=<currency $0>)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'PurchasePaymentStep'¶
-
model_type
¶ alias of
PaymentGroup
-
-
class
stoqlib.gui.wizards.purchasewizard.
FinishPurchaseStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'FinishPurchaseStep'¶
-
model_type
¶ alias of
PurchaseOrder
-
proxy_widgets
= ('salesperson_name', 'expected_receival_date', 'transporter', 'notes')¶
-
receivingwizard
Module¶
Receiving wizard definition
-
class
stoqlib.gui.wizards.receivingwizard.
PurchaseSelectionStep
(wizard, store)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'PurchaseSelectionStep'¶
-
-
class
stoqlib.gui.wizards.receivingwizard.
ReceivingOrderItemStep
(store, wizard, previous_step, purchases)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'ReceivingOrderItemStep'¶
-
model_type
¶ alias of
ReceivingOrder
-
-
class
stoqlib.gui.wizards.receivingwizard.
ReceivingInvoiceStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'HolderTemplate'¶
-
model_type
¶ alias of
ReceivingOrder
-
renegotiationwizard
Module¶
Payments Renegotiation Wizard
-
class
stoqlib.gui.wizards.renegotiationwizard.
PaymentRenegotiationPaymentListStep
(store, wizard, model, groups)[source]¶ Bases:
stoqlib.gui.wizards.salewizard.BaseMethodSelectionStep
,stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'PaymentRenegotiationPaymentListStep'¶
-
model_type
¶ alias of
PaymentRenegotiation
-
proxy_widgets
= ('surcharge_value', 'discount_value', 'total')¶
-
-
class
stoqlib.gui.wizards.renegotiationwizard.
PaymentRenegotiationWizard
(store, groups)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (550, 400)¶
-
title
= 'Payments Renegotiation Wizard'¶
-
salequotewizard
Module¶
Sale quote wizard
-
class
stoqlib.gui.wizards.salequotewizard.
StartSaleQuoteStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'SalesPersonQuoteWizardStep'¶
-
model_type
¶ alias of
Sale
-
sale_widgets
= ['client', 'salesperson', 'expire_date', 'client_category']¶
-
invoice_widgets
= ['operation_nature']¶
-
cfop_widgets
= ['cfop']¶
-
proxy_widgets
= ['client', 'salesperson', 'expire_date', 'client_category', 'operation_nature', 'cfop']¶
-
-
class
stoqlib.gui.wizards.salequotewizard.
SaleQuoteItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
Wizard step for purchase order’s items selection
-
change_remove_btn_sensitive
= True¶
-
model_type
¶ alias of
Sale
-
item_table
¶ alias of
SaleItem
-
summary_label_text
= u'<b>Total Ordered:</b>'¶
-
sellable
= None¶
-
sellable_view
¶ alias of
SellableFullStockView
-
item_editor
¶ alias of
SaleQuoteItemEditor
-
validate_price
= True¶
-
value_column
= 'price'¶
-
calculator_mode
= 1¶
-
get_order_item
(sellable, price, quantity, batch=None, parent=None)[source]¶ Parameters: - sellable – the
sellable
- price – the price the sellable is being sold
- quantity – the quantity for that is being sold
- batch – the |storable_batch| if exists
- parent – |sale_item|‘s parent_item if exists
- sellable – the
-
-
class
stoqlib.gui.wizards.salequotewizard.
SaleQuotePaymentStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
A step for creating payments for a
sale
All this step does is to attach
stoqlib.gui.slaves.paymentslave.MultipleMethodSlave
, so see it for more information-
gladefile
= 'HolderTemplate'¶
-
model_type
¶ alias of
Sale
-
-
class
stoqlib.gui.wizards.salequotewizard.
SaleQuoteWizard
(store, model=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
-
size
= (775, 400)¶
-
help_section
= 'sale-quote'¶
-
need_cancel_confirmation
= True¶
-
salereturnwizard
Module¶
Sale return wizards definition
-
class
stoqlib.gui.wizards.salereturnwizard.
SaleReturnSelectionStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'SaleReturnSelectionStep'¶
-
model_type
¶ alias of
object
-
-
class
stoqlib.gui.wizards.salereturnwizard.
SaleReturnItemsStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
-
model_type
¶ alias of
ReturnedSale
-
item_table
¶ alias of
ReturnedSaleItem
-
cost_editable
= False¶
-
summary_label_text
= u'<b>Total to return:</b>'¶
-
batch_selection_dialog
¶ alias of
BatchIncreaseSelectionDialog
-
stock_labels_visible
= False¶
-
-
class
stoqlib.gui.wizards.salereturnwizard.
SaleReturnInvoiceStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'SaleReturnInvoiceStep'¶
-
model_type
¶ alias of
ReturnedSale
-
proxy_widgets
= ['responsible', 'reason', 'sale_total', 'paid_total', 'returned_total', 'total_amount_abs']¶
-
-
class
stoqlib.gui.wizards.salereturnwizard.
SaleReturnPaymentStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'HolderTemplate'¶
-
model_type
¶ alias of
ReturnedSale
-
salewizard
Module¶
Sale wizard definition
-
class
stoqlib.gui.wizards.salewizard.
PaymentMethodStep
(wizard, previous, store, model, method, outstanding_value=None, finish_on_total=True)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
-
gladefile
= 'HolderTemplate'¶
-
slave_holder
= 'place_holder'¶
-
-
class
stoqlib.gui.wizards.salewizard.
BaseMethodSelectionStep
[source]¶ Bases:
object
Base class for method selection when doing client sales
Classes using this base class should have a select_method_holder EventBox and a cash_change_holder EventBox in the glade file
-
class
stoqlib.gui.wizards.salewizard.
ConfirmSaleBatchStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
Step for selecting
batches
for sale itemsBefore going to
SalesPersonStep
, if a product is controlling batch and that information is not available (probably because the sale is quoted) this step will set it for you.Note that each item can produce n items, n being the number of batches used for it. All of those items will be already on the sale and adjusted properly, tough.
-
gladefile
= 'ConfirmSaleBatchStep'¶
-
model_type
¶ alias of
Sale
-
-
class
stoqlib.gui.wizards.salewizard.
SalesPersonStep
(wizard, store, model, payment_group, previous=None)[source]¶ Bases:
stoqlib.gui.wizards.salewizard.BaseMethodSelectionStep
,stoqlib.gui.base.wizards.WizardEditorStep
An abstract step which allows to define a salesperson, the sale’s discount and surcharge, when it is needed.
-
gladefile
= 'SalesPersonStep'¶
-
model_type
¶ alias of
Sale
-
proxy_widgets
= ['salesperson', 'client', 'transporter', 'cost_center']¶
-
cfop_widgets
= ('cfop',)¶
-
-
class
stoqlib.gui.wizards.salewizard.
ConfirmSaleWizard
(store, model, subtotal, total_paid=0, current_document=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
A wizard used when confirming a sale order. It means generate payments, fiscal data and update stock
-
size
= (700, 400)¶
-
title
= 'Sale Checkout'¶
-
help_section
= 'sale-confirm'¶
-
get_subtotal
()[source]¶ Fetch the sale subtotal without querying the database. The subtotal is the value of all items that are being sold
Returns: the subtotal of the current sale
-
get_total_amount
()[source]¶ Fetch the total sale amount without querying the database. The total sale amount is the subtotal with discount and markups taken into account.
Returns: the total amount of the current sale
-
get_total_paid
()[source]¶ Fetch the value already paid for this sale. This is only used when we return a project we already paid for.
Returns: the total paid value for the current sale
-
stockdecreasewizard
Module¶
Stock Decrease wizard definition
-
class
stoqlib.gui.wizards.stockdecreasewizard.
StartStockDecreaseStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'StartStockDecreaseStep'¶
-
model_type
¶ alias of
StockDecrease
-
proxy_widgets
= ['confirm_date', 'branch', 'reason', 'removed_by', 'cfop', 'cost_center', 'person']¶
-
-
class
stoqlib.gui.wizards.stockdecreasewizard.
DecreaseItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
Wizard step for purchase order’s items selection
-
model_type
¶ alias of
StockDecrease
-
item_table
¶ alias of
StockDecreaseItem
-
sellable_view
¶ alias of
ProductWithStockBranchView
-
summary_label_text
= u'<b>Total quantity:</b>'¶
-
summary_label_column
= 'quantity'¶
-
sellable_editable
= False¶
-
validate_stock
= True¶
-
batch_selection_dialog
¶ alias of
BatchDecreaseSelectionDialog
-
item_editor
¶ alias of
StockDecreaseItemEditor
-
stocktransferwizard
Module¶
Stock transfer wizard definition
-
class
stoqlib.gui.wizards.stocktransferwizard.
StockTransferInitialStep
(wizard, store, model)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
-
gladefile
= 'StockTransferInitialStep'¶
-
model_type
¶ alias of
TransferOrder
-
proxy_widgets
= ['open_date', 'destination_branch', 'source_responsible', 'comments']¶
-
-
class
stoqlib.gui.wizards.stocktransferwizard.
StockTransferItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.abstractwizard.SellableItemStep
-
model_type
¶ alias of
TransferOrder
-
item_table
¶ alias of
TransferOrderItem
-
sellable_view
¶ alias of
ProductWithStockBranchView
-
batch_selection_dialog
¶ alias of
BatchDecreaseSelectionDialog
-
validate_stock
= True¶
-
item_editor
¶ alias of
TransferItemEditor
-
cost_editable
= False¶
-
workorderpackagewizard
Module¶
-
class
stoqlib.gui.wizards.workorderpackagewizard.
WorkOrderPackageReceiveSelectionStep
(store, wizard, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
Step responsible for selecting a
work order package
to receive-
gladefile
= 'WorkOrderPackageReceiveSelectionStep'¶
-
-
class
stoqlib.gui.wizards.workorderpackagewizard.
WorkOrderPackageReceiveOrdersStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.base.wizards.WizardEditorStep
Used to show what
work orders
are inside thework order package
Right now this step doesn’t do much. It’ll show all orders inside the package that are going to be received together with it.
-
model_type
¶ alias of
WorkOrderPackage
-
gladefile
= 'WorkOrderPackageReceiveOrdersStep'¶
-
proxy_widgets
= ['identifier']¶
-
-
class
stoqlib.gui.wizards.workorderpackagewizard.
WorkOrderPackageReceiveWizard
(store)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizard
Wizard responsible for receiving
work order packages
This will mark the selected package as received on finish
-
title
= u'Receive work orders'¶
-
size
= (800, 350)¶
-
workorderquotewizard
Module¶
Wizard for work order pre-sales
-
class
stoqlib.gui.wizards.workorderquotewizard.
WorkOrderQuoteStartStep
(store, wizard, model=None, previous=None)[source]¶ Bases:
stoqlib.gui.wizards.salequotewizard.StartSaleQuoteStep
First step for work order pre-sales
Just like
stoqlib.gui.wizards.salequotewizard.StartSaleQuoteStep
, but the work order category can be selected on it and the next step isWorkOrderStep
-
gladefile
= 'WorkOrderQuoteStartStep'¶
-
model_type
¶ alias of
Sale
-
-
class
stoqlib.gui.wizards.workorderquotewizard.
WorkOrderQuoteWorkOrderStep
(store, wizard, previous, model)[source]¶ Bases:
stoqlib.gui.base.wizards.BaseWizardStep
Second step for work order pre-sales
In this step, the sales person can/will create the workorder(s) required for this sale (one for each spectacles)
-
gladefile
= 'WorkOrderQuoteWorkOrderStep'¶
-
get_work_order_slave
(work_order)[source]¶ Get a slave for the
work order
This is the slave that will be added for each created work order. Subclasses can override this to change it.
-
-
class
stoqlib.gui.wizards.workorderquotewizard.
WorkOrderQuoteItemStep
(wizard, previous, store, model)[source]¶ Bases:
stoqlib.gui.wizards.salequotewizard.SaleQuoteItemStep
Third step for work order pre-sales
Just like
stoqlib.gui.wizards.salequotewizard.SaleQuoteItemStep
, but each item added here will be added to a workorder too (selected on a combo).-
get_extra_columns
()[source]¶ Get some extra columns for the items list
Subclasses can override this and add some extra columns. Those columns will be added just after the ‘description’ and before the ‘quantity’ columns.
-
setup_work_order
(work_order)[source]¶ Do some extra setup for the work order
This is called at the initialization of this step. Subclasses can override this to do any extra setup they need on the work order.
Parameters: work_order – the work order
we are describing
-
-
class
stoqlib.gui.wizards.workorderquotewizard.
WorkOrderQuoteWizard
(store, model=None)[source]¶ Bases:
stoqlib.gui.wizards.salequotewizard.SaleQuoteWizard
Wizard for work order pre-sales
This is similar to the regular pre-sale, but has an additional step to create some workorders, and the item step is changed a little bit, to allow the sales person to select in what work order the item should be added to.