本文整理匯總了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):