本文整理汇总了Python中tryton.gui.window.view_form.screen.Screen.button方法的典型用法代码示例。如果您正苦于以下问题:Python Screen.button方法的具体用法?Python Screen.button怎么用?Python Screen.button使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tryton.gui.window.view_form.screen.Screen
的用法示例。
在下文中一共展示了Screen.button方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Form
# 需要导入模块: from tryton.gui.window.view_form.screen import Screen [as 别名]
# 或者: from tryton.gui.window.view_form.screen.Screen import button [as 别名]
#.........这里部分代码省略.........
self.domain = domain
self.mode = mode
self.context = context
self.view_ids = view_ids
self.dialogs = []
self.screen = Screen(self.model, mode=mode, context=context,
view_ids=view_ids, domain=domain, limit=limit, order=order,
search_value=search_value, tab_domain=tab_domain,
context_model=context_model)
self.screen.widget.show()
if not name:
self.name = self.screen.current_view.title
else:
self.name = name
if self.model not in common.MODELHISTORY:
self.menu_def = self.menu_def[:]
# Remove callback to revision
self.menu_def[11] = (self.menu_def[11][:2] + (None,)
+ self.menu_def[11][3:])
self.create_tabcontent()
self.url_entry = url_entry = gtk.Entry()
url_entry.show()
url_entry.set_editable(False)
style = url_entry.get_style()
url_entry.modify_bg(gtk.STATE_ACTIVE,
style.bg[gtk.STATE_INSENSITIVE])
self.widget.pack_start(url_entry, False, False)
self.set_buttons_sensitive()
self.screen.signal_connect(self, 'record-message',
self._record_message)
self.screen.signal_connect(self, 'record-modified',
lambda *a: gobject.idle_add(self._record_modified, *a))
self.screen.signal_connect(self, 'record-saved', self._record_saved)
self.screen.signal_connect(self, 'attachment-count',
self._attachment_count)
self.screen.signal_connect(self, 'unread-note', self._unread_note)
if res_id not in (None, False):
if isinstance(res_id, (int, long)):
res_id = [res_id]
self.screen.load(res_id)
else:
if self.screen.current_view.view_type == 'form':
self.sig_new(None, autosave=False)
if self.screen.current_view.view_type \
in ('tree', 'graph', 'calendar'):
self.screen.search_filter()
self.update_revision()
def get_toolbars(self):
try:
return RPCExecute('model', self.model, 'view_toolbar_get',
context=self.screen.context)
except RPCException:
return {}
def widget_get(self):