简体   繁体   English

为什么Openerp7 JS文件不能在odoo v11中工作,但可以在odoo v10中正常工作?

[英]Why Openerp7 JS files not working in odoo v11 but worked properly in odoo v10?

Javascript files developed in openerp-7 worked properly in odoo 10 but not working in odoo 11 even if odoo 10 has newly modified syntax . 即使odoo 10具有新修改的语法,在openerp-7中开发的Javascript文件在odoo 10中也可以正常工作,但在odoo 11中则不能工作。 Why Is that? 这是为什么?

There is a compatibility layer introduced with the new js framework for been able to write code using old js api in Odoo, but that compatibility layer it's not exactly to be compatible with older versions, it's intended to be compatible with the old style of write js code for Odoo widgets. 新的js框架引入了一个兼容层,以便能够在Odoo中使用旧的js api编写代码,但是该兼容层并不完全与旧版本兼容,它旨在与旧式js兼容Odoo小部件的代码。

That means that the compatibility layer just will try to match the old style with the new style, but using the existing widgets and code of the same version. 这意味着兼容性层将尝试将旧样式与新样式进行匹配,但是将使用相同版本的现有小部件和代码。 It's not backward compatible to other versions. 与其他版本不向后兼容。 For example if a widget is removed from v10 into v11 the compatibility layer will not provide you an implementation for that. 例如,如果将小部件从v10删除到v11,则兼容性层将不会为您提供该实现。

Every case need to be analyzed but this is the reason why your old code maybe have stopped to work 每个案例都需要进行分析,但这就是您的旧代码可能停止工作的原因

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM