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?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 6/7/16, 1:21 AM|
|Seen: 342 times|
|Last updated: 6/7/16, 1:31 AM|