更新Odoo源代码

阅读(29) 最后更新: 2019年2月16日 17:40

上一页 创建分期环境 | 摘要 下一页

翻译进度 100%

自助翻译

作为服务的一部分,企业合同客户可以期待早期的电子邮件通知,提醒他们这类问题。
As part of the service, enterprise contract customers can expect early email notifications alerting them to this type of issue.
但是,如果您需要一个特定的bug修复,则应该考虑更早的更新。请记住,也要注意在公共渠道(如Odoo的GitHub问题)上暴露的安全漏洞,特别是那些在https://github.com/odoo/Problems上显示安全标记的漏洞?Q=is%3AIss+Label%3ASecurity,或Odoo官方邮件列表,可以在https://www.odoo.com/groups.订阅的
If you need a specific bug fix, however, an earlier update should be considered.Remember to also watch out for security bug disclosures on public channels such as GitHub Issues for Odoo, in particular, ones displaying the Security tag, at https://github.com/odoo/odoo/ issues?q=is%3Aissue+label%3ASecurity, or the Odoo official mailing lists, which can be subscribed to at https://www.odoo.com/groups.
完成后,我们可以使用Git将新版本拉到生产存储库中,并完成如下升级:$sudo su odoo$cd~/odoo-12$git标记-force 12-Last-prod$git拉$sudo$sudo service Odoo重新启动#或:Sudo system ctl重新启动Odoo没有必要太频繁地更新,但是,也不建议您在更新之间等待一年。每隔几个月执行一次更新通常是可以的。此外,请注意,重新启动服务器应该足够启用代码更新,而且模块升级并不总是必要的。
After this is complete, we can pull the new versions to the production repository using Git and complete the upgrade as follows: $ sudo su odoo $ cd ~/odoo-12 $ git tag --force 12-last-prod $ git pull $ exit $ sudo service odoo restart # or: sudo systemctl restart odoo There's no point in updating too frequently, but it's not advised that you wait a year between updates either.Performing an update every few months is usually fine.Also note that a server restart should be enough to enable code updates—and that module upgrades aren't always necessary.
这将使您能够在必要时回滚任何更改。在升级之前保持数据库的备份也是高度建议的。
This will enable you to rollback any changes if necessary.Keeping a backup of the database before an upgrade is also highly advised.
如果出了问题,我们可以用下面的代码将代码恢复到早期版本:$sudo su odoo$cd~/odoo-12$git签出12-最后-如果一切按预期运行,那么在生产服务上执行升级应该是安全的,这通常是通过重新启动它来完成的。如果您想执行实际的模块升级,建议的方法是停止服务器,运行升级,然后重新启动服务,如下:$sudo服务Odoo停止$sudo su-c“~/odoo-12/odoo-bin-c/etc/odoo/odo.conf”-u base
If something goes wrong, we can revert the code to an earlier version with the following code: $ sudo su odoo $ cd ~/odoo-12 $ git checkout 12-last-prod $ exit If everything works as expected, it should be safe to perform an upgrade on the production service, which is usually done by restarting it.If you want to perform an actual module upgrade, the suggested approach is to stop the server, run the upgrade, and then restart the service, as follows: $ sudo service odoo stop $ sudo su -c "~/odoo-12/odoo-bin -c /etc/odoo/odoo.conf" \ " -u base --stop-after-init" odoo $ sudo service odoo start Remember to make a note of the Git reference in use by checking out the necessary version.
现在是启动Odoo暂存服务器的时候了,它将在它的暂存数据库上使用更新代码,如下:$~/Odoo-12/Odoo-bin-d Odoo-Stage-http-port=8080\-c/etc/odoo/odoo.conf#可选添加:-u base$Exit此Odoo暂存服务器配置为在8080端口上侦听。我们可以使用我们的web浏览器在那里导航,使用地址(如http://localhost:8080,)检查升级后的代码是否正确工作。
Now it's time to start the Odoo staging server, which will use the update code on it staging database, as follows: $ ~/odoo-12/odoo-bin -d odoo-stage --http-port=8080 \ -c /etc/odoo/odoo.conf # optionally add: -u base $ exit This Odoo staging server was configured to listen on the 8080 port.We can navigate there with our web browser, using an address such as http://localhost:8080, to check whether the upgraded code works correctly.
为了从GitHub存储库获取最新的Odoo源代码,我们使用git拉命令,在此之前,我们可以使用git标记命令为当前的提交创建一个标记,这样可以更容易地还原代码更新,如下:$sudo su odoo$cd~/odoo-12$git标记-强制12-最后-推动$git拉以使代码更改生效,我们需要重新启动Odoo服务。要使数据文件更改生效,需要对模块进行升级。作为一般规则,对Odoo稳定版本的更改被认为是代码修复,如果您需要执行模块升级,则可以使用-u附加选项或-u基来升级所有模块。
To get the latest Odoo source code from the GitHub repository, we use the git pull command.Before doing that, we can use the git tag command to create a tag for the current commit in use, so that it's easier to revert the code update, as follows: $ sudo su odoo $ cd ~/odoo-12 $ git tag --force 12-last-prod $ git pull For code changes to take effect, we need to restart the Odoo service.For data file changes to take effect, an upgrade to the modules is needed.As a general rule, changes to Odoo stable versions are considered code fixes, and it's therefore not often worth the risk of performing module upgrades.If you need to perform a module upgrade, however, it can be achieved using the -u additional option, or -u base, which upgrades all modules.

odoo技术交流2 群号 625337975

http://www.odoogo.com/post/58/Odoo开发视频教程

文档不断更新中,添加微信odoogo,获取最新视频课程和模块

留言提问