當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。