Use [] to find tag! Example: [flutter, javascript]

Odoo ERP Development
Odoo ERP Development

Chapter 3

VS Code Configuration

remove_red_eye 942 Times
spellcheck 236 Words, 1628 Characters
*Note: this book is still ongoing until it has a finished label.

Configuring VS code is one of our ways to increase work productivity and team work alignment in terms of formatter. Therefore, this article will be very useful for those of you who are learning or working with a team in odoo development.

Extensions

There are several extensions to increase our productivity, namely as follows.

1. Odoo Code Snippets

Helps to speed up our work in creating XML and Python code in developing Odoo modules.

2. Odoo IDE

Helps us in autocomplete code. This will be very useful in our work productivity, because we don't need to memorize the fields in our parent model, in our xml, and so on.

3. Owl Vision

It helps us in owl code development, this extension provides autocomplete for variables in xml and javascript.

Formatter Settings

To set up the formatter you must do the following steps:

1. Create a folder .vscode

2. Create a settings.json file in the .vscode folder

3. Provide the following configuration code in your settings.json file


{
  "python.languageServer": "None",
  "[python]": {
    "editor.defaultFormatter": "ms-python.autopep8",
    "editor.formatOnSave": true,
    "editor.wordWrap": "wordWrapColumn",
    "editor.wordWrapColumn": 160,
    "editor.tabSize": 4,
    "editor.detectIndentation": true,
    "editor.insertSpaces": true
  },
  "[xml]": {
    "editor.autoClosingBrackets": "never",
    "files.trimFinalNewlines": true,
    "editor.wordWrap": "wordWrapColumn",
    "editor.wordWrapColumn": 160,
    "editor.tabSize": 4,
    "editor.detectIndentation": false,
    "editor.insertSpaces": false
  },
  "python.analysis.typeCheckingMode": "standard"
}
Next Article (Model)
Content Navigation