dialogs Package

dialogs Package

addressdialog Module

class stoqlib.gui.dialogs.addressdialog.AddressAdditionDialog(store, person, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _AddressAdditionListSlave

title = 'Additional Addresses'
size = (600, 250)

batchselectiondialog Module

class stoqlib.gui.dialogs.batchselectiondialog.BatchSelectionDialog(store, model, quantity, original_batches=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

A dialog for selecting batch quantities

This editor will help to generate quantities for batches given a storable. By default, it will add an entry and a spin button to select the batch and it’s quantity. That spin button will be pre-filled with quantity passed in from the dialog constructor so you can just fill the batch and confirm the dialog.

But as soon as you fill a valid batch, a new entry and spin button will be appended below the last ones, so you can add more quantities to/from another batch.

When confirming, a dict will be returned mapping the batch to it’s quantity. Note that *batch’ there can be a text (containing the batch number) or an object (containing the batch in question). That will depend on the editor (see BatchIncreaseSelectionDialog and BatchDecreaseSelectionDialog for more information).

validate_max_quantity = False

if we should validate the quantity and treat is as a maximum quantity. If True, the sum of all quantities on spin buttons cannot be greater than the quantity passed in from the dialog constructor for the dialog to be confirmed. If False, it will have no limit.

show_existing_batches_list = True

If we should show a list displaying the existing batches. It’s used to make easier to check for batch’s stock, creation date, etc

confirm_dialog_on_entry_activate = False

If True, activating an entry (e.g. pressing Enter) will confirm the dialog. If False, the default behaviour will happen that is to set focus on the spinbutton (and that spinbutton is always set to confirm the dialog on activation)

allow_no_quantity = False

If we should allow to indicate a batch with a quantity of 0. The default is False which will always set a quantity of 0 as invalid

size = (600, 400)
title = 'Batch selection'
gladefile = 'BatchSelectionDialog'
model_type

alias of Storable

proxy_widgets = ['description']
get_entry_by_spin(spin)[source]

Gets an entry given a spin

This will return the entry that makes a pair with the spin on the dialog

Returns:a kiwi.ui.widgets.ProxyEntry
get_spin_by_entry(entry)[source]

Gets a spin given an entry

This will return the spin that makes a pair with the entry on the dialog

Returns:a kiwi.ui.widgets.ProxyEntry
get_batch_item(batch)[source]

A hook called to get the batch item for the given batch

By default, it will return the batch itself. Subclasses can override this if they are working with other type of items on the entries (e.g. the batch number as a string)

Parameters:batch – the batch
Returns:the batch item that will be used to update the entry’s value
setup_entry(entry)[source]

A hook called every time a new entry is appended on the dialog

Subclasses can override this if they want to do some extra setup on the entry (for example, setting a completion).

Parameters:entry – the kiwi.ui.widgets.ProxyEntry
setup_spin(entry)[source]

A hook called every time a new spin button is appended on the dialog

Subclasses can override this if they want to do some extra setup on the spin button.

Parameters:entry – the kiwi.ui.widgets.ProxySpinButton
validate_entry(entry)[source]

A hook called to validate entry

This should return kiwi.datatypes.ValidationError if the entry is not valid.

Subclasses can override this.

Parameters:entry – the kiwi.ui.widgets.ProxyEntry
validate_spin(spin)[source]

A hook called to validate spin

This should return kiwi.datatypes.ValidationError if the spin is not valid.

Subclasses can override this.

Parameters:spin – the kiwi.ui.widgets.ProxySpinButton
validate_confirm()[source]
setup_proxies()[source]
on_confirm()[source]
on_existing_batches__row_activated(existing_batches, item)[source]
class stoqlib.gui.dialogs.batchselectiondialog.BatchDecreaseSelectionDialog(store, model, quantity, original_batches=None, decreased_batches=None)[source]

Bases: stoqlib.gui.dialogs.batchselectiondialog.BatchSelectionDialog

Batch selection for storable decreases

This is the same as BatchSelectionDialog, but since the quantity selected here is going to be decreased, it will be validated for each batch (so no batch is allowed to have more quantity than the available in stock)

Also, the batch key on the returned dict will be a batch.

setup_proxies()[source]
setup_entry(entry)[source]
validate_entry(entry)[source]
validate_spin(spin)[source]
class stoqlib.gui.dialogs.batchselectiondialog.BatchIncreaseSelectionDialog(store, model, quantity, original_batches=None)[source]

Bases: stoqlib.gui.dialogs.batchselectiondialog.BatchSelectionDialog

Batch selection for storable increases

This is the same as BatchSelectionDialog, but since the quantity selected here is going to be increased there’s no limit for quantities in each batch (unless specified by the max_quantity param)

Also, the batch key on the returned dict will be a string object, containing the batch number.

validate_max_quantity = True
on_confirm()[source]
get_batch_item(batch)[source]
validate_entry(entry)[source]

branchdialog Module

class stoqlib.gui.dialogs.branchdialog.BranchDialog(store, model=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Register new branch after creating a database.

This dialog is only used after the database is created.

gladefile = 'BranchDialog'
person_widgets = ('name', 'phone_number', 'fax_number')
company_widgets = ('cnpj', 'state_registry')
proxy_widgets = ('name', 'phone_number', 'fax_number', 'cnpj', 'state_registry')
model_type

alias of Person

setup_proxies()[source]
on_confirm()[source]
on_cnpj__validate(widget, value)[source]
stoqlib.gui.dialogs.branchdialog.test()[source]

certificatedialog Module

class stoqlib.gui.dialogs.certificatedialog.CertificatePasswordDialog(cert_name, retry=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

size = (-1, -1)
model_type

alias of PasswordObfuscator

gladefile = 'CertificatePasswordDialog'
model_name = 'Certificate Password'
proxy_widgets = ['password']
create_model(store)[source]
setup_proxies()[source]
cancel()[source]
class stoqlib.gui.dialogs.certificatedialog.CertificateChooserDialog(certs, last_used)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

size = (-1, -1)
model_type

alias of Settable

gladefile = 'CertificateChooserDialog'
model_name = 'Certificate Chooser'
proxy_widgets = ['cert']
create_model(store)[source]
setup_proxies()[source]
class stoqlib.gui.dialogs.certificatedialog.CertificateListSlave(*args, **kwargs)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

editor_class

alias of CertificateEditor

model_type

alias of Certificate

columns = [<Column: {'_objectlist': None, '_property_helper_attribute': 'active', '_data_type': <type 'bool'>, 'from_string': <bound method _BoolConverter.from_string of <kiwi.datatypes._BoolConverter object at 0x7f2cd15b6ad0>>, '_property_helper_justify': <enum GTK_JUSTIFY_CENTER of type GtkJustification>, '_property_helper_title': 'Active'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'type_str', '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Type'}>, <Column: {'_property_helper_attribute': 'name', '_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': 'Certificate'}>]
class stoqlib.gui.dialogs.certificatedialog.CertificateListDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of CertificateListSlave

title = 'Certificates'
size = (500, 300)

clientcategorydialog Module

Dialog for listing client categories

class stoqlib.gui.dialogs.clientcategorydialog.ClientCategoryListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

editor_class

alias of ClientCategoryEditor

model_type

alias of ClientCategory

columns = [<Column: {'_property_helper_attribute': 'name', '_property_helper_expand': True, '_objectlist': None, '_property_helper_sorted': True, '_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': 'Category'}>, <Column: {'_property_helper_attribute': 'max_discount', '_property_helper_expand': True, '_property_helper_format_func': <function get_formatted_percentage at 0x7f2cd1639c80>, '_objectlist': None, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_data_type': <class 'decimal.Decimal'>, '_property_helper_ellipsize': <enum PANGO_ELLIPSIZE_END of type PangoEllipsizeMode>, 'from_string': <bound method _DecimalConverter.from_string of <kiwi.datatypes._DecimalConverter object at 0x7f2cd15b6c50>>, '_property_helper_title': 'Max discount'}>]
delete_model(model, store)[source]
class stoqlib.gui.dialogs.clientcategorydialog.ClientCategoryDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of ClientCategoryListSlave

title = 'Client categories'
size = (620, 300)

clientdetails Module

Classes for client details

class stoqlib.gui.dialogs.clientdetails.DetailsTab(model, parent)[source]

Bases: gtk.VBox

details_dialog_class = None
refresh()[source]

Refreshes the list of respective tab.

get_columns()[source]

Returns a list of columns this tab should show.

show_details()[source]

Called when the details button is clicked. Displays the details of the selected object in the list.

get_label()[source]

Returns the name of the tab.

get_details_model(model)[source]

Subclassses can overwrite this method if the details dialog class needs a model different than the one on the list.

get_details_dialog_class()[source]

Subclasses must return the dialog that should be displayed for more information about the item on the list

setup_widgets()[source]

Override this if tab needs to do some custom widget setup.

class stoqlib.gui.dialogs.clientdetails.SalesTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Sale', 'Sales')
details_lbl = 'Sale details'
setup_widgets()[source]
get_columns()[source]
populate()[source]
get_details_dialog_class()[source]
class stoqlib.gui.dialogs.clientdetails.ReturnedSalesTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Returned Sale', 'Returned Sales')
details_lbl = 'Returned sale details'
get_columns()[source]
populate()[source]
get_details_model(model)[source]
get_details_dialog_class()[source]
class stoqlib.gui.dialogs.clientdetails.ProductsTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Product', 'Products')
details_lbl = 'Product details'
get_columns()[source]
populate()[source]
class stoqlib.gui.dialogs.clientdetails.ServicesTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Service', 'Services')
details_lbl = 'Service details'
get_columns()[source]
populate()[source]
class stoqlib.gui.dialogs.clientdetails.WorkOrdersTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Work Order', 'Work Orders')
details_lbl = 'Work order details'
get_columns()[source]
populate()[source]
get_details_model(model)[source]
get_details_dialog_class()[source]
class stoqlib.gui.dialogs.clientdetails.PaymentsTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Payment', 'Payments')
details_lbl = 'Payment details'
get_columns()[source]
populate()[source]
get_details_model(model)[source]
get_details_dialog_class()[source]
show_details()[source]
class stoqlib.gui.dialogs.clientdetails.CreditAccountsTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Credit Account', 'Credit Accounts')
details_lbl = 'Credit details'
setup_widgets()[source]
get_columns()[source]
populate()[source]
class stoqlib.gui.dialogs.clientdetails.CallsTab(model, parent)[source]

Bases: stoqlib.gui.dialogs.clientdetails.DetailsTab

labels = ('Call', 'Calls')
details_lbl = 'Call details'
get_columns()[source]
populate()[source]
class stoqlib.gui.dialogs.clientdetails.ClientDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog shows some important details about clients like: - history of sales - all products tied with sales - all services tied with sales - all payments already created

title = u'Client Details'
size = (-1, 400)
model_type

alias of Client

gladefile = 'ClientDetailsDialog'
proxy_widgets = ('client', 'last_purchase_date', 'status')
setup_proxies()[source]
on_further_details_button__clicked(*args)[source]

credentialsdialog Module

class stoqlib.gui.dialogs.credentialsdialog.CredentialsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog is used to collect the credentials of a user. Returns None if not possible to authenticate the user, or the user if possible.

model_type

alias of Settable

title = u'Credentials Dialog'
confirm_widgets = ('password',)
create_model(store)[source]
on_username__activate(widget)[source]
on_confirm()[source]

contactsdialog Module

class stoqlib.gui.dialogs.contactsdialog.ContactInfoListDialog(store, person, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _ContactInfoListSlave

title = 'Contacts'
size = (500, 250)

costcenterdialog Module

A details dialog for a cost center object

class stoqlib.gui.dialogs.costcenterdialog.CostCenterDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'CostCenterDialog'
model_name = u'Cost Center'
size = (750, 450)
model_type

alias of CostCenter

proxy_widgets = ('name_lbl', 'budget_lbl', 'description_lbl')
setup_proxies()[source]
stoqlib.gui.dialogs.costcenterdialog.test()[source]

crashreportdialog Module

Crash report dialog

class stoqlib.gui.dialogs.crashreportdialog.CrashReportDialog(parent, callback)[source]

Bases: object

run()[source]
stoqlib.gui.dialogs.crashreportdialog.show_dialog(callback=None)[source]

Show a crash report dialog

creditdialog Module

class stoqlib.gui.dialogs.creditdialog.CreditInfoListDialog(store, person, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _CreditInfoListSlave

title = 'Credit Transactions'
size = (700, 250)

daterangedialog Module

class stoqlib.gui.dialogs.daterangedialog.date_range(start, end)

Bases: tuple

returned by DateRangeDialog containing information about the date range selected in it

end

Alias for field number 1

start

Alias for field number 0

class stoqlib.gui.dialogs.daterangedialog.DateRangeDialog(title=None, header_text=None)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

A simple dialog for selecting a date range

When confirmed, a date_range object will be returned containig the information about the date range selected

size = (-1, -1)
title = u'Select a date range'
confirm()[source]

devices Module

Device Settings listing dialog

class stoqlib.gui.dialogs.devices.DeviceSettingsListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

columns = [<Column: {'_property_helper_attribute': 'device_type_name', '_property_helper_width': 180, '_objectlist': None, '_property_helper_sorted': True, '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Device Type'}>, <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': 'Description'}>, <Column: {'_property_helper_attribute': 'station_name', '_property_helper_width': 150, '_objectlist': None, '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_searchable': True, '_property_helper_title': 'Computer'}>, <Column: {'_property_helper_attribute': 'is_active', '_property_helper_width': 70, '_objectlist': None, '_property_helper_justify': <enum GTK_JUSTIFY_CENTER of type GtkJustification>, '_data_type': <type 'bool'>, 'from_string': <bound method _BoolConverter.from_string of <kiwi.datatypes._BoolConverter object at 0x7f2cd15b6ad0>>, '_property_helper_title': 'Active'}>]
model_type

alias of DeviceSettings

run_editor(store, model)[source]
class stoqlib.gui.dialogs.devices.DeviceSettingsDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of DeviceSettingsListSlave

title = 'Device settings'
size = (750, 300)

financialreportdialog Module

Financial report dialog

class stoqlib.gui.dialogs.financialreportdialog.FinancialReportDialog(store)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

title = 'Financial Report Dialog'
confirm()[source]

feedbackdialog Module

Feedback dialog

class stoqlib.gui.dialogs.feedbackdialog.Feedback[source]

Bases: object

class stoqlib.gui.dialogs.feedbackdialog.FeedbackDialog(application_screen=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Stoq feedback'
model_type

alias of Feedback

gladefile = 'FeedbackDialog'
proxy_widgets = ['email', 'feedback']
size = (350, 240)
create_model(unused)[source]
setup_proxies()[source]
validate_confirm()[source]
on_email__validate(widget, email)[source]

importerdialog Module

class stoqlib.gui.dialogs.importerdialog.ImporterDialog(format, filename)[source]

Bases: stoqlib.gui.dialogs.progressbardialog.ProgressbarDialog

title = 'Importer Dialog'
log_category = 'stoqlib.importer.create'
failure_msg = 'Something went wrong while trying to import'
process_line(line)[source]

initialstockdialog Module

Dialog to register the initial stock of a product in a certain branch

class stoqlib.gui.dialogs.initialstockdialog.InitialStockDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'InitialStockDialog'
model_type

alias of Settable

title = u'Initial Stock'
size = (850, 450)
help_section = 'stock-register-initial'
proxy_widgets = ['branch']
need_cancel_confirmation = True
create_model(store)[source]
setup_proxies()[source]
setup_slaves()[source]
on_confirm()[source]
has_changes()[source]
on_storables__row_activated(storables, item)[source]
on_storables__cell_edited(storables, item, attr)[source]
after_branch__content_changed(widget)[source]

invoicedialog Module

class stoqlib.gui.dialogs.invoicedialog.InvoiceLayoutDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _InvoiceLayoutListSlave

size = (500, 300)
title = 'Invoice Layouts'
class stoqlib.gui.dialogs.invoicedialog.InvoicePrinterDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _InvoicePrinterListSlave

size = (700, 300)
title = 'Invoice Printers'
class stoqlib.gui.dialogs.invoicedialog.SaleInvoicePrinterDialog(store, model, printer)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of Sale

model_name = u'Sale Invoice'
gladefile = 'SaleInvoicePrinterDialog'
proxy_widgets = ['invoice_number']
title = u'Sale Invoice Dialog'
size = (250, 100)
setup_proxies()[source]
on_confirm()[source]
on_invoice_number__validate(widget, value)[source]

inventorydetails Module

Classes for inventory details

class stoqlib.gui.dialogs.inventorydetails.InventoryDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This class is for Inventory Details Dialog. This dialog display general informations about the selected inventory item on InventoryApp and about items related on the inventory.

This dialog have seven widgets. They will display the informations of the inventory selected. The |status_str| show dialog status string, the |identifier| show identifier, |branch_name| show the branch of the inventory, |open_date| is the open date of the inventory, |close_date| is the close date of the inventory if it was closed, |invoice_number| show the invoice number of the current inventory, and |responsible_name| show the username who opened the inventory.

gladefile = 'InventoryDetailsDialog'
model_type

alias of Inventory

title = u'Inventory Details'
size = (800, 460)
proxy_widgets = ('status_str', 'identifier', 'branch_name', 'open_date', 'close_date', 'invoice_number', 'responsible_name')
setup_proxies()[source]
on_export_button__clicked(button)[source]
on_print_button__clicked(button)[source]
on_info_button__clicked(button)[source]
on_items_list__selection_changed(objectlist, item)[source]
on_items_list__double_click(objectlist, item)[source]

labeldialog Module

class stoqlib.gui.dialogs.labeldialog.PrintLabelEditor(store, sellable, model=None, max_quantity=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This editor is used to gather information to print labels for a purchase item

model_type

alias of object

title = u'Print labels'
create_model(store)[source]
class stoqlib.gui.dialogs.labeldialog.SkipLabelsEditor(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog collects how many spaces should be skipped when printing a label

model_type

alias of object

title = 'Labels to skip'
create_model(store)[source]

loandetails Module

Classes for Stock Decrease Details Dialog

class stoqlib.gui.dialogs.loandetails.LoanDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

title = u'Loan Details'
size = (700, 400)
model_type

alias of Loan

gladefile = 'LoanDetails'
proxy_widgets = ('open_date', 'confirm_date', 'expire_date', 'branch_name', 'client_name', 'responsible_name')
add_tab(slave, name)[source]

Add a new tab on the notebook

Parameters:
  • slave – the slave we are attaching to the new tab
  • name – the name of the tab
setup_proxies()[source]

manufacturerdialog Module

Dialog for listing product manufacturers

class stoqlib.gui.dialogs.manufacturerdialog.ProductManufacturerListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

editor_class

alias of ProductManufacturerEditor

model_type

alias of ProductManufacturer

columns = [<Column: {'_property_helper_attribute': 'name', '_property_helper_expand': True, '_objectlist': None, '_property_helper_sorted': True, '_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': 'Manufacturer'}>]
delete_model(model, store)[source]
class stoqlib.gui.dialogs.manufacturerdialog.ProductManufacturerDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of ProductManufacturerListSlave

title = 'Manufacturers'
size = (620, 300)

masseditordialog Module

Dialog to mass edit value of database objects

This will allow the user to choose the field he wants to mass update, the rule for the update and set some parameters depending on those rules. For instance:

Price / Cost (Decimal)
  • Multiply value of [ |v] by [ ]
  • Add value of [ |v] with [ ]
  • Set to [ ]
Description / Code / Barcode / Others (String)
  • Replace [ ] by [ ]
  • Append [ ]
  • Prepend [ ]
  • Set to (if not unique)
Category (Reference)
  • Set to [ |v]
class stoqlib.gui.dialogs.masseditordialog.Operation(store, field, other_fields)[source]

Bases: gtk.HBox

Base class for an operation

An operation has some parameters (created by subclasses at will) and should return a new value that will update a field in the objects.

set_field(field)[source]
add_label(label)[source]

Add a label to self

add_entry(data_type)[source]

Add a entry with the specified data_type

The user will be able to provide any information in the entry that should be used by this operation (for instance, a number do multiply a value for or a string to replace a value for)

add_combo(data=None)[source]

Add a combo for selecting an option

add_field_combo(fields)[source]

Adds a combo for selecting another field.

The other field should be used as a reference value for the operation. for instance: a value that should be multiplied by or added to.

setup()[source]

Setup this operation.

Subclasses should override this method and add other fields that the user can set how the operation should work.

get_new_value(item)[source]

Returns the new value for the item

Subclasses must override this method and return a new value for the object field

apply_operation(item)[source]
class stoqlib.gui.dialogs.masseditordialog.MultiplyOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Operation

An operation that multiplies a field with a value

label = 'Multiply value of'
middle_label = 'by'
setup(other_fields)[source]
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.AddOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.MultiplyOperation

An operation that adds a field with a value

label = 'Add value of'
middle_label = 'with'
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.DivideOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.MultiplyOperation

An operation that divides a field by a value

label = 'Divide value of'
middle_label = 'by'
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.SetValueOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Operation

An operation that sets a field to a specifc value.

This works for both strings and numerical values

label = 'Set value to'
setup(other_fields)[source]
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.ReplaceOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Operation

An operation that replaces a string by another one

label = 'Replace'
setup(other_fields)[source]
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.SetObjectValueOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Operation

An operation that sets a field to a specifc value.

This works only for object values.

label = 'Set value to'
setup(other_fields)[source]
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.SetDateValueOperation(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Operation

An operation that sets a field to a specifc value.

This works only for object values.

label = 'Set value to'
setup(other_fields)[source]
get_new_value(item)[source]
class stoqlib.gui.dialogs.masseditordialog.Editor(store, field, other_fields)[source]

Bases: gtk.HBox

Base class for field editors

Subclasses must define a list of operations and a datatype

operations = []
data_type = None
set_field(field)[source]
apply_operation(item)[source]
class stoqlib.gui.dialogs.masseditordialog.DecimalEditor(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Editor

operations = [<class 'stoqlib.gui.dialogs.masseditordialog.SetValueOperation'>, <class 'stoqlib.gui.dialogs.masseditordialog.AddOperation'>, <class 'stoqlib.gui.dialogs.masseditordialog.MultiplyOperation'>, <class 'stoqlib.gui.dialogs.masseditordialog.DivideOperation'>]
data_type

alias of Decimal

class stoqlib.gui.dialogs.masseditordialog.UnicodeEditor(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Editor

operations = [<class 'stoqlib.gui.dialogs.masseditordialog.ReplaceOperation'>, <class 'stoqlib.gui.dialogs.masseditordialog.SetValueOperation'>]
data_type

alias of unicode

class stoqlib.gui.dialogs.masseditordialog.ObjectEditor(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Editor

operations = [<class 'stoqlib.gui.dialogs.masseditordialog.SetObjectValueOperation'>]
data_type

alias of object

class stoqlib.gui.dialogs.masseditordialog.DateEditor(store, field, other_fields)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Editor

operations = [<class 'stoqlib.gui.dialogs.masseditordialog.SetDateValueOperation'>]
data_type

alias of date

class stoqlib.gui.dialogs.masseditordialog.Field(data_type, validator=None, unique=False, visible=True, read_only=False, format_func=None)[source]

Bases: object

Base class for fields in a mass editor

This class implements basic value caching/storage for the editor

get_value(item)[source]
save_value(item)[source]
get_column(spec)[source]
format_func(item, data=None)[source]
set_new_value(item, value)[source]
get_new_value(item)[source]
is_changed(item)[source]
class stoqlib.gui.dialogs.masseditordialog.AccessorField(label, obj_name, attribute, data_type, unique=False, validator=None, visible=True, read_only=False, format_func=None)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Field

get_search_spec(spec)[source]

Get the spec for filtering by this field.

get_value(item)[source]
save_value(item)[source]
get_column(spec)[source]
class stoqlib.gui.dialogs.masseditordialog.ReferenceField(label, obj_name, attribute, reference_class, reference_attr, visible=True)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.AccessorField

get_search_spec(spec=None)[source]
format_func(item, data=None)[source]
class stoqlib.gui.dialogs.masseditordialog.MassEditorWidget(store, fields, results)[source]

Bases: gtk.HBox

get_changed_objects()[source]

Returns a set of all the changed objects

confirm(dialog)[source]
class stoqlib.gui.dialogs.masseditordialog.MassEditorSearch(store)[source]

Bases: stoqlib.gui.search.searchdialog.SearchDialog

size = (850, 450)
unlimited_results = True
save_columns = False
get_fields(store)[source]

Returns a list of fields for this mass editor

Subclasses can override this if they want dynamic fields (that depend on a database state, for isntance)

get_items(store)[source]

Get the list of objects that will be edited.

Subclasses must override this

create_filters()[source]
get_columns()[source]
confirm(retval=None)[source]

missingitemsdialog Module

class stoqlib.gui.dialogs.missingitemsdialog.MissingItemsDialog(order, missing)[source]

Bases: stoqlib.gui.base.lists.SimpleListDialog

This dialog shows a list of missing products to confirm a stock operation

Unless the user cancel the dialog, if the operation is a Sale, it will change the status from QUOTE to ORDERED. Also, for all productis missing that are composed, a new production order will be created.

If it’s not a Sale, the dialog is just informative and does not change anything.

confirm(*args)[source]
stoqlib.gui.dialogs.missingitemsdialog.get_missing_items(order, store)[source]

Fetch missing items, the returning object has the following attributes set:

  • storable: A storable for the missing item;
  • description: A description for the missing item;
  • ordered: The quantity ordered of the missing item;
  • stock: The stock available of the missing item.
Returns:a list of Settable items with the attributes mentioned above

paymentcategorydialog Module

Dialog for listing payment categories

stoqlib.gui.dialogs.paymentcategorydialog.format_category_type(value)[source]
class stoqlib.gui.dialogs.paymentcategorydialog.PaymentCategoryListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

model_type

alias of PaymentCategory

editor_class

alias of PaymentCategoryEditor

columns = [<Column: {'_property_helper_attribute': 'name', '_property_helper_expand': True, '_objectlist': None, '_property_helper_sorted': True, '_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': 'Category'}>, <Column: {'_property_helper_attribute': 'category_type', '_property_helper_format_func': <function format_category_type at 0x7f2cb40fd8c0>, '_objectlist': None, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_data_type': <type 'int'>, 'from_string': <bound method _IntConverter.from_string of <kiwi.datatypes._IntConverter object at 0x7f2cd15b6990>>, '_property_helper_title': 'Type'}>, <Column: {'_property_helper_attribute': 'color', '_property_helper_width': 20, '_property_helper_format_func': <function render_pixbuf at 0x7f2cb4dd8668>, '_objectlist': None, '_data_type': <type 'gtk.gdk.Pixbuf'>, 'from_string': <bound method _PixbufConverter.from_string of <kiwi.ui.proxywidget._PixbufConverter object at 0x7f2cb4ce2150>>, '_property_helper_title': 'Color'}>, <Column: {'from_string': <bound method _UnicodeConverter.from_string of <kiwi.datatypes._UnicodeConverter object at 0x7f2cd15b68d0>>, '_property_helper_attribute': 'color', '_property_helper_width': 120, '_objectlist': None, '_data_type': <type 'unicode'>, '_property_helper_column': 'color', '_property_helper_title': 'Color'}>]
populate()[source]
delete_model(model, store)[source]
run_editor(store, model)[source]
class stoqlib.gui.dialogs.paymentcategorydialog.PaymentCategoryDialog(store, category_type=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of PaymentCategoryListSlave

size = (620, 300)
title = 'Payment categories'

paymentchangedialog Module

class stoqlib.gui.dialogs.paymentchangedialog.PaymentDueDateChangeDialog(store, payment, order=None)[source]

Bases: stoqlib.gui.dialogs.paymentchangedialog._BasePaymentChangeDialog

This dialog is responsible to change a payment due date

title = u'Change payment due date'
get_validate_message()[source]
setup_proxies()[source]
create_model(store)[source]
on_confirm()[source]
on_due_date__validate(widget, value)[source]
class stoqlib.gui.dialogs.paymentchangedialog.PaymentStatusChangeDialog(store, payment, target_status, order=None)[source]

Bases: stoqlib.gui.dialogs.paymentchangedialog._BasePaymentChangeDialog

This dialog is responsible to change a payment status

title = u'Change Payment Status'
payment_widgets = ('status_combo',)
setup_proxies()[source]
create_model(store)[source]
on_confirm()[source]
get_validate_message()[source]

paymentcommentsdialog Module

class stoqlib.gui.dialogs.paymentcommentsdialog.PaymentCommentsListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

model_type

alias of PaymentComment

columns = [<Column: {'_property_helper_attribute': 'date', '_property_helper_width': 100, '_objectlist': None, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_data_type': <type 'datetime.date'>, 'from_string': <bound method _DateConverter.from_string of <kiwi.datatypes._DateConverter object at 0x7f2cd15b6f10>>, '_property_helper_title': 'Date'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'author.person.name', '_property_helper_width': 150, '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Author'}>, <Column: {'_property_helper_attribute': 'comment', '_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': 'Comment'}>]
populate()[source]
run_editor(store, model)[source]
class stoqlib.gui.dialogs.paymentcommentsdialog.PaymentCommentsDialog(store, payment)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of PaymentCommentsListSlave

title = u'Payment Comments'
size = (600, 250)

paymentdetails Module

class stoqlib.gui.dialogs.paymentdetails.LonelyPaymentDetailsDialog(store, payment)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'LonelyPaymentDetailsDialog'
size = (550, 350)
model_type

alias of Payment

proxy_widgets = ['value', 'interest', 'paid_value', 'penalty', 'description', 'discount', 'due_date', 'paid_date', 'status']
setup_proxies()[source]
get_title(model)[source]

paymentflowhistorydialog Module

Payment Flow History Report Dialog

class stoqlib.gui.dialogs.paymentflowhistorydialog.PaymentFlowDay(store, row, previous_day=None)[source]

Bases: object

get_divergent_payments()[source]

Returns a Payment sequence that meet the following requirements:

  • The payment due date, paid date or cancel date is the current PaymentFlowHistory date.
  • The payment was paid/received with different values (eg with discount or surcharge).
  • The payment was scheduled to be paid/received on the current, but it was not.
  • The payment was not expected to be paid/received on the current date.
classmethod get_flow_history(store, start, end)[source]

Get the payment flow history for a given date interval

This will return a list of PaymentFlowDay, one for each date that has payments registered and are in the interval specified.

class stoqlib.gui.dialogs.paymentflowhistorydialog.PaymentFlowHistoryDialog(store)[source]

Bases: stoqlib.gui.dialogs.daterangedialog.DateRangeDialog

title = u'Payment Flow History Dialog'
desc = 'Select a date or a range to be visualised in the report:'
size = (-1, -1)
confirm()[source]

paymentmethod Module

Dialogs for payment method management

class stoqlib.gui.dialogs.paymentmethod.PaymentMethodsDialog(store)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

size = (400, 400)
title = 'Payment Method Settings'
METHOD_EDITORS = {u'store_credit': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'money': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'bill': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'credit': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'deposit': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'check': <class 'stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor'>, u'card': <class 'stoqlib.gui.editors.paymentmethodeditor.CardPaymentMethodEditor'>}
on_cell_edited(klist, obj, attr)[source]

personmergedialog Module

Dialog for detecting duplicate person registers and merging them

Duplicate detection is currenctly really simple and works like this:

  1. All data is fetched from the database.

2) We iter through each item, reducing it to a key, that will be used to detect the duplicates 2.1) The key will be calculated using the persons name, phone and/or address street (configurable) 2.2) We insert the key in a dictionary, where the value is a list of objects that match the same key

After this, all items in the dictionary that have more than one person are considered duplicate by the given criteria

Room for improvement:
  • Add some way the user can choose which register will be kept
  • Add some way the user can choose field values from other registers that will be used to update the main register.
  • Use a soundex algorithm to reduce even further the name
  • phone number and mobile number may be swaped across duplicate registers.
  • Add an entry so the user can restrict the search (for when he already knows there is someone duplicate)
class stoqlib.gui.dialogs.personmergedialog.NameColumn(attribute='', title=None, data_type=None, **kwargs)[source]

Bases: kiwi.ui.objectlist.Column

attach(objectlist)[source]
cell_data_func(tree_column, text_renderer, model, treeiter, (column, renderer_prop))[source]
class stoqlib.gui.dialogs.personmergedialog.PersonMergeDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'PersonMergeDialog'
size = (800, 550)
title = u'Duplicate Person Search'
model_type

alias of _MethodModel

proxy_widgets = ['method_combo', 'same_phone', 'same_street']
methods = [('Identical name', 0), ('First and last name', 2), ('First name', 1)]
setup_proxies()[source]
create_model(store)[source]
merge(store, to_merge)[source]
on_search_button__clicked(widget)[source]
on_merge_button__clicked(widget)[source]
on_dup_tree__selection_changed(olist, item)[source]

pindialog Module

class stoqlib.gui.dialogs.pindialog.PinDialog(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'PinDialog'
model_type

alias of Settable

title = 'Connect to Stoq.link'
size = (400, 200)
proxy_widgets = ['pin']
confirm_widgets = ['pin']
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
refresh_ok(validation_value)[source]

pluginsdialog Module

Dialogs for payment method management

class stoqlib.gui.dialogs.pluginsdialog.PluginManagerDialog(store)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

size = (500, 350)
title = u'Plugin Manager'
help_section = 'plugin'
confirm()[source]

productiondetails Module

Production details dialogs

class stoqlib.gui.dialogs.productiondetails.ProductionDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'ProductionDetailsDialog'
model_type

alias of ProductionOrder

title = 'Production Details'
size = (750, 460)
proxy_widgets = ('branch', 'identifier', 'open_date', 'close_date', 'responsible_name', 'status_string')
setup_proxies()[source]
setup_slaves()[source]
has_open_inventory()[source]
on_print_button__clicked(widget)[source]
on_production_items__selection_changed(widget, item)[source]
on_materials__selection_changed(widget, item)[source]
on_produced_items__selection_changed(widget, items)[source]
on_lost_button__clicked(button)[source]
on_allocate_button__clicked(button)[source]
on_produce_button__clicked(button)[source]
on_production_items__row_activated(list, row)[source]

productionquotedialog Module

Dialog to create quote group from production orders

class stoqlib.gui.dialogs.productionquotedialog.ProductionQuoteDialog(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'ProductionQuoteDialog'
model_type

alias of _TemporaryQuoteGroup

title = 'Purchase Production'
size = (750, 450)
create_model(store)[source]
on_confirm()[source]
on_select_all__clicked(widget)[source]
on_unselect_all__clicked(widget)[source]
on_productions__cell_edited(widget, model, attr)[source]

productstockdetails Module

Classes for product stock details

class stoqlib.gui.dialogs.productstockdetails.ProductStockHistoryDialog(store, model, branch)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog shows some important history details about products:

  • received products
  • sales about a determined product
  • transfers
  • loans
  • manual decreases
title = 'Product History'
size = (-1, 400)
model_type

alias of Sellable

gladefile = 'ProductStockHistoryDialog'
add_tab(name)[source]
setup_proxies()[source]

progressdialog Module

class stoqlib.gui.dialogs.progressdialog.ProgressDialog(label='', pulse=True)[source]

Bases: kiwi.ui.delegates.GladeDelegate

This is a dialog you use to show the progress of a certain task. It’s just a label, progress bar and button. it’ll always be displayed in the center of a screen. The progress is pulsating and updated every 100 ms.

Signals:

  • cancel (): Emitted when a the cancel button is clicked
domain = 'stoq'
gladefile = 'ProgressDialog'
toplevel_name = 'ProgressDialog'
start(wait=50)[source]

Start the task, it’ll pulsate the progress bar until stop() is called :param wait: how many ms to wait before showing the dialog, defaults

to 50
stop()[source]

Stops pulsating and hides the dialog

set_label(label)[source]

Update the label of the dialog

Parameters:label – the new content of the label
set_text(text)[source]

Update the progress bar text

Parameters:text – the text to set the progress bar to
on_cancel__clicked(button)[source]

progressbardialog Module

class stoqlib.gui.dialogs.progressbardialog.ProgressbarDialog(title=None, args=None, log_category=None, start_msg=None, success_msg=None, failure_msg=None)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

Dialogs showing progress of a ProcessView should inherit from this.

size = (400, 300)

Default size for this dialog.

title = None

Title for the window.

args = []

Default process and arguments to run.

log_category = None

Default output of the process running.

start_msg = u'Running task...'

Message that will appear on the progressbar before the process is started.

success_msg = u'Task ran successfully!'

Message that will appear when process succeeds.

failure_msg = u'Task failed!'

Message that will appear then the process fails.

process_line(line)[source]

This method will be called once for each line of the process output, and must return a tuple containing the percentage and message that will be displayed in the progress bar.

Parameters:line – The line that must be processed.
Returns:A tuple, in which in the first value is the percentage that will be displayed in the progressbar (0 <= value <= 1) and the text that will be displayed in it.
on_process_view__read_line(view, line)[source]
on_process_view__finished(view, returncode)[source]

purchasedetails Module

Purchase details dialogs

stoqlib.gui.dialogs.purchasedetails.payment_value_colorize(payment)[source]
class stoqlib.gui.dialogs.purchasedetails.PurchaseDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'PurchaseDetailsDialog'
model_type

alias of PurchaseOrder

title = 'Purchase Details'
size = (750, 460)
proxy_widgets = ('branch', 'identifier', 'supplier', 'open_date', 'status', 'transporter_name', 'responsible_name', 'salesperson_name', 'expected_receival_date', 'expected_freight', 'freight_type', 'notes')
payment_proxy = ('total_paid', 'total_interest', 'total_discount', 'total_penalty', 'total_value')
receiving_proxy = ('received_freight_type', 'received_freight', 'total_discounts', 'total_surcharges', 'receiving_subtotal', 'receiving_total')
setup_proxies()[source]
on_export_csv__clicked(button)[source]
on_export_received__clicked(button)[source]
on_print_button__clicked(button)[source]
on_print_labels__clicked(button)[source]

quotedialog Module

Dialogs for quotes

class stoqlib.gui.dialogs.quotedialog.QuoteFillingDialog(model, store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'HolderTemplate'
model_type

alias of PurchaseOrder

title = u'Quote Filling'
size = (750, 450)
setup_slaves()[source]

receivingdialog Module

Classes for Receiving Order Details Dialog

class stoqlib.gui.dialogs.receivingdialog.ReceivingOrderDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog shows some important details about purchase receiving orders like:

  • history of received products
  • Invoice Details
  • Order details such transporter, supplier, etc.
title = 'Receiving Order Details'
size = (850, 400)
model_type

alias of ReceivingOrder

gladefile = 'ReceivingOrderDetailsDialog'
setup_proxies()[source]
setup_slaves()[source]
on_print_labels__clicked(button)[source]

renegotiationdetails Module

Classes for sale details

class stoqlib.gui.dialogs.renegotiationdetails.RenegotiationDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'RenegotiationDetailsDialog'
model_type

alias of PaymentRenegotiation

title = u'Renegotiation Details'
size = (750, 460)
proxy_widgets = ('status_lbl', 'client_lbl', 'responsible_name', 'open_date_lbl', 'total_lbl', 'notes', 'identifier', 'subtotal_lbl', 'surcharge_lbl', 'discount_lbl')
setup_proxies()[source]
on_details_button__clicked(button)[source]
on_status_details_button__clicked(button)[source]

returnedsaledialog Module

saledetails Module

Classes for sale details

class stoqlib.gui.dialogs.saledetails.SaleDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'SaleDetailsDialog'
model_type

alias of SaleView

title = u'Sale Details'
size = (750, 460)
proxy_widgets = ('status_lbl', 'client_lbl', 'salesperson_lbl', 'open_date_lbl', 'total_lbl', 'return_total_lbl', 'identifier', 'subtotal_lbl', 'surcharge_lbl', 'discount_lbl')
payment_widgets = ('total_discount', 'total_interest', 'total_penalty', 'total_paid', 'total_value')
add_tab(slave, name)[source]

Add a new tab on the notebook

Parameters:
  • slave – the slave we are attaching to the new tab
  • name – the name of the tab
setup_proxies()[source]
on_comments_list__row_activated(details_list, item)[source]
on_comments_list__selection_changed(details_list, item)[source]
on_comment_add__clicked(button)[source]
on_comment_info__clicked(button)[source]
on_print_button__clicked(button)[source]
on_print_bills__clicked(button)[source]
on_print_booklets__clicked(button)[source]
on_details_button__clicked(button)[source]
on_status_details_button__clicked(button)[source]
on_print_return_report__clicked(button)[source]

sellabledialog Module

class stoqlib.gui.dialogs.sellabledialog.SellableTaxConstantsDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of _SellableTaxConstantsListSlave

size = (500, 300)
title = 'Taxes'
class stoqlib.gui.dialogs.sellabledialog.CategoryPriceField(category, validator)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.Field

title = u'Price Change Dialog'
get_value(item)[source]
save_value(item)[source]
class stoqlib.gui.dialogs.sellabledialog.SellableView[source]

Bases: stoqlib.database.viewable.Viewable

sellable

alias of Sellable

product

alias of Product

storable

alias of Storable

service

alias of Service

id

column: PropertyColumn

markup = <stoqlib.database.expr.Case object>
need_price_update = <storm.expr.Cast object>
tables = [<class 'stoqlib.domain.sellable.Sellable'>, <storm.expr.LeftJoin object at 0x7f2cb009b878>, <storm.expr.LeftJoin object at 0x7f2cb009b8c0>, <storm.expr.LeftJoin object at 0x7f2cb009b7e8>, <storm.expr.LeftJoin object at 0x7f2cb009bd40>]
cls_attributes = ['sellable', 'service', 'markup', 'product', 'need_price_update', 'id', 'storable']
cls_spec = (<class 'stoqlib.domain.sellable.Sellable'>, <class 'stoqlib.domain.service.Service'>, <stoqlib.database.expr.Case object at 0x7f2cb009b830>, <class 'stoqlib.domain.product.Product'>, <storm.expr.Cast object at 0x7f2cb00a0450>, <storm.properties.PropertyColumn object at 0x7f2cb4291210>, <class 'stoqlib.domain.product.Storable'>)
highjacked = {}
stoqlib.gui.dialogs.sellabledialog.validate_price(value)[source]
class stoqlib.gui.dialogs.sellabledialog.SellableMassEditorDialog(store)[source]

Bases: stoqlib.gui.dialogs.masseditordialog.MassEditorSearch

search_spec

alias of SellableView

get_fields(store)[source]
get_items(store)[source]

sellableimage Module

class stoqlib.gui.dialogs.sellableimage.SellableImageViewer(size, use_thumbnail=False)[source]

Bases: kiwi.ui.delegates.GladeDelegate, stoqlib.gui.base.dialogs.RunnableView

title = 'Sellable Image Viewer'
domain = 'stoq'
gladefile = 'SellableImageViewer'
position = (0, 0)
set_sellable(sellable)[source]

sintegradialog Module

Sintegra generator dialog

class stoqlib.gui.dialogs.sintegradialog.SintegraDialog(store)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

title = 'Fiscal Printer History'
confirm()[source]

spreadsheetexporterdialog Module

Spreedsheet Exporter Dialog

class stoqlib.gui.dialogs.spreadsheetexporterdialog.SpreadSheetExporter[source]

A dialog to export data to a spreadsheet

title = 'Exporter to Spreadseet'
export(object_list, name, filename_prefix, data=None)[source]
export_temporary(temporary)[source]

startproduction Module

class stoqlib.gui.dialogs.startproduction.StartProductionDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = u'Production'
model_type

alias of ProductionOrder

title = u'Start Production'
gladefile = 'BaseTemplate'
size = (750, 450)
setup_slaves()[source]

stockcostdialog Module

Dialog to edit the stock average cost for products on a certain branch

class stoqlib.gui.dialogs.stockcostdialog.StockCostDialog(store, branch=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'StockCostDialog'
model_type

alias of object

title = u'Product - Stock Cost'
size = (750, 450)
setup_slaves()[source]
on_confirm()[source]

stockdecreasedialog Module

Classes for Stock Decrease Details Dialog

class stoqlib.gui.dialogs.stockdecreasedialog.StockDecreaseDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

title = u'Manual Stock Decrease Details'
size = (700, 400)
model_type

alias of StockDecrease

report_class

alias of StockDecreaseReceipt

gladefile = 'StockDecreaseDetails'
decrease_widgets = ['identifier', 'confirm_date', 'branch_name', 'responsible_name', 'removed_by_name', 'cfop_description', 'reason']
invoice_widgets = ['invoice_number']
proxy_widgets = ['identifier', 'confirm_date', 'branch_name', 'responsible_name', 'removed_by_name', 'cfop_description', 'reason', 'invoice_number']
add_tab(slave, name)[source]

Add a new tab on the notebook

Parameters:
  • slave – the slave we are attaching to the new tab
  • name – the name of the tab
setup_proxies()[source]
on_print_button__clicked(button)[source]

supplierdetails Module

Classes for supplier details

class stoqlib.gui.dialogs.supplierdetails.SupplierDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog shows some important details about suppliers like: - history of purchases - all products tied with purchases - all payments already created

title = u'Supplier Details'
size = (780, 400)
model_type

alias of Supplier

gladefile = 'SupplierDetailsDialog'
proxy_widgets = ('supplier', 'last_purchase_date', 'status')
setup_proxies()[source]
on_further_details_button__clicked(*args)[source]

tilldailymovement Module

class stoqlib.gui.dialogs.tilldailymovement.DailyMovementSale(**kw)[source]

Bases: kiwi.python.Settable

class stoqlib.gui.dialogs.tilldailymovement.TillDailyMovementDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Shows informations related to till operations over a daterange. It can also be filtered by branch.

title = 'Daily Movement'
size = (950, 450)
model_type

alias of Settable

gladefile = 'TillDailyMovementDialog'
proxy_widgets = ['branch', 'in_subtotal', 'in_credit', 'in_total', 'out_subtotal', 'out_credit', 'out_total']
get_daterange()[source]
set_daterange(start, end=None)[source]
create_model(store)[source]
setup_proxies()[source]
on_search_button__clicked(widget)[source]
on_print_button__clicked(widget)[source]

tillhistory Module

Implementation of classes related to till operations.

class stoqlib.gui.dialogs.tillhistory.TillHistoryDialog(store, search_spec=None, hide_footer=True, title='', selection_mode=None, double_click_confirm=False, initial_string='')[source]

Bases: stoqlib.gui.search.searchdialog.SearchDialog

size = (780, -1)
search_spec

alias of TillEntry

selection_mode = <enum GTK_SELECTION_MULTIPLE of type GtkSelectionMode>
searchbar_labels = 'Till Entries matching:'
title = 'Till history'
get_columns(*args)[source]
create_filters()[source]
setup_widgets()[source]

tilldetails Module

class stoqlib.gui.dialogs.tilldetails.TillDetailsDialog(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'TillDetailsDialog'
model_type

alias of TillClosedView

title = u'Till Details'
size = (-1, 230)
proxy_widgets = ('observations', 'responsible_open_name', 'responsible_close_name', 'opening_date', 'closing_date', 'initial_cash_amount', 'final_cash_amount')
setup_proxies()[source]

transferorderdialog Module

Classes for Transfer Order Details Dialog

class stoqlib.gui.dialogs.transferorderdialog.TransferOrderDetailsDialog(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This dialog shows some important details about transfer orders like:

  • The source and destination branches
  • The transfer quantity of each item
  • The cost of each item
title = u'Transfer Order Details'
size = (700, 400)
model_type

alias of TransferOrder

report_class

alias of TransferOrderReceipt

gladefile = 'TransferOrderDetails'
transfer_widgets = ['open_date', 'receival_date', 'close_date_lbl', 'source_branch_name', 'destination_branch_name', 'source_responsible_name', 'destination_responsible_name', 'comments']
invoice_widgets = ['invoice_number']
proxy_widgets = ['open_date', 'receival_date', 'close_date_lbl', 'source_branch_name', 'destination_branch_name', 'source_responsible_name', 'destination_responsible_name', 'comments', 'invoice_number']
add_tab(slave, name)[source]

Add a new tab on the notebook

Parameters:
  • slave – the slave we are attaching to the new tab
  • name – the name of the tab
setup_proxies()[source]
on_receive_button__clicked(event)[source]
on_cancel_button__clicked(event)[source]
on_print_button__clicked(button)[source]

workordercategorydialog Module

Dialog for listing payment categories

class stoqlib.gui.dialogs.workordercategorydialog.WorkOrderCategoryListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

model_type

alias of WorkOrderCategory

editor_class

alias of WorkOrderCategoryEditor

columns = [<Column: {'_property_helper_attribute': 'name', '_property_helper_expand': True, '_objectlist': None, '_property_helper_sorted': True, '_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': 'Category'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'color', '_data_type': <type 'gtk.gdk.Pixbuf'>, 'from_string': <bound method _PixbufConverter.from_string of <kiwi.ui.proxywidget._PixbufConverter object at 0x7f2cb4ce2150>>, '_property_helper_format_func': <function render_pixbuf at 0x7f2cb4dd8668>, '_property_helper_title': 'Color'}>, <Column: {'_objectlist': None, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_attribute': 'color', '_data_type': <type 'str'>, '_property_helper_column': 'color', '_property_helper_title': 'Color'}>]
delete_model(model, store)[source]
class stoqlib.gui.dialogs.workordercategorydialog.WorkOrderCategoryDialog(store=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListDialog

list_slave_class

alias of WorkOrderCategoryListSlave

size = (620, 300)
title = 'Work order categories'