A series of weird events !
Sorry for the catchy subject but I could not even write a properly conclusive question.
Here is what happened in sequence:
Odoo 10 Community. All was going well.
installed a responsive backend them to be able to use Odoo Community from mobile browser.
I configures incoming mail. that caused my entire google inbox emails to come into odoo. DB size increased to 500GB. That made taking backup a painful issue.
To solve the size problem, I deleted half of attachment records (which seemed to be regular emails)
Then things started getting a bit weird: customer photos disappeared
I then though I by mistake deleted photos from attachment model. Though I know that customer images are store in res.partner model as binary
We decided then to to go to an earlier back and restore it. We did, but things got more weird.
Customer photos still did not show, and moreover, the button icons disappeared !! Though that earlier backup was taken when everything was going well
We kept restoring older backups and still the issue persisted !!
To our surprise some customer photos showed but some did not. And when we open any customer view, a red message keeps scrolling bottom to top saying: "could not display the selected image" !
Then we decided to go create a fresh virtual server on Amazon and restore the oldest Odoo 10 ce database we had.
After restore was completed we got this error:
Database restore error: insert or update on table "ir_property" violates foreign key constraint "ir_property_fields_id_fkey" DETAIL: Key (fields_id)=(2490) is not present in table "ir_model_fields".
And here is the image of the photo error:
Can anyone explain what is happening?