jeffery9 / vscode-odoo-snippets

16 stars 16 forks source link

odoo-snippets README

demo

例如

  1. 模型名 ModelName > model.name
  2. 字段名 field_name > Field Name
  3. 记录名 view_model_name_viewtype > model.name.type.view

Enjoy!

The Snippets list;

  1. python snippets (Python)

  2. xml snippets (XML)

Python

prefix description
oo_TransactionCase
oo_addTypeEqualityFunc addTypeEqualityFunc
oo_api/depends decorator depends
oo_assertAlmostEqual assertAlmostEqual
oo_assertDictContainsSubset assertDictContainsSubset
oo_assertDictEqual assertDictEqual
oo_assertEqual assertEqual
oo_assertFalse assertFalse
oo_assertGreater assertGreater
oo_assertGreaterEqual assertGreaterEqual
oo_assertIn assertIn
oo_assertIs assertIs
oo_assertIsInstance assertIsInstance
oo_assertIsNone assertIsNone
oo_assertIsNot assertIsNot
oo_assertIsNotNone assertIsNotNone
oo_assertItemsEqual assertItemsEqual
oo_assertLess assertLess
oo_assertLessEqual assertLessEqual
oo_assertListEqual assertListEqual
oo_assertMultiLineEqual assertMultiLineEqual
oo_assertNotAlmostEqual assertNotAlmostEqual
oo_assertNotEqual assertNotEqual
oo_assertNotIn assertNotIn
oo_assertNotIsInstance assertNotIsInstance
oo_assertNotRegexpMatches assertNotRegexpMatches
oo_assertRaises assertRaises (extended)
oo_assertRaises assertRaises
oo_assertRaisesRegexp assertRaisesRegexp (extended)
oo_assertRaisesRegexp assertRaisesRegexp
oo_assertRegexpMatches assertRegexpMatches
oo_assertSequenceEqual assertSequenceEqual
oo_assertSetEqual assertSetEqual
oo_assertTrue assertTrue
oo_assertTupleEqual assertTupleEqual
oo_attr/_auto Adds the _auto attribute
oo_attr/_inherit Model attribute _inherit with a module list
oo_attr/_inherits Model attribute _inherits and single parent field
oo_auto_join Field attribute: auto_join
oo_comodel_name Field attribute: comodel_name
oo_company_dependent Field attribute: company_dependent
oo_compute Field attribute: compute
oo_compute_sudo Field attribute: compute_sudo
oo_constraints Model SQL contraints
oo_constraints Model Python contraints
oo_context Field attribute: context
oo_controller/controller Odoo web controller class
oo_controller/route Odoo web controller route
oo_copy Field attribute: copy
oo_copyright Copyright statement Full
oo_copyright Copyright statement Simple
oo_copyright Copyright statement Full
oo_def/log Common logging log method
oo_default Field attribute: search, lambda function
oo_default company Field attribute: default company
oo_default user Field attribute: default user
oo_default_model Field attribute: default_model
oo_digits Field attribute: digits
oo_digits/get_precision Field attribute: digits
oo_domain Field attribute: domain
oo_domain Field attribute: domain lambda
oo_fail fail
oo_feature/company_plant Adds the company/plant support
oo_feature/mail_thread Adds Mail Thread support
oo_feature/multi_company Adds the multi company support
oo_feature/needaction Adds NeedAction support
oo_feature/parent_child Adds the _parent_store attribute and parent_left and parent_right
oo_feature/status Adds state support
oo_feature/utm Adds utm support
oo_field.company_id
oo_fields.Attachment
oo_fields.Binary
oo_fields.Boolean
oo_fields.Char
oo_fields.Date
oo_fields.Datetime
oo_fields.Float
oo_fields.Html
oo_fields.Integer
oo_fields.Many2many
oo_fields.Many2one
oo_fields.One2many
oo_fields.Reference
oo_fields.Selection
oo_fields.Text
oo_file/__init__ __init__ file
oo_file/__manifest__ Odoo manifest file common structure
oo_file/__manifest__ Odoo manifest file common structure
oo_file/__openerp__ Odoo manifest file common structure
oo_file/coding utf-8 coding
oo_file/controller Odoo web controller file
oo_file/model Odoo model file
oo_help Field attribute: help
oo_import/datetime import date and time tools
oo_import/dp
oo_import/exceptions
oo_import/logging logging instance
oo_import/translate import odoo translate
oo_index Field attribute: index
oo_inverse Field attribute: inverse, lambda function
oo_limit Field attribute: limit
oo_method/_browse _browse method signature
oo_method/_onchange _onchange method signature, code
oo_method/_onchange _onchange method signature, domain
oo_method/_onchange _onchange method signature, warning
oo_method/_search _search method signature
oo_method/action_confirm action_confirm method signature
oo_method/compute _compute method signature
oo_method/copy copy method signature
oo_method/create create method signature
oo_method/default_get default_get method signature
oo_method/fields_get fields_get remove fields from search and groubby
oo_method/get_empty_list_help get_empty_list_help method signature
oo_method/get_formview_id get_formview_id method signature
oo_method/init init method signature
oo_method/name_get name_get method signature
oo_method/name_search name_search method signature
oo_method/toggle_active toggle_active method signature
oo_method/unlink unlink method signature
oo_method/unlink_restrict restrict unlink
oo_method/view_header_get view_header_get method signature
oo_method/view_init view_init method signature
oo_method/write write method signature
oo_model/abstract Odoo abstract model class
oo_model/inherit Odoo inherit model class
oo_model/model Odoo generic model class
oo_model/transient Odoo transient model class
oo_ondelete Field attribute: ondelete
oo_oodict/stock_move/~12
oo_readonly Field attribute: readonly
oo_readonly/states Field attribute: readonly states
oo_related Field attribute: related
oo_related_sudo Field attribute: related_sudo
oo_required Field attribute: required
oo_return/act_window pop window
oo_return/act_window_close close window
oo_selection_add Field attribute: selection_add
oo_selection_element Field attribute: selection add new element
oo_sequence/line_number Line Number Add 10 automaticlly
oo_sequence/next_by_code next_by_code, used in create()
oo_size Field attribute: size
oo_states Field attribute: states
oo_states/invisible Field attribute: states state invisible
oo_states/readonly Field attribute: states state readonly
oo_states/required Field attribute: states state required
oo_states/state Field attribute: states state
oo_store Field attribute: store
oo_string Field attribute: string
oo_super Call Python parent class
oo_test Test case method
oo_track_visibility Field attribute: track_visibility
oo_translate Field attribute: translate
oo_x2m/create x2m create
oo_x2m/delete x2m delete, don't use in create()
oo_x2m/link x2m link, don't use in One2many
oo_x2m/replace x2m replace, don't use in create() and One2many
oo_x2m/unlink x2m unlink, don't use in create()
oo_x2m/unlink_all x2m unlink all, don't use in create()
oo_x2m/update x2m update, don't use in create()

XML

prefix description
oo_action/binding Fully formated time relative to now
oo_arch/form Common form tag to be added inside a ir.ui.view
oo_arch/graph Common graph tag to be added inside a ir.ui.view
oo_arch/pivot Common graph tag to be added inside a ir.ui.view
oo_arch/search Common search tag to be added inside a ir.ui.view
oo_arch/tree Common tree tag to be added inside a ir.ui.view
oo_attribute
oo_attribute/domain
oo_attribute/domain
oo_attribute/invisible
oo_attribute/invisible
oo_attribute/options
oo_attribute/options
oo_attribute/readonly
oo_attribute/readonly
oo_attribute/required
oo_attribute/required
oo_attribute
oo_attrs field attr attrs
oo_attrs/invisible field attr attrs column_invisible
oo_attrs/invisible field attr attrs invisible
oo_attrs/readonly field attr attrs readonly
oo_attrs/required field attr attrs required
oo_button/cancel Cancel button tag definition
oo_button/full Common button tag definition
oo_button/inline Inline button tag definition
oo_chatter Common XML to add a tracking area inside a form view
oo_class/oe_edit_only field attr class oe_edit_only
oo_class/oe_inline field attr class oe_inline
oo_class/oe_left field attr class oe_left
oo_class/oe_no_avatar field attr class oe_no_avatar
oo_class/oe_no_button field attr class oe_no_button
oo_class/oe_read_only field attr class oe_read_only
oo_class/oe_right field attr class oe_right
oo_context tag attr context
oo_create tag attr create
oo_decoration field attr decoration
oo_default_order field attr default_order
oo_delete tag attr delete
oo_domain field attr domain
oo_duplicate tag attr duplicate
oo_edit tag attr edit
oo_extid/group_no_one
oo_extid/group_system
oo_field/boolean Common XML tag for field type Boolean
oo_field/char Common XML tag for field type Char
oo_field/compound Compound field
oo_field/date Common XML tag for field type Date
oo_field/datetime Common XML tag for field type Datetime
oo_field/float Common XML tag for field type Float
oo_field/full Full field tag
oo_field/html Common XML tag for field type Html
oo_field/inline Inline field tag
oo_field/integer Common XML tag for field type Integer
oo_field/many2many Common XML tag for field type Many2many
oo_field/many2one Common XML tag for field type Many2one
oo_field/one2many Common XML tag for field type One2many
oo_field/selection Common XML tag for field type Selection
oo_field/simple Simple field tag
oo_field/text Common XML tag for field type Text
oo_field_group_ids/display_incoterm
oo_field_group_ids/multi_company
oo_field_group_ids/no_one
oo_field_group_ids/production_lot
oo_field_group_ids/stock_multi_locations
oo_field_group_ids/system
oo_field_group_ids/tracking_lot
oo_field_group_ids/tracking_owner
oo_field_group_ids/uom
oo_field_groups_id
oo_file/xml Common base XML structure to be used in Odoo module data files
oo_filter/archive Filter archived
oo_filter/latest_by_day Filter list latest order by days
oo_filter_domain field attr filter_domain
oo_function
oo_group_display_incoterm
oo_group_multi_company
oo_group_no_one
oo_group_production_lot
oo_group_stock_multi_locations
oo_group_system
oo_group_tracking_lot
oo_group_tracking_owner
oo_group_uom
oo_groups
oo_groups field attr groups
oo_invisible field attr invisible
oo_layout/button_box layout button_box definition
oo_layout/group
oo_layout/label Field Label
oo_layout/separator Common separator tag to be added inside a ir.ui.view
oo_link Link tag to inglude an stylesheet
oo_notebook
oo_notebook/page
oo_options/always_reload field attr options always_reload
oo_options/no_create field attr options no_create
oo_options/no_create_edit field attr options no_create_edit
oo_options/no_open field attr options no_open
oo_options/no_quick_create field attr options no_create/no_open/no_create_edit
oo_options/reload_whole_on_button field attr options reload_whole_on_button
oo_position/after xpath position/after
oo_position/attributes xpath position/attributes
oo_position/before xpath position/before
oo_position/inside xpath position/inside
oo_qweb_t-att Qweb named attribute
oo_qweb_t-att Qweb attribute
oo_qweb_t-attf Qweb format string attribute
oo_qweb_t-call Qweb inline call template
oo_qweb_t-call Qweb call template
oo_qweb_t-esc Qweb data output
oo_qweb_t-extend Qweb template inheritance
oo_qweb_t-field Qweb field access
oo_qweb_t-foreach Qweb loop
oo_qweb_t-if Qweb inline conditional
oo_qweb_t-if Qweb conditional
oo_qweb_t-js Qweb javascript
oo_qweb_t-log Qweb logging
oo_qweb_t-name Qweb top level named template
oo_qweb_t-raw Qweb template from context
oo_qweb_t-set Qweb inline variable
oo_qweb_t-set Qweb variable
oo_readonly field attr readonly
oo_record
oo_record/assets Include module assets in backend views
oo_record/base.action.rule Common record definition for base.action.rule
oo_record/email.template Common record definition for email.template
oo_record/filter Common ir.filters record definition
oo_record/ir.actions.act_window Common record definition for ir.actions.act_window
oo_record/ir.actions.act_window.view Common record definition for ir.actions.act_window.view
oo_record/ir.actions.report.xml Common record definition for ir.actions.report.xml
oo_record/ir.actions.server Common record definition for ir.actions.server, invoking a client action
oo_record/ir.actions.server Common record definition for ir.actions.server, running Python code
oo_record/ir.actions.server Common record definition for ir.actions.server, executing multiple actions
oo_record/ir.actions.server Common record definition for ir.actions.server, creating objects
oo_record/ir.actions.server Common record definition for ir.actions.server, updating objects
oo_record/ir.actions.server Common record definition for ir.actions.server, triggering
oo_record/ir.actions.todo
oo_record/ir.config_parameter Common ir.config_parameter record definition
oo_record/ir.model Common record definition for ir.model
oo_record/ir.model.access XML ir.model.access record
oo_record/ir.model.data Common record definition for ir.model.data
oo_record/ir.module.category XML ir.model.category record
oo_record/ir.rule XML ir.rule record
oo_record/ir.values Common record definition for ir.values
oo_record/menu Common ir.ui.menu record definition
oo_record/product.product XML product.product record
oo_record/product.template XML product.template record
oo_record/res.groups XML res.groups record
oo_record/view Common ir.ui.view record definition
oo_ref field attr ref
oo_report.paperformat Common record definition for report.paperformat
oo_report_fullreport Report: document and translation; action.report.xml and ir.values
oo_report_layout Report external_layout
oo_report_layout Report external_layout_footer
oo_report_layout Report external_layout_header
oo_report_layout Report html_container
oo_report_layout Report internal_layout
oo_report_layout Report layout
oo_report_layout Report minimal_layout
oo_report_layout Report style
oo_report_t Report qweb container
oo_report_t-raw Qweb translate document
oo_required field attr required
oo_script Script tag to inglude an javascript
oo_search/filter Common filter tag to be added inside a search view
oo_search/group_by
oo_smart_button smart button definition
oo_status Adds state support
oo_statusbar Include module assets in backend views
oo_time/relativetime Fully formated time relative to now
oo_time/strftime Fully formated strftime
oo_view/full Views: tree, form, search; act_window and menu
oo_view/inherit Inherited Views: tree, form, search
oo_view/inherit Inherited Views: tree, form
oo_widget/ace widget ace editor
oo_widget/boolean_button widget boolean_button
oo_widget/image widget image
oo_widget/image widget image
oo_widget/many2many widget many2many
oo_widget/many2many_binary widget many2many_binary
oo_widget/many2many_checkboxes widget many2many_checkboxes
oo_widget/many2many_kanban widget many2many_kanban
oo_widget/many2many_tags widget many2many_tags
oo_widget/percentpie widget percentpie
oo_widget/progressbar widget progressbar
oo_widget/radio widget radio
oo_widget/selection widget selection
oo_widget/statinfo widget statinfo
oo_widget/statusbar widget statusbar
oo_widget/toggle_button widget toggle_button
oo_xpath Common xpath tag to be added inside a ir.ui.view