Odoo Help

0

how to access custom module using t-if condition in xml odoo

By
supreeth
on 6/7/16, 1:21 AM 781 views

I have a custom module test and created pages called test_1, test_2, test_3.

I have inherited calendar view and wrote a condition in js like all the calendar changes should be reflected to test_1. And that is working fine.

Now i need to remove Day and Month button from test_1 page -> Calendar view.

So i am trying to write t-if condition. I dont have idea how to call model. i tried below code but it is not working.

<template>

    <tr t-extend="CalendarView.quick_create">
        <t t-if="widget.model=='test_1'">
            <t t-jquery=".form-group" t-operation="after">
                <div class="form-group">
                    <h3>Example - put fields here </h3>
                </div>
            </t>
        </t>
    </tr>


</template>


It is not working throws an TypeError: Cannot read property 'model' of undefined

How to access model in t-if condition?



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: 6/7/16, 1:21 AM
Seen: 781 times
Last updated: 6/7/16, 1:31 AM