• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python message.marker函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中stoqlib.lib.message.marker函数的典型用法代码示例。如果您正苦于以下问题:Python marker函数的具体用法?Python marker怎么用?Python marker使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: _get_columns

    def _get_columns(self):
        marker('_get_columns')
        self._price_columns = {}
        columns = [Column("code", title=_(u"Code"), data_type=str,
                          width=100),
                   Column("barcode", title=_(u"Barcode"), data_type=str,
                          width=100, visible=False),
                   Column("category_description", title=_(u"Category"),
                          data_type=str, width=100),
                   Column("description", title=_(u"Description"),
                          data_type=str, width=200),
                   Column("cost", title=_(u"Cost"),
                          data_type=currency, width=90),
                   Column("price", title=_(u"Default Price"),
                          data_type=currency, width=90)
                   ]

        self._price_columns[None] = columns[-1]
        for cat in self.categories:
            columns.append(Column('price_%s' % (cat.id, ),
                                  title=cat.get_description(), data_type=currency,
                                  width=90, visible=True))
            self._price_columns[cat.id] = columns[-1]
        self._columns = columns
        marker('Done _get_columns')
        return columns
开发者ID:marianaanselmo,项目名称:stoq,代码行数:26,代码来源:sellablepricedialog.py


示例2: setup_slaves

    def setup_slaves(self):
        marker('Setting up slaves')
        BaseMethodSelectionStep.setup_slaves(self)
        marker('Finished parent')

        self.pm_slave.set_client(self.model.client,
                                 total_amount=self.wizard.get_total_to_pay())

        marker('Setting discount')
        self.discount_slave = SaleDiscountSlave(self.store, self.model,
                                                self.model_type)

        if sysparam.get_bool('USE_TRADE_AS_DISCOUNT'):
            self.subtotal_expander.set_expanded(True)
            self.discount_slave.discount_value_ck.set_active(True)
            self.discount_slave.update_sale_discount()
        marker('Finshed setting up discount')

        self.discount_slave.connect('discount-changed',
                                    self.on_discount_slave_changed)
        slave_holder = 'discount_surcharge_slave'
        if self.get_slave(slave_holder):
            self.detach_slave(slave_holder)
        self.attach_slave(slave_holder, self.discount_slave)
        marker('Finished setting up slaves')
开发者ID:Farrapo,项目名称:stoq,代码行数:25,代码来源:salewizard.py


示例3: _fill_transporter_combo

 def _fill_transporter_combo(self):
     marker('Filling transporters')
     transporters = Transporter.get_active_transporters(self.store)
     items = api.for_person_combo(transporters)
     self.transporter.prefill(items)
     self.transporter.set_sensitive(len(items))
     marker('Filled transporters')
开发者ID:romaia,项目名称:stoq,代码行数:7,代码来源:salewizard.py


示例4: _setup_clients_widget

 def _setup_clients_widget(self):
     marker('Filling clients')
     self.client_gadget = ClientSearchEntryGadget(
         entry=self.client,
         store=self.store,
         model=self.model,
         parent=self.wizard)
     marker('Filled clients')
开发者ID:Farrapo,项目名称:stoq,代码行数:8,代码来源:salewizard.py


示例5: on_apply__clicked

 def on_apply__clicked(self, button):
     markup = self.markup.read()
     cat = self.category.read()
     marker('Updating prices')
     for i in self.slave.listcontainer.list:
         i.set_markup(cat, markup)
         self.slave.listcontainer.list.refresh(i)
     marker('Done updating prices')
开发者ID:marianaanselmo,项目名称:stoq,代码行数:8,代码来源:sellablepricedialog.py


示例6: update_discount_and_surcharge

 def update_discount_and_surcharge(self):
     marker("update_discount_and_surcharge")
     # Here we need avoid to reset sale data defined when creating the
     # Sale in the POS application, i.e, we should not reset the
     # discount and surcharge if they are already set (this is the
     # case when CONFIRM_SALES_ON_TILL parameter is enabled).
     if not sysparam(self.store).CONFIRM_SALES_ON_TILL:
         self.model.discount_value = currency(0)
         self.model.surcharge_value = currency(0)
开发者ID:romaia,项目名称:stoq,代码行数:9,代码来源:salewizard.py


示例7: next_step

    def next_step(self):
        self.store.savepoint('before_salesperson_step')

        marker('running SalesPersonStep')
        self._update_sale_items()
        step = SalesPersonStep(self.wizard, self.store, self.model,
                               self.wizard.payment_group,
                               self.wizard.invoice_model)
        marker('finished creating SalesPersonStep')
        return step
开发者ID:Farrapo,项目名称:stoq,代码行数:10,代码来源:salewizard.py


示例8: _fill_clients_combo

    def _fill_clients_combo(self):
        marker('Filling clients')
        # FIXME: This should not be using a normal ProxyComboEntry,
        #        we need a specialized widget that does the searching
        #        on demand.

        clients = Client.get_active_clients(self.store)
        self.client.prefill(api.for_person_combo(clients))
        self.client.set_sensitive(len(self.client.get_model()))
        marker('Filled clients')
开发者ID:romaia,项目名称:stoq,代码行数:10,代码来源:salewizard.py


示例9: update_discount_and_surcharge

 def update_discount_and_surcharge(self):
     marker("update_discount_and_surcharge")
     # Here we need avoid to reset sale data defined when creating the
     # Sale in the POS application, i.e, we should not reset the
     # discount and surcharge if they are already set (this is the
     # case when one of the parameters, CONFIRM_SALES_ON_TILL or
     # USE_TRADE_AS_DISCOUNT is enabled).
     if (not sysparam.get_bool('CONFIRM_SALES_ON_TILL') and
             not sysparam.get_bool('USE_TRADE_AS_DISCOUNT')):
         self.model.discount_value = currency(0)
         self.model.surcharge_value = currency(0)
开发者ID:Farrapo,项目名称:stoq,代码行数:11,代码来源:salewizard.py


示例10: __init__

    def __init__(self, wizard, store, model, payment_group,
                 invoice_model):
        self.invoice_model = invoice_model

        self.payment_group = payment_group

        BaseMethodSelectionStep.__init__(self)
        marker("WizardEditorStep.__init__")
        WizardEditorStep.__init__(self, store, wizard, model)

        self._update_totals()
        self.update_discount_and_surcharge()
开发者ID:romaia,项目名称:stoq,代码行数:12,代码来源:salewizard.py


示例11: post_init

    def post_init(self):
        BaseMethodSelectionStep.post_init(self)

        marker('Entering post_init')
        if self.wizard.need_create_payment():
            self.wizard.payment_group.clear_unused()
        self.register_validate_function(self._refresh_next)
        self._update_next_step(self.get_selected_method())
        if hasattr(self, 'cash_change_slave'):
            self.cash_change_slave.received_value.grab_focus()

        self.force_validation()
        marker('Leaving post_init')
开发者ID:igorferreira,项目名称:stoq,代码行数:13,代码来源:salewizard.py


示例12: setup_proxies

 def setup_proxies(self):
     marker('Setting up proxies')
     self.setup_widgets()
     self.proxy = self.add_proxy(self.model,
                                 SalesPersonStep.proxy_widgets)
     self.invoice_proxy = self.add_proxy(self.invoice_model,
                                         self.invoice_widgets)
     if self.model.client:
         self.client.set_sensitive(False)
         self.create_client.set_sensitive(False)
     if sysparam(self.store).ASK_SALES_CFOP:
         self.add_proxy(self.model, SalesPersonStep.cfop_widgets)
     marker('Finished setting up proxies')
开发者ID:romaia,项目名称:stoq,代码行数:13,代码来源:salewizard.py


示例13: get_columns

    def get_columns(self):
        marker('_get_columns')
        columns = []
        text_columns = []
        for field in self._fields:
            col = field.get_column(self.search_spec)
            columns.append(col)
            if field.data_type is str and isinstance(col, SearchColumn):
                text_columns.append(col.search_attribute)

        self.text_field_columns = text_columns
        marker('Done _get_columns')
        return columns
开发者ID:hackedbellini,项目名称:stoq,代码行数:13,代码来源:masseditordialog.py


示例14: _fill_cost_center_combo

    def _fill_cost_center_combo(self):
        marker('Filling cost centers')
        cost_centers = CostCenter.get_active(self.store)

        # we keep this value because each call to is_empty() is a new sql query
        # to the database
        cost_centers_exists = not cost_centers.is_empty()

        if cost_centers_exists:
            self.cost_center.prefill(api.for_combo(cost_centers, attr='name',
                                                   empty=_('No cost center.')))
        self.cost_center.set_visible(cost_centers_exists)
        self.cost_center_lbl.set_visible(cost_centers_exists)
        marker('Filled cost centers')
开发者ID:romaia,项目名称:stoq,代码行数:14,代码来源:salewizard.py


示例15: confirm

    def confirm(self, dialog):
        marker('Saving data')

        objs = self.get_changed_objects()
        total = len(objs)
        for i, obj in enumerate(objs):
            for field in self._fields:
                field.save_value(obj)
                yield i, total
            # Flush soon, so that any errors triggered by database constraints
            # pop up.
            self._store.flush()

        marker('Done saving data')
开发者ID:hackedbellini,项目名称:stoq,代码行数:14,代码来源:masseditordialog.py


示例16: post_init

    def post_init(self):
        BaseMethodSelectionStep.post_init(self)

        marker('Entering post_init')
        if self.wizard.need_create_payment():
            self.wizard.payment_group.clear_unused()
        self.register_validate_function(self._refresh_next)
        self._update_next_step(self.get_selected_method())
        # If there's no salesperson, keep the focus there as it should be
        # selected first to have a nice flow
        if (hasattr(self, 'cash_change_slave') and
                self.model.salesperson is not None):
            self.cash_change_slave.received_value.grab_focus()

        self.force_validation()
        marker('Leaving post_init')
开发者ID:Farrapo,项目名称:stoq,代码行数:16,代码来源:salewizard.py


示例17: setup_slaves

    def setup_slaves(self):
        marker('Setting up slaves')
        BaseMethodSelectionStep.setup_slaves(self)
        marker('Finished parent')

        self.pm_slave.set_client(self.model.client,
                                 total_amount=self.wizard.get_total_to_pay())

        marker('Setting discount')
        self.discount_slave = SaleDiscountSlave(self.store, self.model,
                                                self.model_type)
        marker('Finshed setting up discount')

        self.discount_slave.connect('discount-changed',
                                    self.on_discount_slave_changed)
        slave_holder = 'discount_surcharge_slave'
        if self.get_slave(slave_holder):
            self.detach_slave(slave_holder)
        self.attach_slave(slave_holder, self.discount_slave)
        marker('Finished setting up slaves')
开发者ID:pkaislan,项目名称:stoq,代码行数:20,代码来源:salewizard.py


示例18: setup_slaves

    def setup_slaves(self):
        marker('Setting up slaves')
        BaseMethodSelectionStep.setup_slaves(self)
        marker('Finished parent')

        self.pm_slave.method_set_sensitive(u'store_credit',
                                           bool(self.model.client))
        self.pm_slave.method_set_sensitive(u'bill',
                                           bool(self.model.client))

        marker('Setting discount')
        self.discount_slave = SaleDiscountSlave(self.store, self.model,
                                                self.model_type)
        marker('Finshed setting up discount')

        self.discount_slave.connect('discount-changed',
                                    self.on_discount_slave_changed)
        slave_holder = 'discount_surcharge_slave'
        if self.get_slave(slave_holder):
            self.detach_slave(slave_holder)
        self.attach_slave(slave_holder, self.discount_slave)
        marker('Finished setting up slaves')
开发者ID:romaia,项目名称:stoq,代码行数:22,代码来源:salewizard.py


示例19: on_confirm

    def on_confirm(self):
        marker('Saving prices')
        # FIXME: Improve this part. This is just a quick workaround to
        # release the bugfix asap
        self.main_dialog.ok_button.set_sensitive(False)
        self.main_dialog.cancel_button.set_sensitive(False)
        d = ProgressDialog(_('Updating items'), pulse=False)
        d.set_transient_for(self.main_dialog)
        d.start(wait=0)
        d.cancel.hide()

        total = len(self.slave.listcontainer.list)
        for i, s in enumerate(self.slave.listcontainer.list):
            s.save_changes()
            d.progressbar.set_text('%s/%s' % (i + 1, total))
            d.progressbar.set_fraction((i + 1) / float(total))
            while gtk.events_pending():
                gtk.main_iteration(False)

        d.stop()
        marker('Done saving prices')
        self.slave.listcontainer.list.clear()
开发者ID:marianaanselmo,项目名称:stoq,代码行数:22,代码来源:sellablepricedialog.py


示例20: __init__

    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,代码行数:45,代码来源:salewizard.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python message.warning函数代码示例发布时间:2022-05-27
下一篇:
Python message.info函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap