跳至内容
菜单
此问题已终结
3 回复
2092 查看

Hello, I'm seeking a method to efficiently deploy specific configurations from one Odoo project to another that hosted on the cloud, without the need for manual replication. Importantly, I wish to avoid exporting the entire database, as I only require the configurations and not the entirety of the data. How can I accomplish this seamlessly?  

形象
丢弃
编写者

Thank you, Jort .I am seeking is a method to deploy the configurations made through the graphical interface, such as creating new user groups. The solution you provided pertains to deploying the source code rather than the configurations modified or created via the graphical interface.

In that case I misunderstood your question. You can create a custom module where you add the required configuration in a xml data file. I always advice to look at the source code of existing modules. You can, e.g., take a look at the demo data for modules. E.g., https://github.com/odoo/odoo/blob/17.0/addons/sale/data/sale_demo.xml

Note the noupdate attribute. This will determine if the data remains in the database after uninstall/update.

I hope this helps!

最佳答案

One of the most robust ways to transfer configurations without data is to encapsulate those configurations within custom modules. This method involves:

  • Identifying Configurations: Pinpoint the configurations you need to transfer. This could be specific settings within Odoo apps, custom fields, workflows, etc.
  • Custom Module Creation: Develop a custom module (or modules) that programmatically set these configurations upon installation. This can involve overriding models to set default values, writing data files within the module to create records for configurations (e.g., XML or CSV files that set up specific records like product categories, sales taxes, etc.), or using server actions to adjust settings post-installation.

By deploying these modules to your other Odoo instance, you can apply the configurations without carrying over the existing database's transactional data.

形象
丢弃
最佳答案

Infrastructure as code (e.g., Packer, Terraform), or containers (e.g., Docker, Docker Swarm, K8s) might be something you are looking for. This allows you to configure a server, or Docker container, which you can deploy whenever you want. You might want to take at my blog post: How to launch your Odoo server on the cloud instantly or Dock, Stack & Launch: Odoo deployment with Docker and Portainer.

I hope this helps

形象
丢弃
编写者 最佳答案

Hello Hans, I appreciate your response. Upon reviewing the information you provided, I realized that as a newcomer to Odoo, I still require further clarification on how to effectively implement the proposed solution. Could you kindly provide a more detailed explanation or walkthrough of the steps involved? Your expertise would greatly assist me in comprehending and executing this solution accurately. Thank you.

形象
丢弃
相关帖文 回复 查看 活动
4
10月 24
1416
0
4月 24
1674
Assign groups 已解决
1
1月 25
2276
0
3月 24
1857
1
8月 25
1522