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


Python message.marker函数代码示例

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


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


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