How can I modify the cover image used for the events on the website from the back-end in mass without having to change each image one by one?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
In order to be able to update the URL of the cover properties used by each event on the website from the back-end you will need to do the following operations:
- On the event.event model look for the invisible field Cover Properties (cover_properties) and make it visible
- This field is read-only so we will need to update it on creation of the event with the correct URL
- Upload one time only on the front-end the images that you want to use for your covers and make sure you have the URL generated in the back-end in the cover properties field
- Create a new char field in the event.event called picture URL
- Create an automated action with the following rules:
Model: Event
Trigger: On Creation
Action To Do: Update the Record
Data to write: Field: Cover Properties (Event) Evaluation type: Python expression Value: record.name of the char field you created
- Now create a new event
- Add the URL of the picture in the char field created
Odoo will then automatically overwrite the Cover Properties field with the URL and will show the correct image in the front-end as event cover.
Note: It is possible to create a new menu to store all the URLs of the images and added a many2one field for the cover to populate all the fields from the event template in order to not have to copy/paste all the time the URL. In that case update your automated action on records to match the option “template is set”.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
3
août 23
|
5109 | ||
|
1
mai 22
|
6510 | ||
|
1
janv. 22
|
5111 | ||
|
2
août 22
|
5326 | ||
|
1
févr. 22
|
4965 |