跳至內容
選單
此問題已被標幟
3 回覆
189 瀏覽次數

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

頭像
捨棄
作者

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?

作者 最佳答案

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 :-)

頭像
捨棄
最佳答案

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>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
9月 25
88
1
9月 25
381
1
9月 25
336
2
9月 25
326
0
9月 25
435