コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
239 ビュー

Hi All, 

I've recently started to create modules in Odoo I'm very new at it and I'm running into some issues.  When crated modules that extend native models in odoo i have no issue merging my branches and the applications work fine from there. 

However, when I'm making new models that aren't native the database wont instantiate them when a merge is done.  Instead I'd need to upload my code into the addons path in the sh editor. 

Is there a better way to edit code on SH? any help would be appreciated.  Also I think I'm finally getting the hang on this development but I have so many questions to ask and no one to really help me.  Is there anyway I can get someone to guide me on the processes(don't recommend me the documentation I know the basics )

アバター
破棄
最善の回答

Hi,

Steps:

When you add a new custom module:

1. Push it to your GitHub repo (linked to Odoo.sh).

2. Merge to your dev branch.

In the Odoo.sh build:

Go to Apps → Activate Developer Mode → Click Update Apps List.

Install your new module like any other app.


For more details, please refer to the following links:

1. https://www.odoo.com/documentation/18.0/administration/odoo_sh/getting_started/first_module.html

2. https://www.cybrosys.com/blog/how-to-deploy-module-in-odoo-17-using-odoo-sh

3. https://www.youtube.com/watch?v=rZaHSTvljuA

4. https://www.cybrosys.com/blog/odoo-sh-a-complete-guide-to-the-online-editor

5. https://www.cybrosys.com/blog/how-to-configure-submodules-in-odoosh


Hope it helps.

アバター
破棄
最善の回答

Hi,

On Odoo SH, when you push a branch that introduces a new model (using _name), the database does not automatically create the corresponding tables. This is because a module upgrade does not install new modules automatically.

Extending existing models (_inherit) works fine after a merge.But creating brand-new models requires the module to be installed first.


please try this method:


  • To make new models available on Odoo SH, you must install the module once in your SH database.
  • Push your new module to Odoo SH.
  • Open your SH build (the Odoo instance).
  • Go to Apps → Update Apps List.
  • Search for your new module and click Install.
  • Once installed, Odoo will create the required database tables.
  • From then on, when you push updates to the same module, Odoo SH will handle the upgrades automatically.
アバター
破棄
関連投稿 返信 ビュー 活動
2
8月 25
235
2
8月 25
275
2
8月 25
458
0
8月 25
428
1
8月 25
941