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


Python Client.get_active_items方法代码示例

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


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

示例1: _fill_clients_combo

# 需要导入模块: from stoqlib.domain.person import Client [as 别名]
# 或者: from stoqlib.domain.person.Client import get_active_items [as 别名]
 def _fill_clients_combo(self):
     # FIXME: This should not be using a normal ProxyComboEntry,
     #        we need a specialized widget that does the searching
     #        on demand.
     items = Client.get_active_items(self.store)
     self.client.prefill(items)
     self.client.mandatory = True
开发者ID:qman1989,项目名称:stoq,代码行数:9,代码来源:loanwizard.py

示例2: _fill_clients_combo

# 需要导入模块: from stoqlib.domain.person import Client [as 别名]
# 或者: from stoqlib.domain.person.Client import get_active_items [as 别名]
    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.

        items = Client.get_active_items(self.store)
        self.client.prefill(items)
        self.client.set_sensitive(len(self.client.get_model()))
        marker('Filled clients')
开发者ID:igorferreira,项目名称:stoq,代码行数:12,代码来源:salewizard.py

示例3: populate

# 需要导入模块: from stoqlib.domain.person import Client [as 别名]
# 或者: from stoqlib.domain.person.Client import get_active_items [as 别名]
    def populate(self, person):
        from stoqlib.domain.person import (Client, Supplier, Transporter,
                                           SalesPerson, Branch)
        store = get_store_for_field(self)
        person_type = self.person_type
        if person_type == Supplier:
            objects = Supplier.get_active_suppliers(store)
            self.add_button.set_tooltip_text(_("Add a new supplier"))
            self.edit_button.set_tooltip_text(_("Edit the selected supplier"))
            items = api.for_person_combo(objects)
        elif person_type == Client:
            self.add_button.set_tooltip_text(_("Add a new client"))
            self.edit_button.set_tooltip_text(_("Edit the selected client"))
            items = Client.get_active_items(store)
        elif person_type == Transporter:
            objects = Transporter.get_active_transporters(store)
            self.add_button.set_tooltip_text(_("Add a new transporter"))
            self.edit_button.set_tooltip_text(_("Edit the selected transporter"))
            items = api.for_person_combo(objects)
        elif person_type == SalesPerson:
            objects = SalesPerson.get_active_salespersons(store)
            self.add_button.set_tooltip_text(_("Add a new sales person"))
            self.edit_button.set_tooltip_text(_("Edit the selected sales person"))
            items = api.for_person_combo(objects)
        elif person_type == Branch:
            objects = Branch.get_active_branches(store)
            self.add_button.set_tooltip_text(_("Add a new branch"))
            self.edit_button.set_tooltip_text(_("Edit the selected branch"))
            items = api.for_person_combo(objects)
        else:
            raise AssertionError(self.person_type)

        self.widget.prefill(items)

        if person:
            assert isinstance(person, person_type)
            self.widget.select(person)
开发者ID:qman1989,项目名称:stoq,代码行数:39,代码来源:fields.py

示例4: _fill_clients_combo

# 需要导入模块: from stoqlib.domain.person import Client [as 别名]
# 或者: from stoqlib.domain.person.Client import get_active_items [as 别名]
 def _fill_clients_combo(self):
     items = Client.get_active_items(self.store)
     self.client.prefill(items)
     self.client.set_sensitive(len(self.client.get_model()))
开发者ID:barkinet,项目名称:stoq,代码行数:6,代码来源:saleeditor.py


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