Odoo Apps Demo
Our Awards

Pycharm the best IDE for Python | Odoo

Pycharm-the-best-IDE-for-Python-Odoo-e1559372600594
Author

Arunima PFeb. 14, 2019

What is IDE?

IDE stands for Integrated Development Environment. IDE provide everything needed together to develop and also test software applications. Most IDE's support many different programming languages and they also contain many more features. You may also need advanced knowledge to use them properly. As a result, it is difficult to become an expert in an any IDE. Here, let's see how pycharm works for odoo python development. Before that, typically an IDE consists of following:

  • Code editor
  • Compiler/Interpreter
  • Debugger
  • Build Automation tools

What is Pycharm?

Pycharm is an IDE for programming, specifically for the Python programming. It is developed by Czech company Jetbrains as a cross platform IDE for Python.

In addition to supporting versions 2.x and 3.x of Python , it is also compatible with Windows,Linux, and macOS. It contains all the tools which a Python programmer needs to be productive. Moreover, this includes an excellent programming text editor, syntax highlighting, code completion, project navigation, database tooling, and project options for web development. pycharm for odoo python development

The Python programmers can use PyCharm as licensed software. However, JetBrains allows developers to choose from three distinct editions of the IDE — community, professional and also educational. But, the developers always choose community edition of PyCharm. The community edition still lacks some of the advanced features provided by the professional editions.

Why Pycharm for Odoo Python Development ?

If you are using Python, then you must be familiar with the fact that, there are so many options available for Python IDEs. You might feel some difficulties choosing an IDE for Python.

PyCharm is one of the most widely used IDEs for Python programming language. Pycharm for odoo python development is very useful working environment odoo.

Advantage of Pycharm for Odoo Python Development

PyCharm of course comes with a bunch of features. PyCharm is much more powerful for programming. You have integration with git, with ssh, with shell console. Code analysis is very powerful, also cross modules and also keyboard handling is much better. That is to say, it is the best ide for odoo python development.

The main advantages of Pycharm over other IDE:

Some of the features which makes it worth using are:

  • Web development framework support:
    In addition to Python, PyCharm provides first-class support for various Python web development frameworks, specific template languages, JavaScript, CoffeeScript, TypeScript, HTML/CSS, AngularJS, Node.js, and more.
  • Version control
  • Intelligent code assistant.
  • Graphical debugger and test runner.
  • It supports numerous of Python libraries
  • On-the-fly error checking and quick-fixes
  • Code folding
  • Unit Testing
  • Line Numbering
  • PEP-8 checks and recommendations improve the code quality.
  • Intuitive Project navigation
  • Smart Refactoring
  • Database Support
  • Remote Development Capabilities
  • Tons of plugins and integrated terminals.
  •  

How to use Pycharm for Odoo Python development?

1. Create a new project /Open a project

For create,

File →New Project

Then in the Location field replace untitled with your project name.

After click on the Create button on the bottom right.

For open a project,

File → Open

Then select your project

pycharm for odoo python development

Open file for project in pycharm for odoo python development

2. Create a file/directory

Right click on the project and you can create a file or directory or anything as listed.

Create a file or directory in pycharm for odoo python development

3. Run your file/Project

For Run , just Right click in the file. Then Click on Run.

Another method is configure the Python file which you want to run.

Click on Add configuration button on the top right side of window.

Run the file/Project in pycharm for odoo python development

Then, Configure your file. Here you can set Python interpreter as per your need.

Simply set Script path of your file and then click on Apply.

Then, you can run your file.

Here we discuss simply how to use PyCharm. In addition, there are many uses and features and have many tips and shortcuts while using PyCharm for your project.

Tips and Shortcuts

It is time to take become an expert in any IDE. There are many tips and shortcuts for any IDE. Here we discuss almost all tips and shortcuts of PyCharm.

Let’s ready to become an expert in PyCharm.

When you open your PyCharm freshly you can see basic tips you need.

basic tips for using pycharm for odoo python development

  • Version Control System(VCS)
    1.Local History You can see the changes you made to your code by go to VCS →Local History→Show History

  • Debugging is very helpful to resolving errors in your code.
    1. Click o the left side of the line, where you want to stop your code. Then a red dots will appear.

For stoping the code click on the left side of the line

2.Click on the Debugger icon (  Debugger icon )in the top right in your window.

debug icon

3.Code stops on the first red dots. Then you can execute line by line by click F8 and then place mouse pointer on the variable, you can see the values or it will shows in below debug tab.

execute line by line by click F8

4. Skip to next dot by click F9.

Keyboard Shortcuts

If you use keyboard shortcuts,then you can significantly speed up your coding.

The following lists some of the most useful shortcuts to learn.

  • View recently opened files.

    Ctrl + E

View recently opened files

  • Recently edited files.

     Ctrl + Shift + F

Recently edited files

  • Recent changes.

    Alt + Shift + C

Recent changes

  • Search in a file.

    Ctrl + F

Search in a file

  • Search in entire file.

    Ctrl + Shift + F

Search in entire file

  • Replace in a file.

    Ctrl + R

Replace in a file

  • Replace in entire file.

    Ctrl + Shift + R

Replace in entire file

  • Duplicate Line or selection.

     Ctrl +D

Duplicate Line or selection

  • Reformat code.

    Ctrl + Alt + L

Reformat code

  • Show reformat file dialog.

    Ctrl + Alt + Shift + L

Show reformat file dialog

  • Add selection for next occurrence.

    Alt + J

Add selection for next occurrence

  • Add selection for occurrence in current file.

     Alt + Shift + Ctrl + J

Add selection for occurrence in current file

  • Add selection for last selected line or word in any file.

    Ctrl + Shift + L

Add selection for last selected line or word in any file

  • Go to Declaration.

    Ctrl + Click

Go to Declaration

  • Find Usages.

    Alt + Shift + 7

Find Usages

  • View quick definition.

    Ctrl + Shift + I

View quick defenition, a feature in pycharm for odoo python development

  • Comment your code with line comment.

    Ctrl + /

Comment youe code with line comment in pycharm for odoo python development

  • Comment your code with block comment in templates.

    Ctrl + Shift + /

Comment your code with block comment in templates of pycharm for odoo python development

  • Go to Class, File, Symbols, Actions

    Ctrl + N

Go to Class, File, Symbols

  • Code completion.

    Ctrl + Space

Code completion

  • Go to line/column.

    Ctrl + G

Go to line/column

  • Comparison of two files. 1.Select a file to compare with another file

Comparison of two files in pycharm, the best ide for odoo python development

2.Press     Ctrl + D

3.Select a file which you want to compare .

select a file which want to compare in pycharm the best ide for odoo python development

4. Click Ok. Then you can see the comparison between the two files in same or different project.

view comparison between the two files in same or different project

  • Refactor or Rename

    Shift + F6

Refactor or Rename in pycharm, the best ide for odoo python development

  • List of Valid Parameters

    Ctrl + P

List of Valid Parameters in pycharm, the Best ide for odoo python development

  • Last place where you make changes.Ctrl + Shift + Backspace
  • Join LinesCtrl + Shift + J
  • Delete LineCtrl + Y
  • Quickly move between methods in the editor.Alt + Up and Alt + Down
  • Easily make Column Selection by dragging your mouse pointer while keeping the Alt key pressed.

Last place to make changes in Best ide for odoo python development

  • By pressing Alt + Shift + F10 you can access the Run/Debug drop down on the main tool bar ,without need to use your mouse .
    Enable horizontal scrolling with the mouse wheel by holding Shift key.

In short, hope you understood the best idea for odoo python development is Pycharm..

Odoo_ERP_Services

0

0

Comments