本文整理汇总了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)
示例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)