odoo self.env
self.env.cr 或者 self._cr 数据库游标访问, 用于查询数据库
self.env.uid 或者 self._uid 当前用户ID
self.env.user 当前用户
self.env.context, 或者 self._context 上下文字典对象
self.env.ref(xml_id) 返回与xml id对应的记录
self.env[model_name] 返回给定模型的实例
self.pool.get('processstate') #获取其他模块
['CONCURRENCY_CHECK_FIELD', '_BaseModel__base_classes', '_BaseModel__ensure_xml_id', '__add__', '__and__', '__bool__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__iter__', '__last_update', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__nonzero__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__setattr__', '__setitem__', '__sizeof__', '__slots__', '__str__', '__sub__', '__subclasshook__', '_abstract', '_active_name', '_add_fake_fields', '_add_field', '_add_inherited_fields', '_add_missing_default_values', '_add_precomputed_values', '_add_sql_constraints', '_alias_get_error_message', '_apply_ir_rules', '_auto', '_auto_init', '_build_model', '_build_model_attributes', '_build_model_check_base', '_build_model_check_parent', '_cache', '_check_company', '_check_company_auto', '_check_m2m_recursion', '_check_parent_path', '_check_qorder', '_check_recursion', '_check_removed_columns', '_compute_concurrency_field', '_compute_display_name', '_compute_field_value', '_constraint_methods', '_context', '_convert_records', '_convert_to_record', '_convert_to_write', '_cr', '_create', '_custom', '_date_name', '_dependent_fields', '_depends', '_description', '_export_rows', '_extract_records', '_fetch_field', '_field_definitions', '_fields', '_fields_view_get', '_filter_access_rules', '_filter_access_rules_python', '_flush', '_flush_search', '_fold_name', '_generate_m2o_order_by', '_generate_order_by', '_generate_order_by_inner', '_get_access_action', '_get_default_activity_view', '_get_default_calendar_view', '_get_default_form_view', '_get_default_graph_view', '_get_default_kanban_view', '_get_default_pivot_view', '_get_default_search_view', '_get_default_tree_view', '_get_external_ids', '_get_html_link', '_get_placeholder_filename', '_get_view', '_get_view_cache', '_get_view_cache_key', '_get_view_field_attributes', '_get_view_fields', '_has_onchange', '_ids', '_in_cache_without', '_inherit', '_inherit_children', '_inherit_module', '_inherits', '_inherits_check', '_inherits_children', '_inherits_join_add', '_inherits_join_calc', '_init_column', '_init_constraints_onchanges', '_invalidate_cache', '_is_an_ordinary_table', '_load_records', '_load_records_create', '_load_records_write', '_local_sql_constraints', '_log_access', '_mail_get_message_subtypes', '_mail_track', '_mapped_func', '_message_get_default_recipients', '_model_classes', '_modified_triggers', '_module', '_name', '_name_search', '_notify_by_email_get_headers', '_notify_get_reply_to', '_notify_get_reply_to_formatted_email', '_onchange_eval', '_onchange_methods', '_onchange_spec', '_ondelete_methods', '_order', '_origin', '_original_module', '_parent_name', '_parent_store', '_parent_store_compute', '_parent_store_create', '_parent_store_update', '_parent_store_update_prepare', '_patch_method', '_pop_field', '_populate', '_populate_dependencies', '_populate_factories', '_populate_sizes', '_prefetch_ids', '_prepare_create_values', '_prepare_setup', '_read', '_read_format', '_read_group', '_read_group_expand_full', '_read_group_fill_results', '_read_group_fill_temporal', '_read_group_format_result', '_read_group_prepare', '_read_group_prepare_data', '_read_group_process_groupby', '_read_group_raw', '_read_group_resolve_many2x_fields', '_read_progress_bar', '_rec_name', '_rec_name_fallback', '_rec_names_search', '_recompute_field', '_recompute_model', '_recompute_recordset', '_register', '_register_hook', '_revert_method', '_search', '_search_panel_domain_image', '_search_panel_field_image', '_search_panel_global_counters', '_search_panel_sanitized_parent_hierarchy', '_search_panel_selection_range', '_setup_base', '_setup_complete', '_setup_done', '_setup_fields', '_sql_constraints', '_table', '_table_has_rows', '_table_query', '_transient', '_transient_max_count', '_transient_max_hours', '_translate', '_uid', '_unregister_hook', '_update_cache', '_update_field_translations', '_valid_field_parameter', '_validate_fields', '_web_read_group', '_where_calc', '_write', 'action_archive', 'action_unarchive', 'browse', 'check_access_rights', 'check_access_rule', 'check_field_access_rights', 'clear_caches', 'concat', 'copy', 'copy_data', 'copy_translations', 'create', 'create_date', 'create_uid', 'default_get', 'display_name', 'ensure_one', 'env', 'exists', 'export_data', 'fields_get', 'fields_get_keys', 'fields_view_get', 'filtered', 'filtered_domain', 'flush', 'flush_model', 'flush_recordset', 'get_base_url', 'get_empty_list_help', 'get_external_id', 'get_field_translations', 'get_formview_action', 'get_formview_id', 'get_import_templates', 'get_metadata', 'get_view', 'get_views', 'get_xml_id', 'id', 'ids', 'init', 'invalidate_cache', 'invalidate_model', 'invalidate_recordset', 'is_transient', 'load', 'load_views', 'mapped', 'modified', 'name', 'name_create', 'name_get', 'name_search', 'new', 'onchange', 'pool', 'qweb_render_view', 'read', 'read_group', 'read_progress_bar', 'recompute', 'refresh', 'search', 'search_count', 'search_panel_select_multi_range', 'search_panel_select_range', 'search_read', 'sorted', 'sudo', 'toggle_active', 'union', 'unlink', 'update', 'update_field_translations', 'update_field_translations_sha', 'user_has_groups', 'view_header_get', 'web_read_group', 'web_search_read', 'with_company', 'with_context', 'with_env', 'with_prefetch', 'with_user', 'write', 'write_date', 'write_uid']