VSCodeとDockerを組み合わせたOdooのカスタムモジュール用アドオン開発環境のテンプレート。
Add-ons development environment template for Odoo's custom modules that combines VSCode and Docker.
本テンプレートは、Odooのカスタムモジュール用アドオン開発環境のテンプレートです。
This template is add-ons development environment template for Odoo's custom modules.
VSCodeとDockerを組み合わせているため、簡単にOdooのカスタムモジュール用アドオン開発環境を構築でき、すぐに開発を始めることができます。もちろん、Odoo標準のアプリケーションの動作検証を行うこともできます。
With the combination of VSCode and Docker, you can easily build add-ons development environment for Odoo's custom modules and start developing right away. Of course, you can also verify the operation of standard Odoo applications.
次のツールをインストールしてください。
Install the following tools.
-
GitHubのリポジトリを開きます。
Open the repository on github.
https://github.com/jp-rad/odoo-addons-dev -
Use this template
をクリックします。
ClickUse this template
.
Here - https://github.com/jp-rad/odoo-addons-dev/generate
- コマンドプロンプトを開き、次のコマンドを実行します。
Open the command prompt and run below commands.
mkdir c:\workgit
cd c:\workgit
git clone <your GitHub Code URL>
- VSCodeで、git cloneしたフォルダを開きます。
Open the git cloned folder in VSCode. - VSCodeに拡張機能「Remote - Containers」をインストールします。
Install the "Remote - Containers" extension to VSCode. - VSCodeの左下に拡張機能「Remote - Containers」のアイコンが追加されますので、そのアイコンをクリックします。
An icon for the extension "Remote - Containers" will be added to the bottom left corner of VSCode, click on that icon. - 「Remote-Containers: Reopen in Container」をリストから選択します。
Select "Remote-Containers: Reopen in Container" from the list. - Dockerコンテナーが起動し、VSCodeからリモート開発ができるようになります。
The Docker container will start and you will be able to develop remotely from VSCode.
- 「custom_addons」フォルダ内で、アドオンの開発が可能です。Odooチュートリアル等を参考にしてください。
You can develop your own add-ons in "custom_addons" folder, see the Odoo tutorials, etc.
https://www.odoo.com/documentation/master/developer/howtos/backend.html - 空のモジュールを新規追加するには、次のコマンドを実行します。
To add a new empty module, issue the following command
/opt/odoo/odoo/odoo-bin scaffold <module name>
- VSCodeの左にある「Debug and Run」アイコンをクリックし、「Odoo addons」を選んだ状態で、「Start Debugging」アイコンをクリックすると、Odooが起動します。
Click on the "Debug and Run" icon on the left of VSCode, and with "Odoo addons" selected, click on the "Start Debugging" icon to start Odoo. - Odooが起動したら、ブラウザーを開き、Odooにアクセスして、ログインしてください(admin/admin)。
Once Odoo is running, open your browser, access Odoo, and log in (admin/admin).
http://localhost/