editors Package

editors Package

accounteditor Module

class stoqlib.gui.editors.accounteditor.AccountEditor(store, model=None, parent_account=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Account Editor

gladefile = 'AccountEditor'
proxy_widgets = ['description', 'code']
model_type

alias of Account

model_name = 'Account'
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
refresh_ok(value)[source]
on_description__activate(entry)[source]
on_description__validate(entry, text)[source]
on_account_type__content_changed(account_type)[source]
stoqlib.gui.editors.accounteditor.test()[source]

accounttransactioneditor Module

class stoqlib.gui.editors.accounttransactioneditor.AccountTransactionEditor(store, model, account)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Account Transaction Editor

gladefile = 'AccountTransactionEditor'
proxy_widgets = ['description', 'code', 'date', 'value', 'is_incoming']
model_type

alias of AccountTransaction

model_name = 'transaction'
confirm_widgets = ['description', 'code', 'value']
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
on_description__validate(entry, value)[source]
on_value__validate(entry, value)[source]
on_is_outgoing__toggled(*args)[source]
on_add_account__clicked(button)[source]
stoqlib.gui.editors.accounttransactioneditor.test()[source]

addresseditor Module

Person address editor implementation

class stoqlib.gui.editors.addresseditor.AddressEditor(store, person, address=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Address'
model_type

alias of Address

gladefile = 'AddressEditor'
create_model(store)[source]
setup_slaves()[source]
validate_confirm()[source]

backupsettings Module

class stoqlib.gui.editors.backupsettings.BackupSettingsEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Backup Configuration'
model_type

alias of Settable

gladefile = 'BackupConfigurationEditor'
proxy_widgets = ['key']
confirm_widgets = ['key']
validate_confirm()[source]
setup_proxies()[source]
on_key__validate(widget, key)[source]

baseeditor Module

Base classes for editors

class stoqlib.gui.editors.baseeditor.BaseEditorSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

Base class for editor slaves inheritance. It offers methods for setting up focus sequence, required attributes and validated attrs.

Variables:
domain = 'stoq'
gladefile = None
model_type = None
fields = None
proxy_widgets = ()
confirm()[source]

Confirms the editor

Before actually confirming, we will verify that validate_confirm() (and all slaves validate_confirm) returns True. Only if none of those calls return False, we will call on_confirm() on the editor and all the slaves.

BaseEditor will call this when someone clicks it’s confirm button.

cancel()[source]

Cancels the editor

By calling this, the editor will get cancelled. All of the editor’s slaves on_cancel(), including the editor’s itself will get called.

BaseEditor will call this when someone clicks it’s cancel button.

create_model(store)[source]

Creates a new model for the editor.

After this method is called, the model can be accessed as self.model. The default behavior is to raise a TypeError, which can be overridden in a subclass.

Parameters:store – a store
setup_proxies()[source]

A subclass can override this to setup proxies

This is called at the end of the object initialization and before setup_slaves(). If you need to add a proxy, it should be done here, eg:

self.proxy = self.add_proxy(self.model, self.proxy_widgets)
setup_slaves()[source]

A subclass can override this to setup slaves

This is called at the end of the object initialization and after setup_proxies(). If you need to add slaves, it should be done here, eg:

self.attach_slave(‘slave_holder’, SlaveClass())
on_cancel()[source]

Called when the dialog is about to get cancelled

When someone calls cancel() (normally a BaseEditor: when clicking on it’s cancel button), this will be called. If you need to do some kind of cleanup when cancelling, like removing an object that was already commited, this is the right place to do it.

Some places (like stoqlib.gui.base.dialogs.run_dialog()) will consider the editor’s retval as retval. Depending on the case, if you want to confirm the editor even when it was cancelled (e.g. Asking the user “Do you want to save those changes?”) you can do:

self.retval = True

Or simply do what you want in another store and commit it.

on_confirm()[source]

Called when the dialog is about to get confirmed

When someone calls confirm() (normally a BaseEditor: when clicking on it’s confirm button), this will be called. If you need to do some kind of late modification before the object gets commited, this is the place to do it.

Some places (like stoqlib.gui.base.dialogs.run_dialog()) will consider the editor’s retval as retval. Depending on the case, if you want to cancel the editor even when it was confirmed you can do:

self.retval = False

Or simply do a rollback on the actual store.

update_visual_mode()[source]

Called when the editor enters on visual mode

When the editor is readonly (aka visual mode), every proxy widgets and fields will be set insensitive. You should override this if you have any kind of extra work to do when entering visual mode.

validate_confirm()[source]

Called to see if the editor can be confirmed

The editor won’t get confirmed if this returns False. It’s recommended to show a message for the user, as a feedback, to explain why this didn’t confirm. By default, this returns True.

class stoqlib.gui.editors.baseeditor.BaseEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave, stoqlib.gui.base.dialogs.RunnableView

Base class for editor dialogs. It offers methods of BaseEditorSlave, a windows title and OK/Cancel buttons.

model_name = None

the model type name of the model we are editing. This value will be showed in the title of the editor and can not be merely the attribute __name__ of the object for usability reasons. Call sites will decide what could be the best name applicable in each situation.

header = ''
size = ()
title = None
need_cancel_confirmation = False

if we need to ask the user if he really wants to cancel the dialog if there are any changes done that would be lost otherwise

confirm_widgets = ()

a list of widget names that when activated will confirm the dialog

help_section = None
form_holder_name = 'toplevel'
has_changes()[source]

Check if there are changes on this editor

By default we will check if there’re any pending changes on store and that information will be used by need_cancel_confirmation

get_title(model)[source]
enable_window_controls()[source]

Enables the window controls See kiwi.ui.views.BaseView.enable_window_controls.

set_description(description)[source]

Sets the description of the model object which is used by the editor :param description:

refresh_ok(validation_value)[source]

Refreshes ok button sensitivity according to widget validators status

add_button(label=None, stock=None)[source]

Adds a button to editor. The added button is returned which you can use to connect signals on. :param label: label of the button :param stock: stock label of the button :param returns: the button added :rtype: gtk.Button

cancel()[source]

Cancel the dialog.

confirm()[source]

Confirm the dialog.

enable_ok()[source]

Enable the ok button of the dialog, eg makes it possible to close/confirm the dialog.

disable_ok()[source]

Enable the ok button of the dialog, eg makes it possible to close/confirm the dialog.

enable_normal_window()[source]

Enable the dialog as a normal window. This tells the window manager that the window should behave as a normal window instead of a dialog.

set_confirm_widget(widget_name)[source]

Make a widget confirmable, eg activating that widget would close the dialog. :param widget_name: name of the widget to be confirmable

set_message(message, message_type=None)[source]

Sets a message for this editor :param message: message to add :param message_type: type of message to add

close()[source]
run()[source]
get_current_toplevel()[source]
destroy()[source]
set_transient_for(window)[source]
class stoqlib.gui.editors.baseeditor.BaseRelationshipEditorSlave(store, parent=None, visual_mode=False)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

An editor for relationships between objects

BaseRelationshipEditor provides an easy way to edit (add/remove) relations between objects.

It doesn’t allow creations of new objects, only linking between them. (the linking might require new objects, though)

For example, you could edit suppliers for a product (or produts supplied by an supplier).

Subclasses must implement get_targets, get_columns, get_relations, and create_model.

domain = 'stoq'
gladefile = 'RelationshipEditor'
target_name = None
model_type = None
editor = None
get_targets()[source]

Returns a list of valid taret objects.

for instance, if suppliers for a product are being edited, then this should return a list fo suppliers.

get_columns()[source]

Columns to display

get_relations()[source]

Returns the already existing relations.

This may be entries from a maping table or entries from the target table itself, depending on the type of relationship

create_model()[source]

This method should create the model when adding a new relationship.

If the addition is canceled. It will automatically be removed.

add()[source]
edit(model)[source]
remove(model)[source]
on_add_button__clicked(widget)[source]
on_target_combo__content_changed(widget)[source]

callseditor Module

class stoqlib.gui.editors.callseditor.CallsEditor(store, model, person, person_type)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of Calls

model_name = 'Calls'
gladefile = 'CallsEditor'
help_section = 'client-call'
proxy_widgets = ('date', 'person_combo', 'description', 'message', 'attendant')
size = (400, 300)
create_model(store)[source]
setup_proxies()[source]
on_details_button__clicked(button)[source]
on_person_combo__changed(combo)[source]

categoryeditor Module

Sellable category editors implementation

class stoqlib.gui.editors.categoryeditor.SellableCategoryEditor(store, model=None, parent_category=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'SellableCategoryEditor'
model_type

alias of SellableCategory

model_name = 'Category'
size = (500, 350)
proxy_widgets = ('description', 'suggested_markup', 'tax_constant', 'category')
add_extra_tab(tab_label, slave)[source]
create_model(store)[source]
setup_slaves()[source]
setup_proxies()[source]
on_confirm()[source]
on_markup_check__toggled(widget)[source]
on_tax_check__toggled(widget)[source]
on_category__content_changed(widget)[source]
on_description__validate(widget, value)[source]

certificateeditor Module

class stoqlib.gui.editors.certificateeditor.CertificateEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

size = (-1, -1)
gladefile = 'CertificateEditor'
model_type

alias of Certificate

model_name = 'Certificate'
certificate_widgets = ['name', 'type', 'active']
password_widgets = ['password']
proxy_widgets = ['name', 'type', 'active', 'password']
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
on_certificate_chooser__selection_changed(widget)[source]
after_type__content_changed(widget)[source]
after_unmask__toggled(widget)[source]
after_ask_password__toggled(widget)[source]

clientcategoryeditor Module

Dialog for listing client categories

class stoqlib.gui.editors.clientcategoryeditor.ClientCategoryEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Client Category'
model_type

alias of ClientCategory

confirm_widgets = ['name', 'max_discount']
create_model(store)[source]
setup_proxies()[source]
on_name__validate(widget, new_name)[source]

contacteditor Module

Person Contacts editor implementation Allows editing of contact information. The user can add a description to each contact information and the information itself. Both fields are pure text and there’s no phone number formatting.

class stoqlib.gui.editors.contacteditor.ContactInfoEditor(store, model=None, person=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Contact Info'
model_type

alias of ContactInfo

confirm_widgets = ['description', 'contact_info']
create_model(store)[source]

costcentereditor Module

An editor for cost center objects

class stoqlib.gui.editors.costcentereditor.CostCenterEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Cost Center'
size = (300, -1)
model_type

alias of CostCenter

create_model(store)[source]

creditcheckhistoryeditor Module

class stoqlib.gui.editors.creditcheckhistoryeditor.CreditCheckHistoryEditor(store, model, client, visual_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of CreditCheckHistory

model_name = 'Client Credit Check History'
size = (400, -1)
create_model(store)[source]
setup_proxies()[source]
classmethod get_status_options()[source]

crediteditor Module

Editor for credit payments

class stoqlib.gui.editors.crediteditor.CreditEditor(store, client, model=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of Settable

model_name = 'Credit Transaction'
confirm_widgets = ['description', 'value']
create_model(store)[source]
validate_confirm()[source]
on_confirm()[source]
on_value__validate(widget, newvalue)[source]

deliveryeditor Module

Product delivery editor implementation

class stoqlib.gui.editors.deliveryeditor.CreateDeliveryModel(price=None, notes=None, client=None, transporter=None, address=None, estimated_fix_date=None, description=None, freight_type=None, volumes_kind=None, volumes_quantity=1, original_delivery=None)[source]

Bases: object

classmethod from_delivery(delivery)[source]
create_savepoint()[source]
rollback_to_savepoint()[source]
class stoqlib.gui.editors.deliveryeditor.CreateDeliveryEditor(store, model=None, sale_items=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

A fake delivery editor implementation.

This is used to get get information for creating a delivery, without really creating a it.

model_name = 'Delivery'
model_type

alias of CreateDeliveryModel

form_holder_name = 'forms'
gladefile = 'CreateDeliveryEditor'
title = 'New Delivery'
form_columns = 2
size = (750, 550)
on_additional_info_button__clicked(button)[source]
on_estimated_fix_date__validate(widget, date)[source]
on_price__validate(widget, price)[source]
on_client__content_changed(entry)[source]
on_transporter_id__validate(widget, transporter_id)[source]
on_client__validate(widget, client)[source]
create_model(store)[source]
setup_slaves()[source]
on_cancel()[source]
on_confirm()[source]
class stoqlib.gui.editors.deliveryeditor.DeliveryEditor(store, *args, **kwargs)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for stoqlib.domain.sale.Delivery

title = 'Delivery editor'
gladefile = 'DeliveryEditor'
size = (700, 500)
model_type

alias of Delivery

model_name = 'Delivery'
form_holder_name = 'forms'
form_columns = 2
setup_proxies()[source]
setup_slaves()[source]
on_is_sent_check__toggled(button)[source]
on_is_received_check__toggled(button)[source]

deviceseditor Module

Editors implementation for Stoq devices configuration

class stoqlib.gui.editors.deviceseditor.DeviceSettingsEditor(store, model=None, station=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'DeviceSettingsEditor'
model_type

alias of DeviceSettings

proxy_widgets = ('type_combo', 'brand_combo', 'device_combo', 'model_combo', 'baudrate', 'station', 'is_active_button')
refresh_ok(*args)[source]
setup_station_combo()[source]
setup_device_port_combo()[source]
setup_device_types_combo()[source]
setup_widgets()[source]
update_brand_combo()[source]
update_model_combo()[source]
setup_proxies()[source]
create_model(store)[source]
get_title(*args)[source]
validate_confirm()[source]
on_brand_combo__changed(*args)[source]
on_type_combo__changed(*args)[source]
on_model_combo__changed(*args)[source]
on_device_combo__changed(*args)[source]

discounteditor Module

class stoqlib.gui.editors.discounteditor.DiscountEditor(store, model, user=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for applying discounts

It has a simple entry that understands discount values and discount percentages, for instance, ‘10.5’ to give a $10.5 discount on the sale, and ‘10.5%’ to give 10.5% discount on the sale

title = 'Select discount to apply'
model_type

alias of object

confirm_widgets = ['discount']
setup_proxies()[source]
on_confirm()[source]
on_discount__icon_press(entry, icon_pos, event)[source]
on_discount__validate(widget, value)[source]

fiscaleditor Module

Editors for fiscal objects

class stoqlib.gui.editors.fiscaleditor.CfopEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'C.F.O.P.'
model_type

alias of CfopData

create_model(store)[source]
on_code__validate(widget, value)[source]
class stoqlib.gui.editors.fiscaleditor.FiscalBookEntryEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of FiscalBookEntry

gladefile = 'FiscalBookEntryEditor'
proxy_widgets = ('cfop', 'date', 'invoice_number')
get_title(model)[source]
setup_proxies()[source]

formfieldeditor Module

class stoqlib.gui.editors.formfieldeditor.FormFieldEditor(store)[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

size = (700, 400)
title = 'Form fields'
confirm(*args)[source]
cancel(*args)[source]

grideditor Module

Grid configuration editor implementation.

class stoqlib.gui.editors.grideditor.GridGroupEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Grid Group'
model_type

alias of GridGroup

gladefile = 'GridGroupEditor'
proxy_widgets = ['description', 'active_check_box']
confirm_widgets = ['description']
create_model(store)[source]
setup_proxies()[source]
class stoqlib.gui.editors.grideditor.GridAttributeEditor(store, model=None, visual_mode=False, group=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Grid Attribute'
model_type

alias of GridAttribute

gladefile = 'GridAttributeEditor'
size = (400, 350)
setup_slaves()[source]
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
class stoqlib.gui.editors.grideditor.GridOptionEditor(store, model=None, visual_mode=False, attribute=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Grid Attribute Option'
model_type

alias of GridOption

gladefile = 'GridOptionEditor'
proxy_widgets = ['description', 'option_order_spin', 'active_check_box']
confirm_widgets = ['description']
create_model(store)[source]
setup_proxies()[source]
stoqlib.gui.editors.grideditor.test_grid_editor()[source]

inventoryadjustmenteditor Module

Dialogs for product adjustment

class stoqlib.gui.editors.inventoryadjustmenteditor.InventoryAdjustmentEditor(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

title = u'Products Adjustment'
gladefile = 'InventoryAdjustmentEditor'
model_type

alias of Inventory

size = (750, 450)
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
on_cancel()[source]
on_adjust_button__clicked(button)[source]
on_adjust_all_button__clicked(button)[source]
on_inventory_items__row_activated(objectlist, item)[source]
on_inventory_items__selection_changed(objectlist, item)[source]
on_invoice_number__validate(widget, value)[source]
on_invoice_number__validation_changed(widget, value)[source]
class stoqlib.gui.editors.inventoryadjustmenteditor.InventoryItemAdjustmentEditor(store, model, invoice_number)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

title = u'Product Adjustment'
model_type

alias of InventoryItem

setup_proxies()[source]
on_confirm()[source]

inventoryeditor Module

Dialog to open the inventory

class stoqlib.gui.editors.inventoryeditor.InventoryOpenEditor(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'InventoryOpenEditor'
model_type

alias of _TemporaryInventory

title = 'Open Inventory'
size = (750, 450)
proxy_widgets = ['open_date', 'branch_name', 'product_manufacturer', 'product_brand', 'product_family']
create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
on_select_all__clicked(widget)[source]
on_unselect_all__clicked(widget)[source]
on_category_tree__cell_edited(tree, category, attr)[source]

invoiceeditor Module

User interfaces for configuring, editing and printing invoices.

class stoqlib.gui.editors.invoiceeditor.InvoiceGrid(font, width, height)[source]

Bases: stoqlib.gui.widgets.fieldgrid.FieldGrid

objectlist_dnd_handler(item, x, y)[source]
class stoqlib.gui.editors.invoiceeditor.InvoiceLayoutEditor(store, model=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = u'Invoice Layouts'
model_type

alias of InvoiceLayout

gladefile = 'InvoiceLayoutEditor'
size = (780, 540)
proxy_widgets = ['description', 'width', 'height', 'continuous_page']
create_model(store)[source]
setup_proxies()[source]
on_width__validate(widget, value)[source]
on_height__validate(widget, value)[source]
after_width__content_changed(widget)[source]
after_height__content_changed(widget)[source]
on_text__changed(widget)[source]
class stoqlib.gui.editors.invoiceeditor.InvoicePrinterEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = u'Invoice Printers'
model_type

alias of InvoicePrinter

gladefile = 'InvoicePrinterEditor'
proxy_widgets = ['device_name', 'description', 'layout', 'station']
create_model(store)[source]
setup_proxies()[source]
on_confirm()[source]
stoqlib.gui.editors.invoiceeditor.test()[source]

invoiceitemeditor Module

Base editor for items that can use a tax template

class stoqlib.gui.editors.invoiceitemeditor.InvoiceItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'InvoiceItemEditor'
setup_widgets()[source]
setup_proxies()[source]
add_tab(name, slave)[source]

loanitemeditor Module

Loan editors

class stoqlib.gui.editors.loanitemeditor.LoanItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'LoanItemEditor'
model_type

alias of LoanItem

model_name = 'Loan Item'
proxy_widgets = ['price', 'quantity', 'total']
setup_proxies()[source]
after_price__changed(widget)[source]
after_quantity__changed(widget)[source]
on_price__validate(widget, value)[source]
on_price__icon_press(entry, icon_pos, event)[source]
on_quantity__validate(widget, value)[source]

noteeditor Module

class stoqlib.gui.editors.noteeditor.Note(notes=u'')[source]

Bases: object

A helper to generate notes on NoteEditor

You can use this as a temporary object to get notes when you don’t have a real model to use.

class stoqlib.gui.editors.noteeditor.NoteEditor(store, model, attr_name='notes', title=u'', label_text=None, message_text=None, mandatory=False, visual_mode=False, ok_button_label=None, cancel_button_label=None, min_length=0)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Simple editor that offers a label and a textview.

gladefile = 'NoteSlave'
proxy_widgets = ('notes',)
size = (500, 200)
model_type

alias of object

setup_proxies()[source]
create_model(store)[source]
get_title(*args)[source]
on_cancel()[source]
confirm()[source]

parameterseditor Module

System parameters editor

class stoqlib.gui.editors.parameterseditor.SystemParameterEditor(store, param_detail)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'SystemParameterEditor'
proxy_widgets = ('parameter_name', 'parameter_desc', 'parameter_group')
model_type

alias of ParameterData

help_section = 'param'
get_title(model)[source]
setup_proxies()[source]
setup_slaves()[source]
validate_confirm()[source]

paymentcategoryeditor Module

Dialog for listing payment categories

class stoqlib.gui.editors.paymentcategoryeditor.PaymentCategoryEditor(store, model=None, category_type=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Payment Category'
model_type

alias of PaymentCategory

confirm_widgets = ['name']
validate_confirm()[source]
create_model(store)[source]
setup_proxies()[source]
on_name__validate(widget, new_name)[source]
stoqlib.gui.editors.paymentcategoryeditor.test()[source]

paymenteditor Module

Editor for payments descriptions and categories

class stoqlib.gui.editors.paymenteditor.InPaymentEditor(store, model=None, category=None)[source]

Bases: stoqlib.gui.editors.paymenteditor._PaymentEditor

payment_type = u'in'
person_attribute = 'payer'
person_type

alias of Client

account_label = 'Destination account'
help_section = 'account-receivable'
category_type = u'receivable'
on_person__validate(widget, value)[source]
on_value__changed(value)[source]
class stoqlib.gui.editors.paymenteditor.OutPaymentEditor(store, model=None, category=None)[source]

Bases: stoqlib.gui.editors.paymenteditor._PaymentEditor

payment_type = u'out'
person_attribute = 'recipient'
person_type

alias of Supplier

account_label = 'Source account'
help_section = 'account-payable'
category_type = u'payable'
stoqlib.gui.editors.paymenteditor.get_dialog_for_payment(payment)[source]
stoqlib.gui.editors.paymenteditor.test()[source]

paymentmethodeditor Module

Editors for payment method management.

This module contains the following editors and slaves:

class stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

A generic editor for payment methods.

This uses the slave PaymentMethodSlave to edit the generic information for the payment method.

If some method have specific information, another editor should be implemented and still use the PaymentMethodSlave

model_name = 'Payment Method'
gladefile = 'HolderTemplate'
model_type

alias of PaymentMethod

setup_slaves()[source]
class stoqlib.gui.editors.paymentmethodeditor.CardPaymentMethodEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Specific editor for card payment method.

This is organized in 3 different tabs, each with one slave:

model_name = 'Payment Method'
gladefile = 'CardMethodEditor'
model_type

alias of PaymentMethod

setup_slaves()[source]
class stoqlib.gui.editors.paymentmethodeditor.CardDeviceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Edits the details about a card device

model_name = 'Card Device'
gladefile = 'CardDeviceEditor'
model_type

alias of CardPaymentDevice

proxy_widgets = ['supplier', 'description', 'monthly_cost']
confirm_widgets = ['description']
size = (600, 300)
create_model(store)[source]
setup_slaves()[source]
setup_proxies()[source]
on_monthly_cost__validate(widget, value)[source]
class stoqlib.gui.editors.paymentmethodeditor.CardOperationCostEditor(store, model, device)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Edits the details about a stoqlib.domain.payment.card.CardOperationCost

model_name = 'Card Device Cost'
gladefile = 'CardOperationCostEditor'
model_type

alias of _TemporaryOperationCost

proxy_widgets = ['fee', 'fare', 'installment_start', 'installment_end', 'payment_days', 'provider', 'card_type']
confirm_widgets = ['fee', 'fare', 'installment_start', 'installment_end', 'payment_days']
create_model(store)[source]
setup_proxies()[source]
on_confirm()[source]
has_installments()[source]

If the currenct selected card type have installments

set_installment_limits()[source]
on_installment_start__changed(widget)[source]
on_installment_end__changed(widget)[source]
on_card_type__changed(widget)[source]
on_provider__changed(widget)[source]
on_installment_start__validate(widget, start)[source]
on_installment_end__validate(widget, end)[source]
class stoqlib.gui.editors.paymentmethodeditor.CreditProviderEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Editor for stoqlib.domain.payment.card.CreditProvider details

model_type

alias of CreditProvider

gladefile = 'CreditProviderEditor'
proxy_widgets = ['provider_id', 'short_name', 'max_installments', 'default_device', 'open_contract_date']
setup_proxies()[source]
create_model(store)[source]
on_max_installments__validate(widget, value)[source]
class stoqlib.gui.editors.paymentmethodeditor.CardPaymentDetailsEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Editor for :obj: stoqlib.domain.payment.CreditCardData

model_type

alias of CreditCardData

on_confirm()[source]
class stoqlib.gui.editors.paymentmethodeditor.PaymentMethodSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

Slave for editing generic payment method details

model_name = 'Payment Method'
gladefile = 'PaymentMethodEditor'
model_type

alias of PaymentMethod

proxy_widgets = ('account', 'max_installments', 'penalty', 'daily_interest')
setup_proxies()[source]
on_confirm()[source]
on_daily_interest__validate(widget, value)[source]
on_penalty__validate(widget, value)[source]
on_max_installments__validate(widget, value)[source]
class stoqlib.gui.editors.paymentmethodeditor.ProviderListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

Slave listing all stoqlib.domain.payment.card.CreditProvider objects

model_type

alias of CreditProvider

editor_class

alias of CreditProviderEditor

columns = [<Column: {'_property_helper_attribute': 'short_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': 'Name'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'max_installments', '_data_type': <type 'int'>, 'from_string': <bound method _IntConverter.from_string of <kiwi.datatypes._IntConverter object at 0x7f2cd15b6990>>, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_property_helper_title': 'Max Installments'}>]
populate()[source]
remove_item(provider)[source]
class stoqlib.gui.editors.paymentmethodeditor.CardDeviceListSlave(parent=None, store=None, orientation=None, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

Slave listing all stoqlib.domain.payment.card.CardPaymentDevice objects

model_type

alias of CardPaymentDevice

editor_class

alias of CardDeviceEditor

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': 'Description'}>, <Column: {'_property_helper_attribute': 'monthly_cost', '_property_helper_expand': True, '_objectlist': None, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_data_type': <class 'kiwi.currency.currency'>, '_property_helper_ellipsize': <enum PANGO_ELLIPSIZE_END of type PangoEllipsizeMode>, 'from_string': <bound method _CurrencyConverter.from_string of <kiwi.currency._CurrencyConverter object at 0x7f2cd15b7250>>, '_property_helper_title': 'Monthly cost'}>]
populate()[source]
remove_item(device)[source]
class stoqlib.gui.editors.paymentmethodeditor.CardOperationCostListSlave(store, device, reuse_store=False)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

Slave listing all stoqlib.domain.payment.card.CardOperationCost for a given stoqlib.domain.payment.card.CardOperationCost

model_type

alias of CardOperationCost

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': 'Description'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'installment_range_as_string', '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Installments'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'payment_days', '_data_type': <type 'int'>, 'from_string': <bound method _IntConverter.from_string of <kiwi.datatypes._IntConverter object at 0x7f2cd15b6990>>, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_property_helper_title': 'Days'}>, <Column: {'_property_helper_attribute': 'fee', '_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'>, 'from_string': <bound method _DecimalConverter.from_string of <kiwi.datatypes._DecimalConverter object at 0x7f2cd15b6c50>>, '_property_helper_title': 'Fee'}>, <Column: {'_objectlist': None, '_property_helper_attribute': 'fare', '_data_type': <class 'kiwi.currency.currency'>, 'from_string': <bound method _CurrencyConverter.from_string of <kiwi.currency._CurrencyConverter object at 0x7f2cd15b7250>>, '_property_helper_justify': <enum GTK_JUSTIFY_RIGHT of type GtkJustification>, '_property_helper_title': 'Fare'}>]
populate()[source]
remove_item(item)[source]
run_editor(store, model)[source]
stoqlib.gui.editors.paymentmethodeditor.test()[source]

paymentseditor Module

class stoqlib.gui.editors.paymentseditor.PurchasePaymentsEditor(store, model)[source]

Bases: stoqlib.gui.editors.paymentseditor._PaymentsEditor

model_type

alias of PurchaseOrder

class stoqlib.gui.editors.paymentseditor.SalePaymentsEditor(store, model)[source]

Bases: stoqlib.gui.editors.paymentseditor._PaymentsEditor

model_type

alias of Sale

update_fully_paid(fully_paid)[source]

personeditor Module

Person editors definition

class stoqlib.gui.editors.personeditor.ClientEditor(store, model=None, role_type=None, person=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'Client'
title = 'New Client'
model_type

alias of Client

gladefile = 'BaseTemplate'
help_section = 'client'
ui_form_name = u'client'
create_model(store)[source]
setup_slaves()[source]
class stoqlib.gui.editors.personeditor.UserEditor(store, model=None, role_type=None, person=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'User'
title = 'New User'
model_type

alias of LoginUser

gladefile = 'BaseTemplate'
USER_TAB_POSITION = 0
help_section = 'user'
ui_form_name = u'user'
create_model(store)[source]
setup_slaves()[source]
validate_confirm()[source]
class stoqlib.gui.editors.personeditor.EmployeeEditor(store, model=None, person=None, role_type=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'Employee'
title = 'New Employee'
model_type

alias of Employee

gladefile = 'BaseTemplate'
ui_form_name = u'employee'
create_model(store)[source]
setup_slaves()[source]
class stoqlib.gui.editors.personeditor.EmployeeRoleEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of EmployeeRole

model_name = 'Employee Role'
confirm_widgets = ['name']
create_model(store)[source]
on_cancel()[source]
on_name__validate(widget, value)[source]
class stoqlib.gui.editors.personeditor.SupplierEditor(store, model=None, role_type=None, person=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'Supplier'
title = 'New Supplier'
model_type

alias of Supplier

gladefile = 'BaseTemplate'
help_section = 'supplier'
ui_form_name = u'supplier'
create_model(store)[source]
setup_slaves()[source]
class stoqlib.gui.editors.personeditor.TransporterEditor(store, model=None, role_type=None, person=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'Transporter'
title = 'New Transporter'
model_type

alias of Transporter

gladefile = 'BaseTemplate'
help_section = 'transporter'
ui_form_name = u'transporter'
create_model(store)[source]
setup_slaves()[source]
class stoqlib.gui.editors.personeditor.BranchEditor(store, model=None, role_type=None, person=None, visual_mode=False, parent=None, document=None, description=None)[source]

Bases: stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

model_name = 'Branch'
title = 'New Branch'
model_type

alias of Branch

gladefile = 'BaseTemplate'
help_section = 'branch'
ui_form_name = u'branch'
create_model(store)[source]
setup_slaves()[source]
stoqlib.gui.editors.personeditor.test_client()[source]
stoqlib.gui.editors.personeditor.test_employee_role()[source]

preferenceseditor Module

Editors for user preferences

class stoqlib.gui.editors.preferenceseditor.PreferencesEditor(store, *args, **kwargs)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for managing preferences in a tab style

gladefile = 'PreferencesEditor'
model_type

alias of _PreferencesModel

model_name = 'Preferences'
size = (600, 400)
proxy_widgets = ['toolbar_style', 'language', 'spreadsheet']
add_extra_tab(tab_name, slave_class, *args, **kwargs)[source]

Add an extra tab on preferences

Parameters:
  • tab_name – the name of the tab
  • slave_class – the slave that will be attached to the new tab
  • args – additional args to slave
  • kwargs – additional kwargs to slave
create_model(store)[source]
setup_proxies()[source]
setup_slaves()[source]

producteditor Module

Editors definitions for products

class stoqlib.gui.editors.producteditor.TemporaryProductComponent(store, product=None, component=None, quantity=Decimal('1'), design_reference=u'', price=Decimal('0'))[source]

Bases: object

get_total_production_cost()[source]
delete_product_component(store)[source]
add_or_update_product_component(store)[source]
class stoqlib.gui.editors.producteditor.QualityTestEditor(store, model=None, product=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Quality Test'
model_type

alias of ProductQualityTest

gladefile = 'QualityTestEditor'
proxy_widgets = ['description', 'test_type']
confirm_widgets = ['description']
create_model(store)[source]
setup_proxies()[source]
on_confirm()[source]
on_test_type__changed(widget)[source]
class stoqlib.gui.editors.producteditor.ProductSupplierEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Product Supplier'
model_type

alias of ProductSupplierInfo

gladefile = 'ProductSupplierEditor'
proxy_widgets = ('base_cost', 'icms', 'notes', 'lead_time', 'minimum_purchase', 'supplier_code')
confirm_widgets = ['base_cost', 'icms', 'lead_time', 'minimum_purchase', 'supplier_code']
setup_proxies()[source]
validate_confirm()[source]
on_minimum_purchase__validate(entry, value)[source]
on_base_cost__validate(entry, value)[source]
on_lead_time__validate(entry, value)[source]
on_supplier_code__validate(entry, value)[source]
class stoqlib.gui.editors.producteditor.ProductComponentEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'ProductComponentEditor'
proxy_widgets = ['quantity', 'design_reference', 'price']
title = u'Product Component'
model_type

alias of TemporaryProductComponent

setup_proxies()[source]
validate_confirm()[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.producteditor.ProductPackageComponentEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.producteditor.ProductComponentEditor

confirm_widgets = ['price']
setup_proxies()[source]
on_price__validate(widget, value)[source]
class stoqlib.gui.editors.producteditor.ProductEditor(store, model=None, visual_mode=False, product_type=0, template=None, wizard=None)[source]

Bases: stoqlib.gui.editors.sellableeditor.SellableEditor

model_name = 'Product'
model_type

alias of Product

help_section = 'product'
ui_form_name = u'product'
product_widgets = ['product_type_str']
proxy_widgets = ['tax_constant', 'tax_value', 'code', 'barcode', 'description', 'category_combo', 'cost', 'price', 'status_str', 'default_sale_cfop', 'unit_combo', 'product_type_str']
get_taxes()[source]
setup_slaves()[source]
setup_proxies()[source]
get_extra_tabs()[source]
setup_widgets()[source]
create_model(store)[source]
on_confirm()[source]
class stoqlib.gui.editors.producteditor.ProductionProductEditor(store, model=None, visual_mode=False, product_type=0, template=None, wizard=None)[source]

Bases: stoqlib.gui.editors.producteditor.ProductEditor

create_model(store)[source]
get_extra_tabs()[source]
setup_widgets()[source]
validate_confirm()[source]
on_component_slave__cost_updated(slave, cost)[source]
on_cost__validate(widget, value)[source]
class stoqlib.gui.editors.producteditor.ProductStockEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This is a product editor limitted to editing physical stock information

model_name = 'Product'
model_type

alias of Product

gladefile = 'ProductStockEditor'
setup_slaves()[source]
class stoqlib.gui.editors.producteditor.ProductStockQuantityEditor(store, model, branch)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Editor for adjusting the stock quantity of a product

This editor will set the quantity of a product for a given branch. If the product does not manage stock yet, a storable will be created first and the initial stock be registred.

If the product is already a storable, an inventory will be created for just this product (so that the original quantity is registred and can be audited), and the quantity will be adjusted. A reason in this case is mandatory

title = 'Adjust stock quantity'
model_name = 'Stock'
model_type

alias of Settable

create_model(store)[source]
on_confirm()[source]
class stoqlib.gui.editors.producteditor.ProductManufacturerEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Manufacturer'
model_type

alias of ProductManufacturer

confirm_widgets = ['name']
create_model(store)[source]
setup_proxies()[source]
on_name__validate(widget, new_name)[source]
on_code__validate(widget, new_code)[source]
stoqlib.gui.editors.producteditor.test_product()[source]

productioneditor Module

Production editors

This file contains several editors used in the production process:

class stoqlib.gui.editors.productioneditor.ProductionItemEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This is a base class for all items used in a production:

gladefile = 'ProductionItemEditor'
model_type

alias of ProductionItem

size = (-1, -1)
model_name = u'Production Item'
proxy_widgets = ['description', 'quantity', 'unit_description']
help_section = 'production'
setup_location_widgets()[source]
setup_editor_widgets()[source]
get_max_quantity()[source]

Returns the maximum quantity allowed in the quantity spinbutton.

setup_proxies()[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.productioneditor.TempProductionItem[source]

Bases: object

to_produce = Decimal('0')
class stoqlib.gui.editors.productioneditor.ProductionItemProducedEditor(store, model)[source]

Bases: stoqlib.gui.editors.productioneditor.ProductionItemEditor

title = u'Produce Items'
quantity_title = u'Produce:'
quantity_attribute = 'to_produce'
setup_proxies()[source]
setup_slaves()[source]
get_max_quantity()[source]
validate_confirm()[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.productioneditor.ProductionMaterialLostEditor(store, model)[source]

Bases: stoqlib.gui.editors.productioneditor.ProductionItemProducedEditor

title = u'Lost Items'
quantity_title = u'Lost:'
quantity_attribute = 'lost'
model_type

alias of ProductionMaterial

validate_confirm()[source]
get_max_quantity()[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.productioneditor.ProductionMaterialAllocateEditor(store, model)[source]

Bases: stoqlib.gui.editors.productioneditor.ProductionItemProducedEditor

title = u'Allocate Items'
quantity_title = u'Allocate:'
quantity_attribute = 'allocate'
model_type

alias of ProductionMaterial

validate_confirm()[source]
get_max_quantity()[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.productioneditor.ProductionServiceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.productioneditor.ProductionItemEditor

model_type

alias of ProductionService

model_name = u'Production Service'
setup_proxies()[source]
class stoqlib.gui.editors.productioneditor.ProductionMaterialEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.productioneditor.ProductionItemEditor

model_type

alias of ProductionMaterial

model_name = u'Production Material Item'
proxy_widgets = ['description']
setup_proxies()[source]
on_quantity__validate(widget, value)[source]

profileeditor Module

User profile editor implementation.

class stoqlib.gui.editors.profileeditor.UserProfileEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'User Profile'
model_type

alias of UserProfile

gladefile = 'UserProfileEditor'
proxy_widgets = ('profile_name', 'max_discount')
help_section = 'user-profile'
create_model(store)[source]
setup_proxies()[source]
setup_slaves()[source]
on_profile_name__validate(widget, value)[source]
on_max_discount__activate(action)[source]

purchaseeditor Module

Purchase editors

class stoqlib.gui.editors.purchaseeditor.PurchaseItemEditor(store, model, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'PurchaseItemEditor'
model_type

alias of PurchaseItem

model_name = 'Purchase Item'
proxy_widgets = ['cost', 'expected_receival_date', 'quantity', 'total']
setup_proxies()[source]
on_confirm()[source]
after_cost__changed(widget)[source]
after_quantity__changed(widget)[source]
on_expected_receival_date__validate(widget, value)[source]
on_cost__validate(widget, value)[source]
on_quantity__validate(widget, value)[source]
class stoqlib.gui.editors.purchaseeditor.InConsignmentItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.purchaseeditor.PurchaseItemEditor

proxy_widgets = ['cost', 'expected_receival_date', 'quantity', 'total', 'quantity_sold', 'quantity_returned']
on_expected_receival_date__validate(widget, value)[source]
on_quantity_sold__validate(widget, value)[source]
on_quantity_returned__validate(widget, value)[source]
class stoqlib.gui.editors.purchaseeditor.PurchaseQuoteItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.purchaseeditor.PurchaseItemEditor

proxy_widgets = ['expected_receival_date', 'quantity', 'total']

saleeditor Module

Sale editors

class stoqlib.gui.editors.saleeditor.SaleQuoteItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.invoiceitemeditor.InvoiceItemEditor

model_type

alias of SaleItem

model_name = 'Sale Quote Item'
setup_slaves()[source]
class stoqlib.gui.editors.saleeditor.SaleQuoteItemSlave(store, model, parent)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'SaleQuoteItemSlave'
model_type

alias of SaleItem

proxy_widgets = ['price', 'cfop']
manager = None

The manager is someone who can allow a bigger discount for a sale item.

setup_proxies()[source]
on_confirm()[source]
after_price__changed(widget)[source]
after_quantity__changed(widget)[source]
on_price__validate(widget, value)[source]
on_quantity__validate(widget, value)[source]
on_reserved__validate(widget, value)[source]
on_price__icon_press(entry, icon_pos, event)[source]
class stoqlib.gui.editors.saleeditor.SaleClientEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.saleeditor._BaseSalePersonChangeEditor

setup_proxies()[source]
on_client__content_changed(widget)[source]
class stoqlib.gui.editors.saleeditor.SalesPersonEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.saleeditor._BaseSalePersonChangeEditor

title = 'Salesperson change'
setup_proxies()[source]
class stoqlib.gui.editors.saleeditor.SaleTokenEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of SaleToken

model_name = 'Sale token'
confirm_widgets = ['code']
setup_proxies()[source]
create_model(store)[source]
on_code__validate(widget, value)[source]

sellableeditor Module

Editors definitions for sellable

class stoqlib.gui.editors.sellableeditor.SellableTaxConstantEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of SellableTaxConstant

model_name = 'Taxes and Tax rates'
create_model(store)[source]
class stoqlib.gui.editors.sellableeditor.BasePriceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'SellablePriceEditor'
proxy_widgets = ['markup', 'cost', 'max_discount', 'price']
set_widget_formats()[source]
get_title(*args)[source]
setup_proxies()[source]
on_price__validate(entry, value)[source]
after_price__content_changed(entry_box)[source]
after_markup__content_changed(spin_button)[source]
class stoqlib.gui.editors.sellableeditor.SellablePriceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.sellableeditor.BasePriceEditor

model_name = u'Product Price'
model_type

alias of Sellable

setup_slaves()[source]
class stoqlib.gui.editors.sellableeditor.CategoryPriceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.sellableeditor.BasePriceEditor

model_name = u'Category Price'
model_type

alias of ClientCategoryPrice

sellable_widgets = ('cost',)
proxy_widgets = ('markup', 'max_discount', 'price')
setup_proxies()[source]
class stoqlib.gui.editors.sellableeditor.SellableEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

This is a base class for ProductEditor and ServiceEditor and should be used when editing sellable objects. Note that sellable objects are instances inherited by Sellable.

model_name = None
model_type = None
gladefile = 'SellableEditor'
confirm_widgets = ['description', 'cost', 'price']
ui_form_name = None
sellable_tax_widgets = ['tax_constant', 'tax_value']
sellable_widgets = ['code', 'barcode', 'description', 'category_combo', 'cost', 'price', 'status_str', 'default_sale_cfop', 'unit_combo']
proxy_widgets = ['tax_constant', 'tax_value', 'code', 'barcode', 'description', 'category_combo', 'cost', 'price', 'status_str', 'default_sale_cfop', 'unit_combo']
set_main_tab_label(tabname)[source]
add_extra_tab(tabname, tabslave)[source]
set_widget_formats()[source]
edit_sale_price()[source]
setup_widgets()[source]
update_requires_weighing_label()[source]
get_taxes()[source]

Subclasses may override this method to provide a custom tax selection.

Returns:a list of tuples containing the tax description and a stoqlib.domain.sellable.SellableTaxConstant object.
update_visual_mode()[source]
setup_sellable_combos()[source]
setup_unit_combo()[source]
setup_tax_constants()[source]
setup_proxies()[source]
setup_slaves()[source]
on_category_combo__content_changed(combo)[source]
on_tax_constant__changed(combo)[source]
on_unit_combo__changed(combo)[source]
on_sale_price_button__clicked(button)[source]
on_add_category__clicked(widget)[source]
on_edit_category__clicked(widget)[source]
on_code__validate(widget, value)[source]
on_barcode__validate(widget, value)[source]
on_price__validate(entry, value)[source]
on_cost__validate(entry, value)[source]
after_description__changed(widget)[source]
after_code__changed(widget)[source]
after_barcode__changed(widget)[source]
after_price__changed(widget)[source]
on_print_labels_clicked(button, parent_label_button=None)[source]
stoqlib.gui.editors.sellableeditor.test_sellable_tax_constant()[source]
stoqlib.gui.editors.sellableeditor.test_price_editor()[source]

sellableuniteditor Module

Implementation of SellableUnit editor

class stoqlib.gui.editors.sellableuniteditor.SellableUnitEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for stoqlib.domain.sellable.SellableUnit

gladefile = 'SellableUnitEditor'
model_type

alias of SellableUnit

model_name = 'Product Unit'
proxy_widgets = ('description', 'allow_fraction')
create_model(store)[source]
setup_proxies()[source]

serviceeditor Module

Service item editor implementation

class stoqlib.gui.editors.serviceeditor.ServiceItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Service'
model_type

alias of object

gladefile = 'ServiceItemEditor'
proxy_widgets = ('sellable_description', 'price', 'estimated_fix_date', 'notes')
size = (500, 265)
setup_proxies()[source]
on_estimated_fix_date__validate(widget, date)[source]
class stoqlib.gui.editors.serviceeditor.ServiceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.sellableeditor.SellableEditor

model_name = u'Service'
model_type

alias of Service

help_section = 'service'
get_taxes()[source]
setup_widgets()[source]
create_model(store)[source]

shortcutseditor Module

class stoqlib.gui.editors.shortcutseditor.ShortcutColumn(attribute, title, editor, **kwargs)[source]

Bases: kiwi.ui.objectlist.Column

create_renderer(model)[source]
class stoqlib.gui.editors.shortcutseditor.ShortcutsEditor[source]

Bases: stoqlib.gui.base.dialogs.BasicDialog

size = (700, 400)
title = 'Keyboard shortcuts'
set_binding(binding)[source]
remove_binding(binding)[source]

stationeditor Module

Editor dialog for station objects

class stoqlib.gui.editors.stationeditor.StationEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_name = 'Computer'
model_type

alias of BranchStation

gladefile = 'StationEditor'
proxy_widgets = ('name', 'branch', 'is_active')
create_model(store)[source]
setup_proxies()[source]
on_confirm()[source]
on_name__validate(entry, value)[source]

stockdecreaseeditor Module

Stock decrease editors

class stoqlib.gui.editors.stockdecreaseeditor.StockDecreaseItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.invoiceitemeditor.InvoiceItemEditor

model_name = u'Stock decrease item'
model_type

alias of StockDecreaseItem

setup_slaves()[source]
class stoqlib.gui.editors.stockdecreaseeditor.StockDecreaseItemSlave(store, model, parent)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'StockDecreaseItemSlave'
model_type

alias of StockDecreaseItem

proxy_widgets = ['cost', 'quantity']
setup_proxies()[source]
after_cost__changed(widget)[source]
after_quantity__changed(widget)[source]
on_quantity__validate(widget, value)[source]
on_cost__validate(widget, value)[source]

taxclasseditor Module

class stoqlib.gui.editors.taxclasseditor.ProductTaxTemplateEditor(store, model, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'ProductTaxTemplateEditor'
model_type

alias of ProductTaxTemplate

model_name = 'Base Category'
proxy_widgets = ('name', 'tax_type')
size = (-1, -1)
help_section = 'tax-class'
create_model(store)[source]
setup_combo()[source]
setup_proxies()[source]
on_tax_type__changed(widget)[source]

tilleditor Module

Editors implementation for open/close operation on till operation

class stoqlib.gui.editors.tilleditor.TillOpeningEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor to open a till. You can add cash to the till in the editor and it also shows the balance of the till, after the cash has been added.

Callers of this editor are responsible for sending in a valid Till object, which the method open_till() can be called.

title = u'Till Opening'
model_type

alias of _TillOpeningModel

gladefile = 'TillOpening'
confirm_widgets = ['value']
proxy_widgets = ('value', 'balance')
help_section = 'till-open'
create_model(store)[source]
setup_proxies()[source]
on_confirm()[source]
on_value__validate(entry, data)[source]
after_value__content_changed(entry)[source]
class stoqlib.gui.editors.tilleditor.TillClosingEditor(store, model=None, previous_day=False, close_db=True, close_ecf=True)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

size = (500, 440)
title = u'Closing Opened Till'
model_type

alias of _TillClosingModel

gladefile = 'TillClosing'
confirm_widgets = ['value']
proxy_widgets = ('value', 'balance', 'opening_date', 'observations')
help_section = 'till-close'
create_model(trans)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
after_value__validate(widget, value)[source]
after_value__content_changed(entry)[source]
class stoqlib.gui.editors.tilleditor.TillVerifyEditor(store, model=None, previous_day=False, close_db=False, close_ecf=False)[source]

Bases: stoqlib.gui.editors.tilleditor.TillClosingEditor

title = 'Till verification'
help_section = 'till-verify'
class stoqlib.gui.editors.tilleditor.CashAdvanceEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor which extends BaseCashSlave to include. It extends BaseCashSlave to include an employee combobox

model_name = u'Cash Advance'
model_type

alias of Settable

gladefile = 'CashAdvanceEditor'
create_model(store)[source]
setup_slaves()[source]
on_confirm()[source]
class stoqlib.gui.editors.tilleditor.BaseCashEditor(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

model_type

alias of Settable

gladefile = 'BaseCashEditor'
create_model(store)[source]
setup_proxies()[source]
setup_slaves()[source]
on_confirm()[source]
class stoqlib.gui.editors.tilleditor.CashOutEditor(store)[source]

Bases: stoqlib.gui.editors.tilleditor.BaseCashEditor

An editor to Remove cash from the Till

model_name = u'Cash Out'
title = u'Reverse Payment'
cash_slave_class

alias of RemoveCashSlave

event

alias of TillRemoveCashEvent

help_section = 'till-remove-money'
create_entry(till, value, reason)[source]
class stoqlib.gui.editors.tilleditor.CashInEditor(store)[source]

Bases: stoqlib.gui.editors.tilleditor.BaseCashEditor

An editor to Add cash to the Till

model_name = u'Cash In'
cash_slave_class

alias of BaseCashSlave

event

alias of TillAddCashEvent

help_section = 'till-add-money'
create_entry(till, value, reason)[source]

transfereditor Module

Transfer editors

class stoqlib.gui.editors.transfereditor.TransferItemEditor(store, model)[source]

Bases: stoqlib.gui.editors.invoiceitemeditor.InvoiceItemEditor

model_name = u'Transfer Item'
model_type

alias of TransferOrderItem

setup_slaves()[source]
class stoqlib.gui.editors.transfereditor.TransferItemSlave(store, model, parent)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'TransferItemSlave'
model_type

alias of TransferOrderItem

proxy_widgets = ['stock_cost', 'quantity']
setup_proxies()[source]
after_stock_cost__changed(widget)[source]
after_quantity__changed(widget)[source]
on_quantity__validate(widget, value)[source]
on_stock_cost__validate(widget, value)[source]

workordercategoryeditor Module

Dialog for listing payment categories

class stoqlib.gui.editors.workordercategoryeditor.WorkOrderCategoryEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for work order category objects

model_name = 'Work order category'
model_type

alias of WorkOrderCategory

confirm_widgets = ['name']
create_model(store)[source]
setup_proxies()[source]
on_name__validate(widget, name)[source]

workordereditor Module

class stoqlib.gui.editors.workordereditor.WorkOrderEditor(store, model=None, visual_mode=False, category=None, available_categories=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

An editor for working with work order objects

size = (800, -1)
gladefile = 'WorkOrderEditor'
model_type

alias of WorkOrder

model_name = u'Work order'
help_section = 'workorder'
need_cancel_confirmation = True
proxy_widgets = ['category', 'client', 'description', 'identifier', 'status_str', 'supplier_order', 'quantity']
create_model(store)[source]
setup_slaves()[source]
setup_proxies()[source]
update_visual_mode()[source]
add_extra_tab(tab_label, slave)[source]

Adds an extra tab to the editor

Parameters:
  • tab_label – the label that will be display on the tab
  • slave – the slave that will be attached to the new tab
after_client__content_changed(combo)[source]
on_category__content_changed(combo)[source]
on_category_create__clicked(button)[source]
on_category_edit__clicked(button)[source]
on_toggle_status_btn__clicked(button)[source]
on_equip_search_button__clicked(button)[source]
class stoqlib.gui.editors.workordereditor.WorkOrderPackageSendEditor(store, model=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

Editor responsible for creating and sending work order packages

This will create a work order package, add the work orders in it and mark it as sent on confirm.

size = (800, 400)
model_name = u'Send work orders'
model_type

alias of WorkOrderPackage

gladefile = 'WorkOrderPackageSendEditor'
proxy_widgets = ['destination_branch', 'identifier']
search_spec

The spec that will be used to populate the work orders to put in the work order package. It must be a subclass of stoqlib.domain.workorder.WorkOrderView or provide the same api it does.

alias of WorkOrderApprovedAndFinishedView

create_model(store)[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
on_destination_branch__content_changed(branches)[source]
on_workorders__cell_edited(klist, obj, attr)[source]
on_workorders__selection_changed(workorders, selected)[source]
on_workorders__row_activated(workorders, selected)[source]
on_edit_btn__clicked(button)[source]
on_details_btn__clicked(button)[source]