本文整理匯總了Python中tryton.gui.window.view_form.screen.Screen.ids_get方法的典型用法代碼示例。如果您正苦於以下問題:Python Screen.ids_get方法的具體用法?Python Screen.ids_get怎麽用?Python Screen.ids_get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tryton.gui.window.view_form.screen.Screen
的用法示例。
在下文中一共展示了Screen.ids_get方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Form
# 需要導入模塊: from tryton.gui.window.view_form.screen import Screen [as 別名]
# 或者: from tryton.gui.window.view_form.screen.Screen import ids_get [as 別名]
#.........這裏部分代碼省略.........
def get_toolbars(self):
try:
return RPCExecute('model', self.model, 'view_toolbar_get',
context=self.context)
except RPCException:
return {}
def widget_get(self):
return self.screen.widget
def __eq__(self, value):
if not value:
return False
if not isinstance(value, Form):
return False
return (self.model == value.model
and self.res_id == value.res_id
and self.domain == value.domain
and self.mode == value.mode
and self.view_ids == value.view_ids
and self.context == value.context
and self.name == value.name
and self.screen.limit == value.screen.limit
and self.auto_refresh == value.auto_refresh
and self.screen.search_value == value.screen.search_value)
def destroy(self):
self.screen.destroy()
self.screen = None
self.widget = None
#self.scrolledwindow.destroy()
#self.scrolledwindow = None
def sel_ids_get(self):
return self.screen.sel_ids_get()
def ids_get(self):
return self.screen.ids_get()
def id_get(self):
return self.screen.id_get()
def sig_attach(self, widget=None):
record_id = self.id_get()
if record_id is False or record_id < 0:
return
Attachment(self.model, record_id,
lambda: self.update_attachment_count(reload=True))
def update_attachment_count(self, reload=False):
record = self.screen.current_record
if record:
attachment_count = record.get_attachment_count(reload=reload)
else:
attachment_count = 0
self._attachment_count(None, attachment_count)
def _attachment_count(self, widget, signal_data):
label = _('Attachment(%d)') % signal_data
self.buttons['attach'].set_label(label)
if signal_data:
self.buttons['attach'].set_stock_id('tryton-attachment-hi')
else:
self.buttons['attach'].set_stock_id('tryton-attachment')
record_id = self.id_get()
self.buttons['attach'].props.sensitive = bool(