Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3657 Zobrazení

Sorry for the catchy subject but I could not even write a properly conclusive question.

Here is what happened in sequence:

  1. Odoo 10 Community. All was going well.

  2. installed a responsive backend them to be able to use Odoo Community from mobile browser.

  3. 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.

  4. To solve the size problem, I deleted half of attachment records (which seemed to be regular emails)

  5. Then things started getting a bit weird: customer photos disappeared

  6. 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

  7. We decided then to to go to an earlier back and restore it. We did, but things got more weird.

  8. Customer photos still did not show, and moreover, the button icons disappeared !! Though that earlier backup was taken when everything was going well

  9. We kept restoring older backups and still the issue persisted !!

  10. 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" !

  11. Then we decided to go create a fresh virtual server on Amazon and restore the oldest Odoo 10 ce database we had.

  12. 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?

Avatar
Zrušit
Nejlepší odpověď

dear Mr. Hesham ELMADY,

Any documents or images attached it will be saved on filestore as physically and in the DB it saved as apath when you remove the attachments from the Odoo GUI that means you remove the record and the path from the DB.

From that point the images or attachments cannot find the path, then it make that problems. 

Trying to login into new restored DB, ignore that error, If success you need to merge all directories from .../.local/share/Odoo/filestore/Old-DB-Name

with .../.local/share/Odoo/filestore/New-DB-Name

That path it have all the attachment.

I hope I helped you ...


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
čvc 24
7181
1
kvě 21
4086
1
bře 24
6303
3
srp 16
4529
0
bře 16
4291