This question has been flagged
1 Reply
4369 Views

Hi Every body,

When I try to upgrade or uninstall some module i find this error (AttributeError: 'NoneType' object has no attribute '_table' ) and I am do not know the source of the errore to fixed it , please if you now this error I will thankful for your help me .

thank you so much

Avatar
Discard

Do you have both _inherit and _name in your model and both are same? If so, odoo will not be able to install it unless a table named like specified in _name.

This is usually caused by a database object (Primary Key, etc.) that is no longer there. I admin that tracing it is a bit tedious. Put a logging before that error is prompted so that you can see which database object cause that problem.

Best Answer

Hey what @ivan said is mostly the case , sometimes the database is just out of sync what you can try which works for me when i get that error is to restart your odoo server but this use -u all -d nameofdatabase to update the database. 

Avatar
Discard