This question has been flagged
4153 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?



Avatar
Discard