Odoo Help

0

[SOLVED] Extend mail thread view (v10)

By
Rui Franco
on 9/27/17, 8:13 AM 715 views

I was asked to change the thread view that shows at the bottom of pages.


I've created a file and loaded it in the __manifest__.py 


Here's the code:..


<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

<t t-extend="mail.ChatThread.Message" t-name="ChatThread">
<t t-jquery=".o_mail_timestamp" t-operation="replace">
<small class="o_mail_timestamp" t-att-title="message.date">
<t t-esc="message.date"/>
</small>
</t>
</t>

</templates>


However, changes are not applied. Has anyone done this before?
0

Axel Mendoza

--Axel Mendoza--
13020
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 9/28/17, 1:25 AM

You could do it like:

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">

<t t-extend="mail.ChatThread.Message">
<t t-jquery=".o_mail_timestamp" t-operation="replace">
<small class="o_mail_timestamp" t-att-title="message.date">
<t t-esc="message.date"/>
</small>
</t>
</t>

</templates>

Using different values for t-extend and t-name will create a new template with the value name of t-name that will inherit from the template with the value name of t-extend. Like models prototypal inheritance

Using just t-extend will inherit the original template in-place without creating a new one. The same applies for using only t-name overriding completely the original template and also using t-extend and t-name with the same value of the original template creating a new template with the name of the original one that inherits from that original one (no need to complicate it like that but works)



Thanks Alex!

Rui Franco
on 9/28/17, 4:03 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 9/27/17, 8:13 AM
Seen: 715 times
Last updated: 11/14/17, 12:41 PM