Odoo警告“也许模块被部分删除或重命名". [英] Odoo Warning "Perhaps a module was partially removed or renamed"

查看:266
本文介绍了Odoo警告“也许模块被部分删除或重命名".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行odoo服务器时,我在下面收到此警告消息.

When I run odoo server, I got this warning message below.

警告Dietfacts2 openerp.modules.loading:声明了模型product.Nutritionitem,但无法加载! (也许模块已被部分删除或重命名)

WARNING dietfacts2 openerp.modules.loading: Model product.nutrientitem is declared but cannot be loaded! (Perhaps a module was partially removed or renamed)

我知道它显示了此警告消息,因为我创建了型号名称,但随后又对其进行了更改.该模型已保存到postgres DB.我试图删除数据库中的表,但未成功.

I know that it shows this warning message because I created the model name but then I changed it afterward. The model was saved to postgres DB. I tried to delete the table in DB but unsuccessful.

dietfacts2 =#从ir_model中删除,其中model ='product.Nutritionitem'; 错误:模型"列中的空值违反了非空约束 详细信息:失败行包含(1011,2017-02-20 04:15:05.207869,2017-02-20 04:15:05.207869,285,null,f,false,product_ Nutritionitem_write_uid_fkey,null,null,null,null). 上下文:SQL语句仅更新" public"." ir_model_constraint" SET模型" = NULL $ 1运算符(pg_catalog.=)模型""

dietfacts2=# delete from ir_model where model = 'product.nutrientitem'; ERROR: null value in column "model" violates not-null constraint DETAIL: Failing row contains (1011, 2017-02-20 04:15:05.207869, 2017-02-20 04:15:05.207869, 285, null, f, false, product_nutrientitem_write_uid_fkey, null, null, null, null). CONTEXT: SQL statement "UPDATE ONLY "public"."ir_model_constraint" SET "model" = NULL WHERE $1 OPERATOR(pg_catalog.=) "model""

推荐答案

可能您在其他表中的数据需要首先清除.尝试ir_model_data

Likely you have data in other tables that needs to be cleared first. Try ir_model_data

DELETE FROM ir_model_data WHERE model = 'your.model';

然后,您应该可以删除表格.如果您有与表相关的约束,则可能需要识别并删除它们.

Then you should be able to delete your table. If you have constraints related to your table you may need to identify these and remove them as well.

这篇关于Odoo警告“也许模块被部分删除或重命名".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆