Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
28938 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

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

Awatar
Odrzuć
Najlepsza odpowiedź

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!

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
mar 24
12238
2
sie 25
2337
1
lip 25
857
1
sie 25
1150
0
maj 25
1316