İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
207 Görünümler

Hi there,

I'm very new here. Trying to customize things.

I know how to add new fields using the odoo studio, in leads.

I add new fields, renaming them etc.


Is it possible to get them into model templates ? and elsewhere (dynamic documents) ?

I guess it is.

Using logics (qweb?) would be also very fine and quite easy (I code easily) but I struggle to find a way to add this to me emails template or documents...


I tried developer mode, but no way to add "html" or qweb things in my emails template.

In them, I can type "/" to get the available placeholders. They are working and are replaced while previewing.
I create my email and "link" them from crm.lead... but no way to get my own fields and no way to code logics (if then else) as the field (body_html) doesn't allow to use them, afaik

Any help would be wonderful.

Best regards,
Julien

Avatar
Vazgeç
Üretici

Hi Christopher, and thanks for your answers 

I have to confess that I didn't have tried on more than 2 different browsers, but I cannot find that specific icon (mention in the documentation) anywhere, from totally custom email, to stock ones. 

That's my missing thing here. 

Digging more... 


About the custom fields, I got it in the list. I missed mine at first. 


For documents, I mean those we call "reports" in French, I found the way in studio. For completely designing this with qweb like code. Very nice. 



What icon are you talking about specifically? And what version of Odoo are you running?

Üretici En İyi Yanıt

I was talking about the </> icon you were talking about.

Actually, only clicking somewhere was not enough, I had to select a part or the whole text field in order to clic small ... at first, then I could see </> icon. I now know that whatever I select, I can reach the code part for the whole text field.

Thanks a lot :-)

Avatar
Vazgeç
En İyi Yanıt

To add fields via the inline HTML editor ("/"), use Dynamic Placeholder. The fields available to you depends on the Applies to selection on that Email Template (which should be Lead for you):


To enable the Code view, highlight some text of the Email Template content, click the vertical ellipsis, then click Code view:


From pretty much any existing Email Template you can see, how if-conditions need to be written in the template, i.e. 

<t t-if="some condition">...</t>

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 25
103
1
Eyl 25
388
1
Eyl 25
339
2
Eyl 25
331
0
Eyl 25
444