本文整理汇总了Python中tryton.gui.window.view_form.screen.Screen.copy方法的典型用法代码示例。如果您正苦于以下问题:Python Screen.copy方法的具体用法?Python Screen.copy怎么用?Python Screen.copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tryton.gui.window.view_form.screen.Screen
的用法示例。
在下文中一共展示了Screen.copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Form
# 需要导入模块: from tryton.gui.window.view_form.screen import Screen [as 别名]
# 或者: from tryton.gui.window.view_form.screen.Screen import copy [as 别名]
class Form(SignalEvent, TabContent):
"Form"
toolbar_def = [
('new', 'tryton-new', _('New'), _('Create a new record'),
'sig_new'),
('save', 'tryton-save', _('Save'), _('Save this record'),
'sig_save'),
('switch', 'tryton-fullscreen', _('Switch'), _('Switch view'),
'sig_switch'),
('reload', 'tryton-refresh', _('_Reload'), _('Reload'),
'sig_reload'),
(None,) * 5,
('previous', 'tryton-go-previous', _('Previous'),
_('Previous Record'), 'sig_previous'),
('next', 'tryton-go-next', _('Next'), _('Next Record'),
'sig_next'),
(None,) * 5,
('attach', 'tryton-attachment', _('Attachment(0)'),
_('Add an attachment to the record'), 'sig_attach'),
('note', 'tryton-note', _('Note(0)'),
_('Add a note to the record'), 'sig_note'),
]
menu_def = [
(_('_New'), 'tryton-new', 'sig_new', '<tryton>/Form/New'),
(_('_Save'), 'tryton-save', 'sig_save', '<tryton>/Form/Save'),
(_('_Switch View'), 'tryton-fullscreen', 'sig_switch',
'<tryton>/Form/Switch View'),
(_('_Reload/Undo'), 'tryton-refresh', 'sig_reload',
'<tryton>/Form/Reload'),
(_('_Duplicate'), 'tryton-copy', 'sig_copy',
'<tryton>/Form/Duplicate'),
(_('_Delete...'), 'tryton-delete', 'sig_remove',
'<tryton>/Form/Delete'),
(None,) * 4,
(_('_Previous'), 'tryton-go-previous', 'sig_previous',
'<tryton>/Form/Previous'),
(_('_Next'), 'tryton-go-next', 'sig_next', '<tryton>/Form/Next'),
(_('_Search'), 'tryton-find', 'sig_search', '<tryton>/Form/Search'),
(_('View _Logs...'), None, 'sig_logs', None),
(_('Show revisions...'), 'tryton-clock', 'revision', None),
(None,) * 4,
(_('_Close Tab'), 'tryton-close', 'sig_win_close',
'<tryton>/Form/Close'),
(None,) * 4,
(_('A_ttachments...'), 'tryton-attachment', 'sig_attach',
'<tryton>/Form/Attachments'),
(_('_Notes...'), 'tryton-note', 'sig_note', '<tryton>/Form/Notes'),
(_('_Actions...'), 'tryton-executable', 'sig_action',
'<tryton>/Form/Actions'),
(_('_Relate...'), 'tryton-go-jump', 'sig_relate',
'<tryton>/Form/Relate'),
(None,) * 4,
(_('_Report...'), 'tryton-print-open', 'sig_print_open',
'<tryton>/Form/Report'),
(_('_E-Mail...'), 'tryton-print-email', 'sig_print_email',
'<tryton>/Form/Email'),
(_('_Print...'), 'tryton-print', 'sig_print',
'<tryton>/Form/Print'),
(None,) * 4,
(_('_Export Data...'), 'tryton-save-as', 'sig_save_as',
'<tryton>/Form/Export Data'),
(_('_Import Data...'), None, 'sig_import',
'<tryton>/Form/Import Data'),
]
def __init__(self, model, res_id=False, domain=None, order=None, mode=None,
view_ids=None, context=None, name=False, limit=None,
search_value=None, tab_domain=None, context_model=None):
super(Form, self).__init__()
if not mode:
mode = ['tree', 'form']
if domain is None:
domain = []
if view_ids is None:
view_ids = []
self.model = model
self.res_id = res_id
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
#.........这里部分代码省略.........