Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
29098 Weergaven

good afternoon,
when a bbdd is restored or odoo is migrated from one container to another, you must always correct the assets (regenerate Assets Bundles) manually or execute a script in the database, there is some way to do it automatically so that Always available immediately.
you have the services in aws and every time you run autoscaling, all the bbdd stop working.
I will appreciate your help.

Avatar
Annuleer
Beste antwoord

not a complete solution, but the following article might help:

https://medium.com/@reedrehg/odoo-images-and-attachments-explaining-and-regenerating-assets-d1eb7fe8a3ed

Avatar
Annuleer
Beste antwoord

Yes, when a database is restored or Odoo is migrated from one container to another, it is indeed necessary to regenerate asset bundles and refresh the base module to ensure everything functions correctly. This process can be done from the Odoo backend by going to Settings > Technical > Frontend > Assets and choosing to regenerate bundles. Additionally, updating the base module from the backend can resolve many initialization issues that may arise from migrations or container changes.

To automate this, especially for AWS autoscaling, you might consider running a script to refresh the assets and update the base module upon container startup. This can typically be done with a custom startup script using odoo -u base --load=web,web_asset to reload the necessary assets and modules each time a new instance is launched.

Let me know if you need further assistance with scripting this automation!

Avatar
Annuleer
Beste antwoord

Just in case someone stumbles over this question and is looking for a solution:

One way would be to automate the deletion of the attachments either via XML RPC with the domain 

domain = ["&", ("res_model", "=", "ir\\.ui\\.view"\\),\\ "\\|",\\ \\("name",\\ "=like",\\ "%\\.assets_%\\.css"\\),\\ \\("name",\\ "=like",\\ "%\\.assets_%\\.js"\\)\\]

or\ directly\ in\ the\ database:

delete\ from\ ir_attachment\ where\ res_model\ =\ 'ir\.ui\.view'\ and\ \(name\ ilike\ '%\.assets_%\.css'\ or\ name\ ilike\ '%\.assets_%\.js'\)

The debug javascript menu does it similar

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
mrt. 24
12268
2
aug. 25
2430
1
jul. 25
919
1
aug. 25
1151
0
mei 25
1360