Odoo Help

Welcome!

This community 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.

0

how to execute xml code from JS function? WebCalendar

By
supreeth
on 6/17/16, 5:59 AM 131 views

The requirment is i have created a dropdown button next to month button in calendar. If i click on that dropdown it show the value t1,t2,t3..

Now if i click t1 from dropdown. inside Calendar view it should display 't1'.


XML Code:

<div t-if="widget.model === 'service.advisor.planner'" id="myDropdown" class="dropdown-content">
<select>
<option value="planner">Planner</option>
<option value="bays">Bays</option>
<option value="drivers">Drivers</option>
<option value="technician">Technician</option>
</select>
</div>


JS code: written in fullcalendar.js

t.firstStep = firstStep;

function firstStep(this) {               
    //Grab information from input element object               
    // /and place them in local variables               
    var select_name = element.name;               
    var option_value = element.value;                   
}

var option_user_selection = element.options[ element.select_name ].text;


  I need to know that how to execute xml code from JS function?  


Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/17/16, 5:59 AM
Seen: 131 times
Last updated: 6/17/16, 7:46 AM