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

Python personwizard.run_person_role_dialog函数代码示例

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

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



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

示例1: on_further_details_button__clicked

 def on_further_details_button__clicked(self, *args):
     store = api.new_store()
     model = store.fetch(self.model)
     run_person_role_dialog(ClientEditor, self, store,
                            model, visual_mode=True)
     store.confirm(False)
     store.close()
开发者ID:hackedbellini,项目名称:stoq,代码行数:7,代码来源:clientdetails.py


示例2: run_dialog

    def run_dialog(self, store, person):
        from stoqlib.domain.person import (Branch, Client, Supplier,
                                           Transporter, SalesPerson)
        from stoqlib.gui.editors.personeditor import (BranchEditor,
                                                      ClientEditor,
                                                      EmployeeEditor,
                                                      SupplierEditor,
                                                      TransporterEditor)
        editors = {
            Branch: BranchEditor,
            Client: ClientEditor,
            Supplier: SupplierEditor,
            Transporter: TransporterEditor,
            SalesPerson: EmployeeEditor,
        }
        editor = editors.get(self.person_type)
        if editor is None:  # pragma no cover
            raise NotImplementedError(self.person_type)

        # FIXME: Salesperson is edited on EmployeeEditor, so we need to get
        # that facet for the editor
        if isinstance(person, SalesPerson):
            person = person.person.employee

        from stoqlib.gui.wizards.personwizard import run_person_role_dialog
        return run_person_role_dialog(editor, self.toplevel, store, person,
                                      visual_mode=not self.can_edit)
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:27,代码来源:fields.py


示例3: _create_client

 def _create_client(self):
     store = api.new_store()
     client = run_person_role_dialog(ClientEditor, self.wizard, store, None)
     store.confirm(client)
     client = self.store.fetch(client)
     store.close()
     if not client:
         return
     if len(self.client) == 0:
         self._fill_clients_combo()
         return
     clients = self.client.get_model_items().values()
     if client in clients:
         if client.is_active:
             self.client.select(client)
         else:
             # remove client from combo
             self.client.select_item_by_data(client)
             iter = self.client.get_active_iter()
             model = self.client.get_model()
             model.remove(iter)
             # just in case the inactive client was selected before.
             self.client.select_item_by_position(0)
     elif client.is_active:
         self.client.append_item(client.person.name, client)
         self.client.select(client)
     self._update_widgets()
开发者ID:romaia,项目名称:stoq,代码行数:27,代码来源:salewizard.py


示例4: on_create_client__clicked

    def on_create_client__clicked(self, button):
        with api.new_store() as store:
            client = run_person_role_dialog(ClientEditor, self, store, None)

        if store.committed:
            self._fill_clients_combo()
            self.client.select(client.id)
开发者ID:barkinet,项目名称:stoq,代码行数:7,代码来源:saleeditor.py


示例5: _run_medic_editor

 def _run_medic_editor(self, medic=None, visual_mode=False):
     with api.trans() as store:
         medic = run_person_role_dialog(MedicEditor, self, store, medic, visual_mode=True)
     if medic:
         self._medic_combo_prefill()
         medic = self.store.fetch(medic)
         self.medic_combo.select(medic)
开发者ID:rosalin,项目名称:stoq,代码行数:7,代码来源:opticalslave.py


示例6: _run_medic_editor

 def _run_medic_editor(self, medic=None, visual_mode=False):
     with api.new_store() as store:
         parent = self.get_toplevel().get_toplevel()
         medic = run_person_role_dialog(MedicEditor, parent, store, medic, visual_mode=True)
     if medic:
         self._medic_combo_prefill()
         medic = self.store.fetch(medic)
         self.medic_combo.select(medic)
开发者ID:amaurihamasu,项目名称:stoq,代码行数:8,代码来源:opticalslave.py


示例7: on_create_client__clicked

 def on_create_client__clicked(self, button):
     store = api.new_store()
     client = run_person_role_dialog(ClientEditor, self.wizard, store, None)
     retval = store.confirm(client)
     store.close()
     if retval:
         self._fill_clients_combo()
         self.client.select(client.id)
开发者ID:reashninja,项目名称:stoq,代码行数:8,代码来源:opticalwizard.py


示例8: on_create_transporter__clicked

 def on_create_transporter__clicked(self, button):
     store = api.new_store()
     transporter = store.fetch(self.model.transporter)
     model = run_person_role_dialog(TransporterEditor, self.wizard, store,
                                    transporter)
     rv = store.confirm(model)
     store.close()
     if rv:
         self._fill_transporter_combo()
         model = self.store.fetch(model)
         self.transporter.select(model)
开发者ID:romaia,项目名称:stoq,代码行数:11,代码来源:salewizard.py


示例9: _run_editor

    def _run_editor(self):
        with api.new_store() as store:
            model = getattr(self._model, self._model_property)
            model = store.fetch(model)
            if self._is_person:
                value = run_person_role_dialog(self._editor_class, self._parent, store, model)
            else:
                value = run_dialog(self._editor_class, self._parent, store, model)

        if value:
            value = self.store.fetch(value)
            self.set_value(value)
开发者ID:barkinet,项目名称:stoq,代码行数:12,代码来源:searchentry.py


示例10: run_dialog

    def run_dialog(self, store, person):
        from stoqlib.domain.person import Branch, Client, Supplier, Transporter
        from stoqlib.gui.editors.personeditor import (BranchEditor,
                                                      ClientEditor,
                                                      SupplierEditor,
                                                      TransporterEditor)
        editors = {
            Branch: BranchEditor,
            Client: ClientEditor,
            Supplier: SupplierEditor,
            Transporter: TransporterEditor,
        }
        editor = editors.get(self.person_type)
        if editor is None:  # pragma no cover
            raise NotImplementedError(self.person_type)

        from stoqlib.gui.wizards.personwizard import run_person_role_dialog
        return run_person_role_dialog(editor, self.toplevel, store, person,
                                      visual_mode=not self.can_edit)
开发者ID:relsi,项目名称:stoq,代码行数:19,代码来源:fields.py


示例11: run_dialog

 def run_dialog(self, editor_class, parent, *args, **kwargs):
     return run_person_role_dialog(editor_class, parent, *args, **kwargs)
开发者ID:LeonamSilva,项目名称:stoq,代码行数:2,代码来源:personsearch.py


示例12: test_client

def test_client():  # pragma nocover
    from stoqlib.gui.wizards.personwizard import run_person_role_dialog
    creator = api.prepare_test()
    retval = run_person_role_dialog(ClientEditor, None, creator.store, None)
    creator.store.confirm(retval)
开发者ID:Joaldino,项目名称:stoq,代码行数:5,代码来源:personeditor.py


示例13: _new_user

 def _new_user(self):
     store = api.new_store()
     model = run_person_role_dialog(UserEditor, self, store)
     store.confirm(model)
     store.close()
开发者ID:adrianoaguiar,项目名称:stoq,代码行数:5,代码来源:admin.py


示例14: _run_client_editor

 def _run_client_editor(self, store, model):
     return run_person_role_dialog(ClientEditor, self.wizard, store, model,
                                   document=self.wizard._current_document)
开发者ID:amaurihamasu,项目名称:stoq,代码行数:3,代码来源:salewizard.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python salequotewizard.SaleQuoteWizard类代码示例发布时间:2022-05-27
下一篇:
Python abstractwizard.SellableItemStep类代码示例发布时间: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