Community mailing list archives

community@mail.odoo.com

Re: How to use t-tags in snippets

by
Pedro Cachaca
- 03/20/2015 07:25:58
Hi Christelle,

res_company is accessible directly in the website.
Try with  <div t-esc="res_company.name"/> and adapt to your needs.

Pedro

On Thu, Mar 19, 2015 at 10:17 AM, Christelle Wehbe <wehbechristelle@gmail.com> wrote:

Hi,

I need to create a snippet that calls for information from res.company. I used t-tags in my snippet like for example; 

                                                 <li class="list-group-item">
                                                        <ul class="list-group-submenu">
                                                               <t t-if="res_users.company_id.partner_id.contact_address">
                                                                     <div class="row">
                                                                        <div class="col-md-4">
                                                                            <h10><strong>Address</strong></h10>
                                                                        </div>
                                                                        <div class="col-md-8 ">
                                                                            <t t-esc="res_users.company_id.partner_id.contact_address"/><br/>
                                                                         </div>
                                                                    </div><hr/>
                                                                </t>
                                                         </ul>
                                                    </li>


but as soon as I activate this snippet the snippet-menu under "Insert Blocks" will stop functioning and only a very tiny black row will appear.

Does anyone know how I will get this to work or if it is even possible to use t-tags in snippets? If I can't use t-tags in my snippets what is the option to replace them.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe