تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
5898 أدوات العرض

In Odoo 16, I'm always facing the same problem with my custom modules. It occurs in random occassions when I'm adding a new field in a model, restarting the odoo service for python changes to take effect and then trying to upgrade the module in Apps. 

When I press upgrade, I get an error that the field that I just added, does not exist on the model. The field does exist in the model and no matter what I do (restarting the odoo server again, refreshing the browser) I get the same error when upgrading. The only solution is to change the name of the field. But this is not a proper solution because I have to change names of my variables and I don't want to.

What I described, doesn't always happen (e.g. as far as I've noticed, it doesn't happen when I create a new model. It only happens when I add more fields in the same model). Furthermore, I never faced the same problem with odoo 15 or 14. 

Like there is some data cached somewhere and Odoo disregards the changes I make in my python files.

Has anyone else faced the same problem? Can I somehow clean odoo cache (if something like that exists). The problem is browser independent so clearing the browser's cache didn't provide any solution.


الصورة الرمزية
إهمال
أفضل إجابة

Same here but with odoo12, i uninstalled the module and reinstalled it every time i add a new field.
Now its working fine by it self ! 

الصورة الرمزية
إهمال
الكاتب

Try to rename the field (change the variable name). That's the only thing that works for me. I can't uninstall the module because I don't want to lose my data.

أفضل إجابة

Hi,

Are you experiencing issue with res.partner or res.users model ? If yes, if we are adding new fields to this module, which is already installed in the db, then we may have to upgrade the modules from the terminal

Thanks

الصورة الرمزية
إهمال
الكاتب

I'm experiencing problems with all modules. Both odoo modules and my custom models.

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أكتوبر 24
6808
1
سبتمبر 23
2799
1
مارس 21
4288
1
مارس 15
11866
1
يوليو 23
2931