當前位置: 首頁>>代碼示例>>Python>>正文


Python Screen.group方法代碼示例

本文整理匯總了Python中tryton.gui.window.view_form.screen.Screen.group方法的典型用法代碼示例。如果您正苦於以下問題:Python Screen.group方法的具體用法?Python Screen.group怎麽用?Python Screen.group使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在tryton.gui.window.view_form.screen.Screen的用法示例。


在下文中一共展示了Screen.group方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: open_remote

# 需要導入模塊: from tryton.gui.window.view_form.screen import Screen [as 別名]
# 或者: from tryton.gui.window.view_form.screen.Screen import group [as 別名]
    def open_remote(self, record, create=True, changed=False, text=None,
            callback=None):
        group = record.value[self.field_name]
        field = record.group.fields[self.field_name]
        relation = field.attrs['relation']
        context = field.context_get(record)

        screen = Screen(relation, mode=['tree', 'form'],
            exclude_field=field.attrs.get('relation_field'))
        screen.group = group

        def open_callback(result):
            if callback:
                callback()
        WinForm(screen, open_callback, view_type='tree', context=context)
開發者ID:mediafactory,項目名稱:tryton_client_desktop,代碼行數:17,代碼來源:parser.py

示例2: open_remote

# 需要導入模塊: from tryton.gui.window.view_form.screen import Screen [as 別名]
# 或者: from tryton.gui.window.view_form.screen.Screen import group [as 別名]
    def open_remote(self, record, create=True, changed=False, text=None,
            callback=None):
        group = record.value[self.attrs['name']]
        field = record.group.fields[self.attrs['name']]
        relation = field.attrs['relation']
        context = field.context_get(record)

        access = common.MODELACCESS[relation]
        if not access['read']:
            return

        screen = Screen(relation, mode=['tree', 'form'],
            exclude_field=field.attrs.get('relation_field'))
        screen.pre_validate = bool(int(self.attrs.get('pre_validate', 0)))
        screen.group = group

        def open_callback(result):
            if callback:
                callback()
        WinForm(screen, open_callback, view_type='tree', context=context)
開發者ID:kret0s,項目名稱:gnuhealth-live,代碼行數:22,代碼來源:widget.py


注:本文中的tryton.gui.window.view_form.screen.Screen.group方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。