slaves Package

slaves Package

addressslave Module

class stoqlib.gui.slaves.addressslave.CityLocationMixin[source]

Bases: object

A mixin class for city locations

Use this mixin in a multiple inheritance editor to have it’s city location validated and prefilled with right data.

For this to happen, you need to have:
  • A proxy entry for ‘city’ accessible at self.city
  • A proxy entry for ‘state’ accessible at self.state
  • A proxy combo entry for ‘country’ accessible at self.country
setup_proxies()[source]
validate_confirm()[source]
on_state__focus_out_event(entry, event)[source]
on_state__validate(entry, state)[source]
on_city__focus_out_event(entry, event)[source]
on_city__validate(entry, city)[source]
on_city__content_changed(widget)[source]
after_state__content_changed(widget)[source]
after_country__content_changed(widget)[source]
class stoqlib.gui.slaves.addressslave.AddressSlave(store, person, model=None, is_main_address=True, visual_mode=False, db_form=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave, stoqlib.gui.slaves.addressslave.CityLocationMixin

model_type

alias of _AddressModel

gladefile = 'AddressSlave'
proxy_widgets = ['streetnumber', 'district', 'street', 'complement', 'postal_code', 'streetnumber_check', 'city', 'state', 'country']
create_model(store)[source]
set_model(model)[source]

Changes proxy model. This method is used when this slave is attached as a container for the main address and the main address needs to be changed, so this slave must reflect the new address defined.

on_confirm()[source]
setup_proxies()[source]
validate_confirm()[source]
on_streetnumber__validate(entry, streetnumber)[source]
on_streetnumber_check__clicked(check_button)[source]

branchslave Module

General slaves for branch management

class stoqlib.gui.slaves.branchslave.BranchDetailsSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'BranchDetailsSlave'
model_type

alias of Branch

proxy_widgets = ('active_check', 'manager', 'crt', 'can_execute_foreign_work_orders', 'acronym')
crt_options = (('1 - Simples Nacional', 1), ('2 - Simples Nacional \xe2\x80\x93 excesso de sublimite da receita bruta', 2), ('3 - Regime Normal', 3))
setup_proxies()[source]
on_acronym__validate(widget, value)[source]

cashchangeslave Module

Slaves for Cash Change

class stoqlib.gui.slaves.cashchangeslave.CashChangeSlave(store, model, wizard)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

This slave is responsible to calculate paybacks

gladefile = 'CashChangeSlave'
model_type

alias of object

enable_cash_change()[source]
disable_cash_change()[source]
update_total_sale_amount(value)[source]
get_received_value()[source]
can_finish()[source]
on_received_value__validate(widget, value)[source]
on_received_value__content_changed(widget)[source]

clientslave Module

Client editor slaves implementation

class stoqlib.gui.slaves.clientslave.ClientStatusSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_type

alias of Client

gladefile = 'ClientStatusSlave'
proxy_widgets = ('statuses_combo', 'category_combo')
setup_proxies()[source]
class stoqlib.gui.slaves.clientslave.ClientCreditSlave(store, model, visual_mode=False, edit_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_type

alias of Client

gladefile = 'ClientCreditSlave'
proxy_widgets = ('salary', 'credit_limit', 'remaining_store_credit', 'credit_account_balance')
setup_proxies()[source]
on_confirm()[source]
on_credit_limit__validate(entry, value)[source]
after_salary__changed(entry)[source]
on_salary__validate(widget, value)[source]
after_credit_limit__changed(entry)[source]
on_salary_history_button__clicked(button)[source]
on_credit_transactions_button__clicked(button)[source]
on_print_credit_letter__clicked(button)[source]

commissionslave Module

Slaves for commissions

class stoqlib.gui.slaves.commissionslave.CommissionSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave for a sellable(product or service) commission source

gladefile = 'CommissionDataSlave'
model_type

alias of Sellable

proxy_widgets = ('commission_check_btn', 'commission_spin', 'commission_inst_spin')
change_label(new)[source]
setup_proxies()[source]
on_confirm()[source]
on_commission_check_btn__content_changed(widget)[source]
class stoqlib.gui.slaves.commissionslave.CategoryCommissionSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.slaves.commissionslave.CommissionSlave

A slave for category commission source

model_type

alias of SellableCategory

on_commission_check_btn__content_changed(widget)[source]

domainslavemapper Module

A domain to slave singleton mapper

class stoqlib.gui.slaves.domainslavemapper.DefaultDomainSlaveMapper[source]

Bases: object

register(domain, slave_class)[source]
get_slave_class(domain)[source]

employeeslave Module

Employee editor slaves implementation

class stoqlib.gui.slaves.employeeslave.EmployeeDetailsSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'EmployeeDetailsSlave'
model_type

alias of Employee

employee_widgets = ('admission_date', 'registry_number', 'expire_vacation', 'dependent_person_number', 'branch_combo', 'education_level')
bank_account_widgets = ('bank_number', 'bank_account', 'bank_branch')
work_permit_widgets = ('workpermit_number', 'workpermit_serie', 'pis_number', 'pis_registry_date', 'pis_bank')
proxy_widgets = ('admission_date', 'registry_number', 'expire_vacation', 'dependent_person_number', 'branch_combo', 'education_level', 'bank_number', 'bank_account', 'bank_branch', 'workpermit_number', 'workpermit_serie', 'pis_number', 'pis_registry_date', 'pis_bank')
setup_proxies()[source]
class stoqlib.gui.slaves.employeeslave.EmployeeStatusSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'EmployeeStatusSlave'
model_type

alias of Employee

proxy_widgets = ('statuses_combo',)
setup_proxies()[source]
on_confirm()[source]
class stoqlib.gui.slaves.employeeslave.EmployeeRoleSlave(store, employee, edit_mode, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'EmployeeRoleSlave'
model_type

alias of EmployeeRoleHistory

proxy_widgets = ('role', 'salary')
on_confirm()[source]
create_model(store)[source]
setup_proxies()[source]
on_role_editor_button__clicked(*args)[source]
on_salary__validate(widget, value)[source]
after_role__content_changed(widget)[source]
class stoqlib.gui.slaves.employeeslave.EmployeeRoleHistorySlave(employee)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

domain = 'stoq'
gladefile = 'EmployeeRoleHistorySlave'

imageslave Module

Implementation of a generic slave for including images.

class stoqlib.gui.slaves.imageslave.ImageSlave(store, model, sellable=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave for showing and editing images.

Useful for manipulating stoqlib.domain.image.Image obj. This can: Create, change, show and remove the image.

gladefile = 'ImageHolder'
model_type

alias of object

update_view()[source]
create_model(store)[source]
on_eventbox__button_press_event(eventbox, event)[source]
on_eventbox__enter_notify_event(eventbox, event)[source]
on_eventbox__leave_notify_event(eventbox, event)[source]
class stoqlib.gui.slaves.imageslave.ImageGallerySlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

Image gallery slave.

gladefile = 'ImageGallerySlave'
model_type

alias of Sellable

setup_proxies()[source]
on_images_table__realize(table)[source]
on_sw__size_allocate(table, allocation)[source]

paymentconfirmslave Module

Payment confirm slave

class stoqlib.gui.slaves.paymentconfirmslave.SalePaymentConfirmSlave(store, payments, show_till_info=True)[source]

Bases: stoqlib.gui.slaves.paymentconfirmslave._PaymentConfirmSlave

model_type

alias of _ConfirmationModel

help_section = 'account-receivable-receive'
get_till_info_msg()[source]
get_account_destination_combo()[source]
create_model(store)[source]
run_details_dialog()[source]
on_close_date__changed(proxy_date_entry)[source]
class stoqlib.gui.slaves.paymentconfirmslave.PurchasePaymentConfirmSlave(store, payments, show_till_info=True)[source]

Bases: stoqlib.gui.slaves.paymentconfirmslave._PaymentConfirmSlave

model_type

alias of _ConfirmationModel

help_section = 'account-payable-pay'
get_till_info_msg()[source]
get_account_destination_combo()[source]
create_model(store)[source]
run_details_dialog()[source]

paymentmethodslave Module

Slaves for payment methods management

class stoqlib.gui.slaves.paymentmethodslave.SelectPaymentMethodSlave(store=None, payment_type=None, default_method=None, no_payments=False)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

domain = 'stoq'
gladefile = 'SelectPaymentMethodSlave'
get_selected_method()[source]
method_set_sensitive(method_name, sensitive)[source]
method_set_visible(method_name, visible)[source]
set_client(client, total_amount)[source]

paymentslave Module

Slaves for payment creation

This slaves will be used when payments are being created.

class stoqlib.gui.slaves.paymentslave.CheckDataEditor(model)[source]

Bases: stoqlib.gui.slaves.paymentslave._BasePaymentDataEditor

An editor to set payment information of check payment method.

setup_slaves()[source]
class stoqlib.gui.slaves.paymentslave.BankDataSlave(model)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A simple slave that contains only a hbox with fields to bank name and its branch. This slave is used by payment method slaves that has reference to a BankAccount object.

gladefile = 'BankDataSlave'
model_type

alias of _TemporaryBankData

proxy_widgets = ('bank_number', 'bank_branch', 'bank_account')
setup_proxies()[source]
class stoqlib.gui.slaves.paymentslave.PaymentListSlave(payment_type, group, branch, method, total_value, editor_class, parent, temporary_identifiers=False)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

A slave to manage payments with one/multiple installment(s)

domain = 'stoq'
gladefile = 'PaymentListSlave'
update_view()[source]
add_payment(description, value, due_date, payment_number=None, bank_account=None, refresh=True)[source]

Add a payment to the list

add_payments(installments_number, start_date, interval, interval_type, bank_id=None, bank_branch=None, bank_account=None, bank_first_number=None)[source]
create_payments()[source]

Commit the payments on the list to the database

clear_payments()[source]
get_total_difference()[source]
are_due_dates_valid()[source]
are_payment_values_valid()[source]
is_check_number_valid()[source]

Verify if check number is set

is_payment_list_valid()[source]
on_payment_list__row_activated(*args)[source]
class stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A base payment method slave for Bill and Check methods.

gladefile = 'BasePaymentMethodSlave'
model_type

alias of _BaseTemporaryMethodData

data_editor_class

alias of _BasePaymentDataEditor

slave_holder = 'slave_holder'
proxy_widgets = ('interval_type_combo', 'intervals', 'first_duedate', 'installments_number', 'bank_id', 'bank_branch', 'bank_account', 'bank_first_check_number')
setup_payments()[source]

Setup the payments in PaymentList.

Note: The payments are not inserted into the db until self.finish() is called. The wizard is responsable for that

update_view()[source]
finish()[source]

This method is called by the wizard when going to a next step. If it returns False, the wizard can’t go on.

has_next_step()[source]
next_step()[source]
setup_proxies()[source]
create_model(store)[source]
after_installments_number__changed(*args)[source]
after_intervals__changed(*args)[source]
after_interval_type_combo__changed(*args)[source]
after_first_duedate__changed(*args)[source]
after_bank_id__changed(widget)[source]
after_bank_branch__changed(widget)[source]
after_bank_account__changed(widget)[source]
after_bank_first_check_number__changed(widget)[source]
on_installments_number__validate(widget, value)[source]
on_first_duedate__validate(widget, value)[source]
class stoqlib.gui.slaves.paymentslave.BillMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Bill method slave

class stoqlib.gui.slaves.paymentslave.CheckMethodSlave(wizard, parent, store, total_amount, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Check method slave

data_editor_class

alias of CheckDataEditor

class stoqlib.gui.slaves.paymentslave.DepositMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Deposit method slave

class stoqlib.gui.slaves.paymentslave.StoreCreditMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Store credit method slave

class stoqlib.gui.slaves.paymentslave.MoneyMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Money method slave

class stoqlib.gui.slaves.paymentslave.CreditMethodSlave(wizard, parent, store, order_obj, payment_method, outstanding_value=<currency $0>, first_duedate=None, installments_number=None, temporary_identifiers=False)[source]

Bases: stoqlib.gui.slaves.paymentslave.BasePaymentMethodSlave

Credit method slave

class stoqlib.gui.slaves.paymentslave.CardMethodSlave(wizard, parent, store, order, payment_method, outstanding_value=<currency $0>)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A base payment method slave for card and finance methods. Available slaves are: CardMethodSlave

gladefile = 'CreditProviderMethodSlave'
model_type

alias of _TemporaryCreditProviderGroupData

proxy_widgets = ('card_device', 'credit_provider', 'installments_number', 'auth_number')
finish()[source]
update_view()[source]
has_next_step()[source]
setup_proxies()[source]
create_model(store)[source]
on_credit_provider__changed(combo)[source]
on_card_device__changed(combo)[source]
on_installments_number__validate(entry, installments)[source]
on_auth_number__validate(entry, value)[source]
class stoqlib.gui.slaves.paymentslave.MultipleMethodSlave(wizard, parent, store, order, payment_method=None, outstanding_value=<currency $0>, finish_on_total=True, allow_remove_paid=True, require_total_value=True)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A base payment method slave for multiple payments

This slave is used to create/edit payments for an order in a wizard and should be attached to a step. It will have a list with all the order’s payments and the possibility to remove each of them and add new ones.

Useful to create payments in any method you want where their sums with the existing payments should match the total (that is, the outstanding_value or the model’s total value). Note that some arguments passed to __init__ will drastically modify the behaviour of this slave.

Hint: When adding an amount of money greater than the actual outstanding value, the actual value that will be added is the outstanding value, so be prepared to give some change

gladefile = 'MultipleMethodSlave'
model_type

alias of object

setup_proxies()[source]
update_view()[source]
finish()[source]
has_next_step()[source]
toggle_new_payments()[source]

Toggle new payments addition interface.

This method verifies if its possible to add more payments (if the total value is already reached), and enables or disables the value entry and add button.

enable_remove()[source]
can_confirm()[source]
on_add_button__clicked(widget)[source]
on_remove_button__clicked(button)[source]
on_payments__selection_changed(objectlist, payment)[source]
on_value__activate(entry)[source]
on_value__changed(entry)[source]
on_value__validate(entry, value)[source]
stoqlib.gui.slaves.paymentslave.register_payment_slaves()[source]

productionslave Module

Slaves for production

class stoqlib.gui.slaves.productionslave.ProductionMaterialListSlave(store, model, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductionMaterialListSlave'
model_type

alias of ProductionOrder

validate_confirm()[source]
reload_materials()[source]

Reloads the material list if needed.

on_materials__selection_changed(widget, material)[source]
on_materials__double_click(widget, material)[source]
on_edit_button__clicked(widget)[source]
class stoqlib.gui.slaves.productionslave.QualityTestResultSlave(store)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_name = 'Quality Test Result'
model_type

alias of Settable

gladefile = 'QualityTestResultSlave'
proxy_widgets = ['quality_test', 'decimal_value', 'boolean_value']
test_type
setup_proxies()[source]
create_model(store)[source]
set_item_tests(items, product)[source]
apply()[source]
after_quality_test__changed(widget)[source]
after_boolean_value__changed(widget)[source]
after_decimal_value__changed(widget)[source]
on_apply_button__clicked(widget)[source]
class stoqlib.gui.slaves.productionslave.ProducedItemSlave(store, parent)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave that shows produced production items.

gladefile = 'ProducedItemSlave'
model_type

alias of Settable

proxy_widgets = ['serial_number']
create_model(store)[source]
setup_proxies()[source]
on_serial_number__validate(widget, value)[source]

productslave Module

Slaves for products

class stoqlib.gui.slaves.productslave.ProductAttributeSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductAttributeSlave'
model_type

alias of object

setup_proxies()[source]
get_selected_attributes()[source]
on_attribute_group__content_changed(widget)[source]
class stoqlib.gui.slaves.productslave.ProductGridSlave(store, model, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductGridSlave'
model_type

alias of Product

can_add()[source]
setup_proxies()[source]
on_add_product_button__clicked(widget)[source]
class stoqlib.gui.slaves.productslave.ProductInformationSlave(store, model, db_form=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductInformationSlave'
model_type

alias of Product

proxy_widgets = ['location', 'part_number', 'manufacturer', 'width', 'height', 'depth', 'weight', 'ncm', 'ex_tipi', 'genero', 'product_model', 'brand', 'family', 'internal_use']
storable_widgets = ['minimum_quantity', 'maximum_quantity']
setup_proxies()[source]
update_visual_mode()[source]
hide_stock_details()[source]
on_width__validate(widget, value)[source]
on_height__validate(widget, value)[source]
on_depth__validate(widget, value)[source]
on_weight__validate(widget, value)[source]
on_ncm__validate(widget, value)[source]
on_ex_tipi__validate(widget, value)[source]
on_genero__validate(widget, value)[source]
on_minimum_quantity__validate(widget, value)[source]
on_maximum_quantity__validate(widget, value)[source]
class stoqlib.gui.slaves.productslave.ProductTaxSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductTaxSlave'
model_type

alias of Product

proxy_widgets = ['icms_template', 'ipi_template', 'pis_template', 'cofins_template']
update_visual_mode()[source]
setup_proxies()[source]
class stoqlib.gui.slaves.productslave.ProductComponentSlave(store, product=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ProductComponentSlave'
model_type

alias of TemporaryProductComponent

proxy_widgets = ['production_time', 'yield_quantity']
setup_proxies()[source]
create_model(store)[source]
on_confirm()[source]
validate_confirm()[source]
get_component_cost()[source]
on_yield_quantity__validate(widget, value)[source]
after_yield_quantity__changed(widget)[source]
on_component_combo__content_changed(widget)[source]
on_component_tree__selection_changed(widget, value)[source]
on_component_tree__row_activated(widget, selected)[source]
on_component_tree__row_expanded(widget, value)[source]
on_add_button__clicked(widget)[source]
on_edit_button__clicked(widget)[source]
on_remove_button__clicked(widget)[source]
on_sort_components_check__toggled(widget)[source]
class stoqlib.gui.slaves.productslave.ProductPackageSlave(store, product=None, visual_mode=False)[source]

Bases: stoqlib.gui.slaves.productslave.ProductComponentSlave

class stoqlib.gui.slaves.productslave.ProductQualityTestSlave(parent, store, product, visual_mode=False, reuse_store=True)[source]

Bases: stoqlib.gui.base.lists.ModelListSlave

model_type

alias of ProductQualityTest

editor_class

alias of QualityTestEditor

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': '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: {'_objectlist': None, '_property_helper_attribute': 'success_value_str', '_data_type': <type 'str'>, 'from_string': <bound method _StringConverter.from_string of <kiwi.datatypes._StringConverter object at 0x7f2cd15b7e10>>, '_property_helper_title': 'Success Value'}>]
populate()[source]
run_editor(store, model)[source]
remove_item(item)[source]
class stoqlib.gui.slaves.productslave.ProductSupplierSlave(store, product, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseRelationshipEditorSlave

A slave for changing the suppliers for a product.

target_name = u'Supplier'
editor

alias of ProductSupplierEditor

model_type

alias of ProductSupplierInfo

get_targets()[source]
get_relations()[source]
get_columns()[source]
create_model()[source]

receivingslave Module

Purchase receiving slaves implementation

class stoqlib.gui.slaves.receivingslave.ReceivingInvoiceSlave(store, model, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_type

alias of ReceivingOrder

gladefile = 'ReceivingInvoiceSlave'
proxy_widgets = ('transporter', 'responsible_name', 'products_total', 'freight_combo', 'freight', 'ipi', 'cfop', 'branch', 'supplier_label', 'total', 'invoice_number', 'icms_total', 'discount_value', 'secure_value', 'expense_value')
create_freight_payment()[source]

Tells if we should create a separate payment for freight or not

It should return True or False. If True is returned, a separate payment will be created for freight. If not, it’ll be included on installments.

update_visual_mode()[source]
setup_proxies()[source]
on_invoice_number__activate(widget)[source]
on_freight__activate(widget)[source]
on_ipi__activate(widget)[source]
on_icms_total__activate(widget)[source]
on_discount_value__activate(widget)[source]
on_secure_value__activate(widget)[source]
on_expense_value__activate(widget)[source]
on_freight__validate(widget, value)
on_ipi__validate(widget, value)
on_icms_total__validate(widget, value)
on_secure_value__validate(widget, value)
on_expense_value__validate(widget, value)
on_observations_button__clicked(*args)[source]
on_invoice_number__validate(widget, value)[source]
after_freight_combo__content_changed(widget)[source]
after_freight__content_changed(widget)[source]
after_ipi__content_changed(widget)[source]
after_discount_value__content_changed(widget)[source]
after_discount_value__validate(widget, value)[source]
after_secure_value__content_changed(widget)[source]
after_expense_value__content_changed(widget)[source]

saleslave Module

Slaves for sale management

class stoqlib.gui.slaves.saleslave.SaleDiscountSlave(store, model, model_type, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave for discounts management

gladefile = 'SaleDiscountSlave'
proxy_widgets = ('discount_value', 'discount_perc')
setup_widgets()[source]
update_widget_status()[source]
update_max_discount()[source]
update_sale_discount()[source]
set_max_discount(discount)[source]

Set the maximum percentage value for a discount. :param discount: the value for a discount. :type discount: int in absolute value like 3

setup_proxies()[source]
on_discount_perc__validate(entry, value)[source]
on_discount_value__validate(entry, value)[source]
on_discount_perc__icon_press(entry, icon_pos, event)[source]
on_discount_value__icon_press(entry, icon_pos, event)[source]
after_discount_perc__changed(view, *args, **kwargs)
after_discount_value__changed(view, *args, **kwargs)
on_discount_value_ck__toggled(*args)[source]
class stoqlib.gui.slaves.saleslave.SaleListToolbar(store, sales, parent=None)[source]

Bases: kiwi.ui.delegates.GladeSlaveDelegate

A simple sale toolbar with common operations like, returning a sale, changing installments and showing its details.

domain = 'stoq'
gladefile = 'SaleListToolbar'
update_buttons()[source]
set_report_filters(filters)[source]
edit(sale_view=None)[source]
show_details(sale_view=None)[source]
print_sale()[source]
return_sale()[source]
on_sales__has_rows(klist, enabled)[source]
on_sales__selection_changed(sales, sale)[source]
on_sales__row_activated(sales, sale)[source]
on_return_sale_button__clicked(button)[source]
on_edit_button__clicked(button)[source]
on_details_button__clicked(button)[source]
on_print_button__clicked(button)[source]
stoqlib.gui.slaves.saleslave.cancel_sale(sale, reason)[source]
stoqlib.gui.slaves.saleslave.return_sale(parent, sale, store)[source]

sellableslave Module

Slaves for sellables

class stoqlib.gui.slaves.sellableslave.SellableDetailsSlave(store, model=None, db_form=None, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

This is base slave for product or service details.

gladefile = 'SellableDetailsSlave'
proxy_widgets = ['notes']
model_type

alias of Sellable

image_model = None
setup_proxies()[source]
class stoqlib.gui.slaves.sellableslave.CategoryPriceSlave(store, sellable, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseRelationshipEditorSlave

A slave for changing the suppliers for a product.

target_name = u'Category'
editor

alias of CategoryPriceEditor

model_type

alias of ClientCategoryPrice

get_targets()[source]
get_relations()[source]
get_columns()[source]
create_model()[source]
class stoqlib.gui.slaves.sellableslave.OnSaleInfoSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave for price and dates information when a certain product or service is on sale.

gladefile = 'OnSaleInfoSlave'
model_type

alias of Sellable

proxy_widgets = ('on_sale_price', 'on_sale_start_date', 'on_sale_end_date')
setup_proxies()[source]
on_on_sale_price__validate(entry, value)[source]

serviceslave Module

class stoqlib.gui.slaves.serviceslave.ServiceFiscalSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'ServiceFiscalSlave'
model_type

alias of Service

proxy_widgets = ['service_list_combo', 'p_iss', 'city_taxation_code']
setup_proxies()[source]

supplierslave Module

Supplier editor slaves implementation

class stoqlib.gui.slaves.supplierslave.SupplierDetailsSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_type

alias of Supplier

gladefile = 'SupplierDetailsSlave'
proxy_widgets = ('statuses_combo', 'product_desc')
setup_proxies()[source]

taxslave Module

Slaves for books

class stoqlib.gui.slaves.taxslave.BaseTaxSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

combo_widgets = ()
percentage_widgets = ()
value_widgets = ()
hide_widgets = ()
tooltips = {}
field_options = {}
setup_callbacks()[source]

Implement this in a child when necessary

set_valid_widgets(valid_widgets)[source]
class stoqlib.gui.slaves.taxslave.InvoiceItemMixin[source]

Bases: object

fill_combo(combo, type)[source]
on_template__changed(widget)[source]
class stoqlib.gui.slaves.taxslave.BaseICMSSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseTaxSlave

gladefile = 'TaxICMSSlave'
combo_widgets = ['cst', 'csosn', 'orig', 'mod_bc', 'mod_bc_st']
percentage_widgets = ['p_icms', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'p_red_bc', 'p_cred_sn']
value_widgets = ['v_bc', 'v_icms', 'v_bc_st', 'v_icms_st', 'v_cred_icms_sn', 'v_bc_st_ret', 'v_icms_st_ret']
bool_widgets = ['bc_include_ipi', 'bc_st_include_ipi']
date_widgets = ['p_cred_sn_valid_until']
all_widgets = ['cst', 'csosn', 'orig', 'mod_bc', 'mod_bc_st', 'p_icms', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'p_red_bc', 'p_cred_sn', 'v_bc', 'v_icms', 'v_bc_st', 'v_icms_st', 'v_cred_icms_sn', 'v_bc_st_ret', 'v_icms_st_ret', 'bc_include_ipi', 'bc_st_include_ipi', 'p_cred_sn_valid_until']
simples_widgets = (['orig', 'csosn', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'p_cred_sn', 'p_cred_sn_valid_untilv_cred_icms_sn', 'v_bc_st_ret', 'v_icms_st_ret'],)
normal_widgets = ['orig', 'cst', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'bc_st_include_ipi', 'mod_bc', 'p_icms', 'v_bc', 'v_icms', 'p_red_bc', 'bc_include_ipi', 'bc_st_include_ipi']
tooltips = {'p_red_bc_st': u'Percentual da Redu\xe7\xe3o de Base de C\xe1lculo do ICMS ST', 'p_icms': u'Aliquota do imposto', 'p_mva_st': u'Percentual da margem de valor adicionado do ICMS ST'}
field_options = {'cst': ((None, None), (u'00 - Tributada Integralmente', 0), (u'10 - Tributada e com cobran\xe7a de ICMS por subst. trib.', 10), (u'20 - Com redu\xe7\xe3o de BC', 20), (u'30 - Isenta ou n\xe3o trib. e com cobran\xe7a de ICMS por subst. trib.', 30), (u'40 - Isenta', 40), (u'41 - N\xe3o tributada', 41), (u'50 - Suspens\xe3o', 50), (u'51 - Deferimento', 51), (u'60 - ICMS cobrado anteriormente por subst. trib.', 60), (u'70 - Com redu\xe7\xe3o da BC cobran\xe7a do ICMS por subst. trib.', 70), (u'90 - Outros', 90)), 'csosn': ((None, None), (u'101 - Tributada com permiss\xe3o de cr\xe9dito', 101), (u'102 - Tributada sem permiss\xe3o de cr\xe9dito', 102), (u'103 - Isen\xe7\xe3o do ICMS para faixa de receita bruta', 103), (u'201 - Tributada com permiss\xe3o de cr\xe9dito e com cobran\xe7a do ICMS por ST', 201), (u'202 - Tributada sem permiss\xe3o de cr\xe9dito e com cobran\xe7a do ICMS por ST', 202), (u'203 - Isen\xe7\xe3o do ICMS para faixa de receita bruta e com cobran\xe7a do ICMS por ST', 203), (u'300 - Imune', 300), (u'400 - N\xe3o tributada', 400), (u'500 - ICMS cobrado anteriormente por ST ou por antecipa\xe7\xe3o', 500), (u'900 - Outros', 900)), 'mod_bc': ((None, None), (u'0 - Margem do valor agregado (%)', 0), (u'1 - Pauta (Valor)', 1), (u'2 - Pre\xe7o tabelado m\xe1ximo (valor)', 2), (u'3 - Valor da opera\xe7\xe3o', 3)), 'mod_bc_st': ((None, None), (u'0 - Pre\xe7o tabelado ou m\xe1ximo sugerido', 0), (u'1 - Lista negativa (valor)', 1), (u'2 - Lista positiva (valor)', 2), (u'3 - Lista neutra (valor)', 3), (u'4 - Margem Valor Agregado (%)', 4), (u'5 - Pauta (valor)', 5)), 'orig': ((None, None), (u'0 - Nacional, exceto as indicadas nos c\xf3digos 3, 4, 5 e 8', 0), (u'1 - Estrangeira - Importa\xe7\xe3o direta, exceto a indicada no c\xf3digo 6', 1), (u'2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no c\xf3digo 7', 2), (u'3 - Nacional, mercadoria ou bem com Conte\xfado de Importa\xe7\xe3o superior a 40% e inferior ou igual a 70%', 3), (u'4 - Nacional, cuja produ\xe7\xe3o tenha sido feita em conformidade com os processos produtivos b\xe1sicos', 4), (u'5 - Nacional, mercadoria ou bem com Conte\xfado de Importa\xe7\xe3o inferior ou igual a 40%', 5), (u'6 - Estrangeira - Importa\xe7\xe3o direta, sem similar nacional, constante na CAMEX', 6), (u'7 - Estrangeira - Adquirida no mercado interno, sem similar nacional, constante na CAMEX', 7), (u'8 - Nacional, mercadoria ou bem com Conte\xfado de Importa\xe7\xe3o superior a 70%', 8))}
MAP_VALID_WIDGETS = {0: ['orig', 'cst', 'mod_bc', 'p_icms', 'v_bc', 'v_icms', 'bc_include_ipi'], 900: ['orig', 'csosn', 'mod_bc', 'v_bc', 'p_red_bc', 'p_icms', 'v_icms', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'v_bc_st', 'p_icms_st', 'v_icms_st', 'p_cred_sn', 'v_cred_icms_sn'], 101: ['orig', 'csosn', 'p_cred_sn', 'p_cred_sn_valid_until', 'v_cred_icms_sn'], 70: ['orig', 'cst', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'bc_st_include_ipi', 'mod_bc', 'p_icms', 'v_bc', 'v_icms', 'p_red_bc', 'bc_include_ipi', 'bc_st_include_ipi'], 103: ['orig', 'csosn'], 40: ['orig', 'cst'], 41: ['orig', 'cst'], 10: ['orig', 'cst', 'mod_bc', 'p_icms', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc', 'v_icms', 'v_bc_st', 'v_icms_st', 'bc_include_ipi', 'bc_st_include_ipi'], 203: ['orig', 'csosn', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st'], 300: ['orig', 'csosn'], 400: ['orig', 'csosn'], 50: ['orig', 'cst'], 51: ['orig', 'cst', 'mod_bc', 'p_red_bc', 'p_icms', 'v_bc', 'v_icms', 'bc_st_include_ipi'], 20: ['orig', 'cst', 'mod_bc', 'p_icms', 'p_red_bc', 'v_bc', 'v_icms', 'bc_include_ipi'], 201: ['orig', 'csosn', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'p_cred_sn', 'p_cred_sn_valid_until', 'v_cred_icms_sn'], 202: ['orig', 'csosn', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st'], 500: ['orig', 'csosn', 'v_bc_st_ret', 'v_icms_st_ret'], 90: ['orig', 'cst', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'bc_st_include_ipi', 'mod_bc', 'p_icms', 'v_bc', 'v_icms', 'p_red_bc', 'bc_include_ipi', 'bc_st_include_ipi'], 60: ['orig', 'cst', 'v_bc_st', 'v_icms_st'], 102: ['orig', 'csosn'], 30: ['orig', 'cst', 'mod_bc_st', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'v_bc_st', 'v_icms_st', 'bc_st_include_ipi']}
setup_proxies()[source]
on_cst__changed(widget)[source]
on_csosn__changed(widget)[source]
after_p_cred_sn__changed(widget)[source]
on_p_cred_sn_valid_until__validate(widget, value)[source]
class stoqlib.gui.slaves.taxslave.ICMSTemplateSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseICMSSlave

model_type

alias of ProductIcmsTemplate

proxy_widgets = ['cst', 'csosn', 'orig', 'mod_bc', 'mod_bc_st', 'p_icms', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'p_red_bc', 'p_cred_sn', 'bc_include_ipi', 'bc_st_include_ipi', 'p_cred_sn_valid_until']
hide_widgets = ['v_bc', 'v_icms', 'v_bc_st', 'v_icms_st', 'v_cred_icms_sn', 'v_bc_st_ret', 'v_icms_st_ret', 'template']
class stoqlib.gui.slaves.taxslave.InvoiceItemIcmsSlave(store, model, invoice_item)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseICMSSlave, stoqlib.gui.slaves.taxslave.InvoiceItemMixin

model_type

alias of InvoiceItemIcms

proxy_widgets = ['cst', 'csosn', 'orig', 'mod_bc', 'mod_bc_st', 'p_icms', 'p_mva_st', 'p_red_bc_st', 'p_icms_st', 'p_red_bc', 'p_cred_sn', 'bc_include_ipi', 'bc_st_include_ipi', 'v_bc', 'v_icms', 'v_bc_st', 'v_icms_st', 'v_cred_icms_sn', 'v_bc_st_ret', 'v_icms_st_ret']
hide_widgets = ['p_cred_sn_valid_until']
setup_callbacks()[source]
update_values(widgets=None)[source]
class stoqlib.gui.slaves.taxslave.BaseIPISlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseTaxSlave

gladefile = 'TaxIPISlave'
combo_widgets = ['cst', 'calculo']
percentage_widgets = ['p_ipi']
text_widgets = ['cl_enq', 'cnpj_prod', 'c_selo', 'c_enq']
value_widgets = ['v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid']
all_widgets = ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq']
tooltips = {'c_selo': u'Preenchimento conforme Atos Normativos editados pela Receita Federal (Observa\xe7\xe3o 3)', 'cl_enq': u'Preenchimento conforme Atos Normativos editados pela Receita Federal (Observa\xe7\xe3o 4)', 'c_enq': u'Tabela a ser criada pela RFB, informar 999 enquanto a tabela n\xe3o for criada', 'cnpj_prod': u'Informar os zeros n\xe3o significativos'}
field_options = {'cst': ((None, None), (u'00 - Entrada com recupera\xe7\xe3o de cr\xe9dito', 0), (u'01 - Entrada tributada com al\xedquota zero', 1), (u'02 - Entrada isenta', 2), (u'03 - Entrada n\xe3o-tributada', 3), (u'04 - Entrada imune', 4), (u'05 - Entrada com suspens\xe3o', 5), (u'49 - Outras entradas', 49), (u'50 - Sa\xedda tributada', 50), (u'51 - Sa\xedda tributada com al\xedquota zero', 51), (u'52 - Sa\xedda isenta', 52), (u'53 - Sa\xedda n\xe3o-tributada', 53), (u'54 - Sa\xedda imune', 54), (u'55 - Sa\xedda com suspens\xe3o', 55), (u'99 - Outras sa\xeddas', 99)), 'calculo': ((u'Por al\xedquota', u'aliquot'), (u'Valor por unidade', u'unit'))}
MAP_VALID_WIDGETS = {0: ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq'], 1: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 2: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 3: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 4: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 5: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 99: ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq'], 49: ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq'], 50: ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq'], 51: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 52: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 53: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 54: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq'], 55: ['cst', 'cl_enq', 'cnpj_prod', 'c_selo', 'q_selo', 'c_enq']}
setup_proxies()[source]
on_cst__changed(widget)[source]
on_calculo__changed(widget)[source]
class stoqlib.gui.slaves.taxslave.IPITemplateSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseIPISlave

model_type

alias of ProductIpiTemplate

proxy_widgets = ['cst', 'calculo', 'p_ipi', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq']
hide_widgets = ['v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'template']
class stoqlib.gui.slaves.taxslave.InvoiceItemIpiSlave(store, model, invoice_item)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseIPISlave, stoqlib.gui.slaves.taxslave.InvoiceItemMixin

model_type

alias of InvoiceItemIpi

proxy_widgets = ['cst', 'calculo', 'p_ipi', 'v_ipi', 'v_bc', 'v_unid', 'q_selo', 'q_unid', 'cl_enq', 'cnpj_prod', 'c_selo', 'c_enq']
setup_callbacks()[source]
update_values(widgets=None)[source]
class stoqlib.gui.slaves.taxslave.BasePISSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseTaxSlave

gladefile = 'TaxPISSlave'
combo_widgets = ['cst', 'calculo']
percentage_widgets = ['p_pis']
value_widgets = ['v_pis']
all_widgets = ['cst', 'calculo', 'p_pis', 'v_pis']
field_options = {'cst': ((None, 0), (u'01 - Tribut\xe1vel com Al\xedquota B\xe1sica', 1), (u'02 - Tribut\xe1vel com Al\xedquota Difenrenciada', 2), (u'04 - Tribut\xe1vel Monof\xe1sica - Revenda a Al\xedquota Zero', 4), (u'05 - Tribut\xe1vel por Substitui\xe7\xe3o Tribut\xe1ria', 5), (u'06 - Tribut\xe1vel a Al\xedquota Zero', 6), (u'07 - Isenta da Contribui\xe7\xe3o', 7), (u'08 - Sem Incid\xeancia da Contribui\xe7\xe3o', 8), (u'09 - Com Suspens\xe3o da Contribui\xe7\xe3o', 9), (u'49 - Outras Opera\xe7\xf5es de Sa\xedda', 49), (u'50 - Com Direito a Cr\xe9dito - Vinculada Exclusivamente a ReceitaTributada no Mercado Interno', 50), (u'51 - Opera\xe7\xe3o com Direito a Cr\xe9dito \u2013 Vinculada Exclusivamente aReceita N\xe3o Tributada no Mercado Interno', 51), (u'52 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada Exclusivamente aReceita de Exporta\xe7\xe3o', 52), (u'53 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas e N\xe3o-Tributadas no Mercado Interno', 53), (u'54 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas no Mercado Interno e de Exporta\xe7\xe3o', 54), (u'55 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasN\xe3o-Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 55), (u'56 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas e N\xe3o-Tributadas no Mercado Interno, e de Exporta\xe7\xe3o', 56), (u'60 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita Tributada no Mercado Interno', 60), (u'61 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita N\xe3o-Tributada no Mercado Interno', 61), (u'62 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita de Exporta\xe7\xe3o', 62), (u'63 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas e N\xe3o-Tributadas no Mercado Interno', 63), (u'64 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 64), (u'65 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas N\xe3o-Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 65), (u'66 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas e N\xe3o-Tributadas no Mercado Interno, e deExporta\xe7\xe3o', 66), (u'67 - Cr\xe9dito Presumido - Outras Opera\xe7\xf5es', 67), (u'70 - Opera\xe7\xe3o de Aquisi\xe7\xe3o sem Direito a Cr\xe9dito', 70), (u'71 - Opera\xe7\xe3o de Aquisi\xe7\xe3o com Isen\xe7\xe3o', 71), (u'72 - Opera\xe7\xe3o de Aquisi\xe7\xe3o com Suspens\xe3o', 72), (u'73 - Opera\xe7\xe3o de Aquisi\xe7\xe3o a Al\xedquota Zero', 73), (u'74 - Opera\xe7\xe3o de Aquisi\xe7\xe3o sem Incid\xeancia da Contribui\xe7\xe3o', 74), (u'75 - Opera\xe7\xe3o de Aquisi\xe7\xe3o por Substitui\xe7\xe3o Tribut\xe1ria', 75), (u'98 - Outras Opera\xe7\xf5es de Entrada', 98), (u'99 - Outras Opera\xe7\xf5es', 99)), 'calculo': ((u'Percentual', 'percentage'),)}
MAP_VALID_WIDGETS = {0: ['cst'], 1: ['cst', 'p_pis'], 2: ['cst', 'p_pis'], 67: ['cst', 'calculo', 'p_pis'], 4: ['cst'], 5: ['cst'], 6: ['cst'], 7: ['cst'], 8: ['cst'], 9: ['cst'], 74: ['cst', 'calculo', 'p_pis'], 75: ['cst', 'calculo', 'p_pis'], 66: ['cst', 'calculo', 'p_pis'], 73: ['cst', 'calculo', 'p_pis'], 72: ['cst', 'calculo', 'p_pis'], 98: ['cst', 'calculo', 'p_pis'], 99: ['cst', 'calculo', 'p_pis'], 70: ['cst', 'calculo', 'p_pis'], 65: ['cst', 'calculo', 'p_pis'], 64: ['cst', 'calculo', 'p_pis'], 71: ['cst', 'calculo', 'p_pis'], 49: ['cst', 'calculo', 'p_pis'], 50: ['cst', 'calculo', 'p_pis'], 51: ['cst', 'calculo', 'p_pis'], 52: ['cst', 'calculo', 'p_pis'], 53: ['cst', 'calculo', 'p_pis'], 54: ['cst', 'calculo', 'p_pis'], 55: ['cst', 'calculo', 'p_pis'], 56: ['cst', 'calculo', 'p_pis'], 60: ['cst', 'calculo', 'p_pis'], 61: ['cst', 'calculo', 'p_pis'], 62: ['cst', 'calculo', 'p_pis'], 63: ['cst', 'calculo', 'p_pis']}
setup_proxies()[source]
on_cst__changed(widget)[source]
on_calculo__changed(widget)[source]
on_p_pis__validate(widget, value)[source]
class stoqlib.gui.slaves.taxslave.PISTemplateSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BasePISSlave

model_type

alias of ProductPisTemplate

proxy_widgets = ['cst', 'calculo', 'p_pis']
hide_widgets = ['v_pis', 'template']
class stoqlib.gui.slaves.taxslave.InvoiceItemPisSlave(store, model, invoice_item)[source]

Bases: stoqlib.gui.slaves.taxslave.BasePISSlave, stoqlib.gui.slaves.taxslave.InvoiceItemMixin

model_type

alias of InvoiceItemPis

proxy_widgets = ['cst', 'calculo', 'p_pis', 'v_pis']
create_model(store)[source]
setup_callbacks()[source]
update_values(widgets=None)[source]
class stoqlib.gui.slaves.taxslave.BaseCOFINSSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseTaxSlave

gladefile = 'TaxCOFINSSlave'
combo_widgets = ['cst', 'calculo']
percentage_widgets = ['p_cofins']
value_widgets = ['v_cofins']
all_widgets = ['cst', 'calculo', 'p_cofins', 'v_cofins']
field_options = {'cst': ((None, 0), (u'01 - Tribut\xe1vel com Al\xedquota B\xe1sica', 1), (u'02 - Tribut\xe1vel com Al\xedquota Difenrenciada', 2), (u'04 - Tribut\xe1vel Monof\xe1sica - Revenda a Al\xedquota Zero', 4), (u'05 - Tribut\xe1vel por Substitui\xe7\xe3o Tribut\xe1ria', 5), (u'06 - Tribut\xe1vel a Al\xedquota Zero', 6), (u'07 - Isenta da Contribui\xe7\xe3o', 7), (u'08 - Sem Incid\xeancia da Contribui\xe7\xe3o', 8), (u'09 - Com Suspens\xe3o da Contribui\xe7\xe3o', 9), (u'49 - Outras Opera\xe7\xf5es de Sa\xedda', 49), (u'50 - Com Direito a Cr\xe9dito - Vinculada Exclusivamente a ReceitaTributada no Mercado Interno', 50), (u'51 - Opera\xe7\xe3o com Direito a Cr\xe9dito \u2013 Vinculada Exclusivamente aReceita N\xe3o Tributada no Mercado Interno', 51), (u'52 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada Exclusivamente aReceita de Exporta\xe7\xe3o', 52), (u'53 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas e N\xe3o-Tributadas no Mercado Interno', 53), (u'54 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas no Mercado Interno e de Exporta\xe7\xe3o', 54), (u'55 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasN\xe3o-Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 55), (u'56 - Opera\xe7\xe3o com Direito a Cr\xe9dito - Vinculada a ReceitasTributadas e N\xe3o-Tributadas no Mercado Interno, e de Exporta\xe7\xe3o', 56), (u'60 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita Tributada no Mercado Interno', 60), (u'61 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita N\xe3o-Tributada no Mercado Interno', 61), (u'62 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o VinculadaExclusivamente a Receita de Exporta\xe7\xe3o', 62), (u'63 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas e N\xe3o-Tributadas no Mercado Interno', 63), (u'64 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 64), (u'65 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas N\xe3o-Tributadas no Mercado Interno e de Exporta\xe7\xe3o', 65), (u'66 - Cr\xe9dito Presumido - Opera\xe7\xe3o de Aquisi\xe7\xe3o Vinculada aReceitas Tributadas e N\xe3o-Tributadas no Mercado Interno, e deExporta\xe7\xe3o', 66), (u'67 - Cr\xe9dito Presumido - Outras Opera\xe7\xf5es', 67), (u'70 - Opera\xe7\xe3o de Aquisi\xe7\xe3o sem Direito a Cr\xe9dito', 70), (u'71 - Opera\xe7\xe3o de Aquisi\xe7\xe3o com Isen\xe7\xe3o', 71), (u'72 - Opera\xe7\xe3o de Aquisi\xe7\xe3o com Suspens\xe3o', 72), (u'73 - Opera\xe7\xe3o de Aquisi\xe7\xe3o a Al\xedquota Zero', 73), (u'74 - Opera\xe7\xe3o de Aquisi\xe7\xe3o sem Incid\xeancia da Contribui\xe7\xe3o', 74), (u'75 - Opera\xe7\xe3o de Aquisi\xe7\xe3o por Substitui\xe7\xe3o Tribut\xe1ria', 75), (u'98 - Outras Opera\xe7\xf5es de Entrada', 98), (u'99 - Outras Opera\xe7\xf5es', 99)), 'calculo': ((u'Percentual', 'percentage'),)}
MAP_VALID_WIDGETS = {0: ['cst'], 1: ['cst', 'p_cofins'], 2: ['cst', 'p_cofins'], 67: ['cst', 'calculo', 'p_cofins'], 4: ['cst'], 5: ['cst'], 6: ['cst'], 7: ['cst'], 8: ['cst'], 9: ['cst'], 74: ['cst', 'calculo', 'p_cofins'], 75: ['cst', 'calculo', 'p_cofins'], 66: ['cst', 'calculo', 'p_cofins'], 73: ['cst', 'calculo', 'p_cofins'], 72: ['cst', 'calculo', 'p_cofins'], 98: ['cst', 'calculo', 'p_cofins'], 99: ['cst', 'calculo', 'p_cofins'], 70: ['cst', 'calculo', 'p_cofins'], 65: ['cst', 'calculo', 'p_cofins'], 64: ['cst', 'calculo', 'p_cofins'], 71: ['cst', 'calculo', 'p_cofins'], 49: ['cst', 'calculo', 'p_cofins'], 50: ['cst', 'calculo', 'p_cofins'], 51: ['cst', 'calculo', 'p_cofins'], 52: ['cst', 'calculo', 'p_cofins'], 53: ['cst', 'calculo', 'p_cofins'], 54: ['cst', 'calculo', 'p_cofins'], 55: ['cst', 'calculo', 'p_cofins'], 56: ['cst', 'calculo', 'p_cofins'], 60: ['cst', 'calculo', 'p_cofins'], 61: ['cst', 'calculo', 'p_cofins'], 62: ['cst', 'calculo', 'p_cofins'], 63: ['cst', 'calculo', 'p_cofins']}
setup_proxies()[source]
on_cst__changed(widget)[source]
on_calculo__changed(widget)[source]
on_p_cofins__validate(widget, value)[source]
class stoqlib.gui.slaves.taxslave.InvoiceItemCofinsSlave(store, model, invoice_item)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseCOFINSSlave, stoqlib.gui.slaves.taxslave.InvoiceItemMixin

model_type

alias of InvoiceItemCofins

proxy_widgets = ['cst', 'calculo', 'p_cofins', 'v_cofins']
create_model(store)[source]
setup_callbacks()[source]
update_values(widgets=None)[source]
class stoqlib.gui.slaves.taxslave.COFINSTemplateSlave(store, *args, **kargs)[source]

Bases: stoqlib.gui.slaves.taxslave.BaseCOFINSSlave

model_type

alias of ProductCofinsTemplate

proxy_widgets = ['cst', 'calculo', 'p_cofins']
hide_widgets = ['v_cofins', 'template']

tillslave Module

Editors implementation for open/close operation on till operation

class stoqlib.gui.slaves.tillslave.BaseCashSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave representing two fields, which is used by Cash editors:

Date: YYYY-MM-DD Cash Amount: [ ]

model_type

alias of Settable

gladefile = 'BaseCashSlave'
proxy_widgets = ('value', 'balance')
setup_proxies()[source]
on_value__validate(widget, value)[source]
class stoqlib.gui.slaves.tillslave.RemoveCashSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.slaves.tillslave.BaseCashSlave

on_value__validate(widget, value)[source]

transporterslave Module

Slaves for transporters

class stoqlib.gui.slaves.transporterslave.TransporterDataSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

model_type

alias of Transporter

gladefile = 'TransporterDataSlave'
proxy_widgets = ('freight', 'open_contract_date', 'active_radio', 'inactive_radio')
setup_proxies()[source]

userbranchaccessslave Module

class stoqlib.gui.slaves.userbranchaccessslave.UserBranchAccessSlave(store, user)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseRelationshipEditorSlave

model_type

alias of UserBranchAccess

target_name = 'Branch'
create_model()[source]
get_columns()[source]
get_targets()[source]
get_relations()[source]
validate_confirm()[source]

userslave Module

User editor slaves implementation.

class stoqlib.gui.slaves.userslave.LoginInfo[source]

This class is used by password editor only for validation of the fields.

current_password = None
new_password = None
confirm_password = None
class stoqlib.gui.slaves.userslave.UserStatusSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'UserStatusSlave'
model_type

alias of LoginUser

proxy_widgets = ('active_check',)
update_visual_mode()[source]
setup_proxies()[source]
class stoqlib.gui.slaves.userslave.PasswordEditorSlave(store, model=None, visual_mode=False, confirm_password=True)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

A slave for asking (and confirming) password; Optionally, this slave can be used just to ask the password once, i.e, not displaying the entry for confirmation (see confirm_password parameter).

gladefile = 'PasswordEditorSlave'
model_type

alias of LoginInfo

proxy_widgets = ('password', 'confirm_password')
invalidate_password(message)[source]
set_password_labels(password_lbl, confirm_password)[source]
create_model(store)[source]
setup_proxies()[source]
on_password__validate(entry, password)[source]
on_password__content_changed(entry)[source]
on_confirm_password__validate(entry, password)[source]
on_confirm_password__content_changed(entry)[source]
class stoqlib.gui.slaves.userslave.PasswordEditor(store, user, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditor

gladefile = 'PasswordEditor'
model_type

alias of LoginInfo

proxy_widgets = ('current_password',)
get_title(model)[source]
create_model(store)[source]
setup_slaves()[source]
setup_proxies()[source]
validate_confirm()[source]
on_confirm()[source]
class stoqlib.gui.slaves.userslave.UserDetailsSlave(store, model, show_password_fields=True, visual_mode=False)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'UserDetailsSlave'
model_type

alias of LoginUser

proxy_widgets = ('username', 'profile')
update_visual_mode()[source]
setup_proxies()[source]
on_confirm()[source]
on_username__map(widget)[source]
on_username__validate(widget, value)[source]
on_change_password_button__clicked(button)[source]

workorderslave Module

class stoqlib.gui.slaves.workorderslave.WorkOrderOpeningSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'WorkOrderOpeningSlave'
model_type

alias of WorkOrder

proxy_widgets = ['defect_reported', 'open_date']
setup_proxies()[source]
class stoqlib.gui.slaves.workorderslave.WorkOrderQuoteSlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'WorkOrderQuoteSlave'
model_type

alias of WorkOrder

proxy_widgets = ['defect_detected', 'quote_responsible', 'description', 'estimated_cost', 'estimated_finish', 'estimated_hours', 'estimated_start']
show_description_entry = False

If we should show an entry for the description (allowing it to be set or changed).

setup_proxies()[source]
on_attach(editor)[source]
on_estimated_start__validate(widget, value)[source]
on_estimated_finish__validate(widget, value)[source]
class stoqlib.gui.slaves.workorderslave.WorkOrderExecutionSlave(parent, *args, **kwargs)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

gladefile = 'WorkOrderExecutionSlave'
model_type

alias of WorkOrder

proxy_widgets = ['execution_responsible']
setup_proxies()[source]
setup_slaves()[source]
class stoqlib.gui.slaves.workorderslave.WorkOrderHistorySlave(store, model=None, visual_mode=False, edit_mode=None)[source]

Bases: stoqlib.gui.editors.baseeditor.BaseEditorSlave

Slave responsible to show the history of a work order

gladefile = 'WorkOrderHistorySlave'
model_type

alias of WorkOrder

update_items()[source]

Update the items on the list

Useful when a history is created when using this slave and we want it to show here at the same time.

setup_proxies()[source]
on_details_list__row_activated(details_list, item)[source]
on_details_list__selection_changed(details_list, item)[source]
on_details_btn__clicked(button)[source]