当前位置: 首页>>代码示例>>Python>>正文


Python BaseWizard.__init__方法代码示例

本文整理汇总了Python中stoqlib.gui.base.wizards.BaseWizard.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseWizard.__init__方法的具体用法?Python BaseWizard.__init__怎么用?Python BaseWizard.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在stoqlib.gui.base.wizards.BaseWizard的用法示例。


在下文中一共展示了BaseWizard.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model=None):
        model = model or self._create_model(store)

        # If we receive the order right after the purchase.
        self.receiving_model = None
        first_step = StartConsignmentStep(self, store, model)
        BaseWizard.__init__(self, store, first_step, model)
开发者ID:hackedbellini,项目名称:stoq,代码行数:9,代码来源:consignmentwizard.py

示例2: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, options, config=None):
        if not config:
            config = StoqConfig()

        self.settings = config.get_settings()
        self.link_request_done = False
        self.create_examples = False
        self.config = config
        self.enable_production = False
        self.has_installed_db = False
        self.options = options
        self.plugins = []
        self.db_is_local = False
        self.enable_online_services = True
        self.auth_type = TRUST_AUTHENTICATION

        if config.get('Database', 'enable_production') == 'True':
            self.enable_production = True

        if self.enable_production:
            first_step = PluginStep(self)
        else:
            first_step = WelcomeStep(self)
        BaseWizard.__init__(self, None, first_step, title=self.title)

        self.get_toplevel().set_deletable(False)
        self.next_button.grab_focus()
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:29,代码来源:config.py

示例3: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model):
        self.temporary_items = {}
        self.imported_count = {}
        self.manual_count = True

        first_step = InventoryCountTypeStep(store, self, previous=None)
        BaseWizard.__init__(self, store, first_step, model)
开发者ID:amaurihamasu,项目名称:stoq,代码行数:9,代码来源:inventorywizard.py

示例4: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
 def __init__(self, store):
     self.model = None
     self.sync_mode = api.sysparam.get_bool('SYNCHRONIZED_MODE')
     self.current_branch = api.get_current_branch(store)
     first_step = ReceivingSelectionStep(self, store)
     BaseWizard.__init__(self, store, first_step, self.model)
     self.next_button.set_sensitive(False)
开发者ID:hackedbellini,项目名称:stoq,代码行数:9,代码来源:reconciliationwizard.py

示例5: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model):
        self.temporary_items = {}
        self.imported_count = {}
        self.manual_count = True
        self.can_count_twice = api.sysparam.get_bool('ALLOW_SAME_SELLABLE_IN_A_ROW')

        first_step = InventoryCountTypeStep(store, self, previous=None)
        BaseWizard.__init__(self, store, first_step, model)
开发者ID:hackedbellini,项目名称:stoq,代码行数:10,代码来源:inventorywizard.py

示例6: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, role_editor):
        if not issubclass(role_editor, BasePersonRoleEditor):
            raise TypeError("Editor %s must be BasePersonRoleEditor " "instance" % role_editor)
        self.role_editor = role_editor

        BaseWizard.__init__(self, store, PersonRoleTypeStep(self, store), title=self.get_role_title())

        if role_editor.help_section:
            self.set_help_section(role_editor.help_section)
开发者ID:romaia,项目名称:stoq,代码行数:11,代码来源:personwizard.py

示例7: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, purchase):
        self.purchase = purchase
        model = self._create_model(purchase)

        if self.purchase.status != PurchaseOrder.ORDER_CONFIRMED:
            raise ValueError("Invalid order status. It should " "be ORDER_CONFIRMED")

        first_step = PurchaseFinishProductListStep(store, self, model)
        BaseWizard.__init__(self, store, first_step, model)
开发者ID:EasyDevSolutions,项目名称:stoq,代码行数:11,代码来源:purchasefinishwizard.py

示例8: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, receiving_order=None):
        self.receiving_order = receiving_order
        if self.receiving_order is not None:
            self.title = _('Receiving Order Return')

        model = self._create_model(store)
        first_step = StartStockDecreaseStep(store, self, model)
        BaseWizard.__init__(self, store, first_step, model)
        self.create_payments = False
开发者ID:hackedbellini,项目名称:stoq,代码行数:11,代码来源:stockdecreasewizard.py

示例9: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model=None):
        title = self._get_title(model)
        model = model or self._create_model(store)

        if model.status != Sale.STATUS_QUOTE:
            raise ValueError('Invalid sale status. It should '
                             'be STATUS_QUOTE')

        first_step = StartSaleQuoteStep(store, self, model)
        BaseWizard.__init__(self, store, first_step, model, title=title,
                            edit_mode=False)
开发者ID:romaia,项目名称:stoq,代码行数:13,代码来源:salequotewizard.py

示例10: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model=None):
        title = self._get_title(model)
        self.edit = model is not None
        self.quote = None
        self.quote_group = self._get_or_create_quote_group(model, store)
        model = model or self._create_model(store)
        if model.status != PurchaseOrder.ORDER_QUOTING:
            raise ValueError('Invalid order status. It should '
                             'be ORDER_QUOTING')

        first_step = StartQuoteStep(self, None, store, model)
        BaseWizard.__init__(self, store, first_step, model, title=title)
开发者ID:pkaislan,项目名称:stoq,代码行数:14,代码来源:purchasequotewizard.py

示例11: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model=None):
        self.unkown_sale = False
        if model:
            # Adjust items befre creating the step, so that plugins may have a
            # chance to change the value
            for item in model.returned_items:
                _adjust_returned_sale_item(item)
            first_step = SaleReturnItemsStep(self, None, store, model)
        else:
            first_step = SaleReturnSelectionStep(store, self, None)

        BaseWizard.__init__(self, store, first_step, model)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:14,代码来源:salereturnwizard.py

示例12: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, role_editor, document=None):
        if not issubclass(role_editor, BasePersonRoleEditor):
            raise TypeError('Editor %s must be BasePersonRoleEditor '
                            'instance' % role_editor)
        self.role_editor = role_editor
        self._document = document

        BaseWizard.__init__(self, store,
                            self.get_first_step(store),
                            title=self.get_role_title())

        if role_editor.help_section:
            self.set_help_section(role_editor.help_section)
开发者ID:amaurihamasu,项目名称:stoq,代码行数:15,代码来源:personwizard.py

示例13: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, purchase):
        sync_mode = api.sysparam.get_bool("SYNCHRONIZED_MODE")
        # When in sync mode, only the branch owner can finish a purchase order.
        if sync_mode:
            assert purchase.branch == api.get_current_branch(store)

        self.purchase = purchase
        model = self._create_model(purchase)

        if self.purchase.status != PurchaseOrder.ORDER_CONFIRMED:
            raise ValueError("Invalid order status. It should " "be ORDER_CONFIRMED")

        first_step = PurchaseFinishProductListStep(store, self, model)
        BaseWizard.__init__(self, store, first_step, model)
开发者ID:stoq,项目名称:stoq,代码行数:16,代码来源:purchasefinishwizard.py

示例14: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model=None, edit_mode=False):
        title = self._get_title(model)
        model = model or self._create_model(store)
        # Should we show all products or only the ones associated with the
        # selected supplier?
        self.all_products = False

        # If we receive the order right after the purchase.
        self.receiving_model = None
        if model.status != PurchaseOrder.ORDER_PENDING:
            raise ValueError('Invalid order status. It should '
                             'be ORDER_PENDING')
        first_step = StartPurchaseStep(self, store, model)
        BaseWizard.__init__(self, store, first_step, model, title=title,
                            edit_mode=edit_mode)
开发者ID:pkaislan,项目名称:stoq,代码行数:17,代码来源:purchasewizard.py

示例15: __init__

# 需要导入模块: from stoqlib.gui.base.wizards import BaseWizard [as 别名]
# 或者: from stoqlib.gui.base.wizards.BaseWizard import __init__ [as 别名]
    def __init__(self, store, model, subtotal, total_paid=0,
                 current_document=None):
        """Creates a new SaleWizard that confirms a sale.
        To avoid excessive querying of the database we pass
        some data already queried/calculated before hand.

        :param store: a store
        :param model: a |sale|
        :param subtotal: subtotal of the sale
        :param total_paid: totaly value already paid
        :param current_document: the current document of the identified client,
          if any
        """
        marker('ConfirmSaleWizard')
        self._check_payment_group(model, store)
        self._subtotal = subtotal
        self._total_paid = total_paid
        self._current_document = current_document
        self.model = model

        # invoice_model is a Settable so avoid bug 4218, where more
        # than one checkout may try to use the same invoice number.
        self.invoice_model = Settable(invoice_number=None,
                                      original_invoice=None)

        adjusted_batches = model.check_and_adjust_batches()
        if not adjusted_batches:
            first_step = ConfirmSaleBatchStep(store, self, model, None)
        else:
            marker('running SalesPersonStep')
            first_step = SalesPersonStep(self, store, model, self.payment_group,
                                         self.invoice_model)
            marker('finished creating SalesPersonStep')

        BaseWizard.__init__(self, store, first_step, model)

        if not sysparam.get_bool('CONFIRM_SALES_ON_TILL'):
            # This was added to allow us to work even if an error
            # happened while adding a payment, where we already order
            # but cannot confirm and are thrown back to the main
            # POS interface
            if self.model.can_order():
                self.model.order()

        marker('leaving ConfirmSaleWizard.__init__')
开发者ID:amaurihamasu,项目名称:stoq,代码行数:47,代码来源:salewizard.py


注:本文中的stoqlib.gui.base.wizards.BaseWizard.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。