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
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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”.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
How to create a B2B friendly website in V15?
Rozwiązane
|
|
3
sie 23
|
5086 | |
|
1
maj 22
|
6493 | ||
|
1
sty 22
|
5104 | ||
|
2
sie 22
|
5318 | ||
|
1
lut 22
|
4952 |