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

[9.0][POS] focus searchbar after adding a new order

By
Gael Torrecillas
on 3/11/16, 11:09 AM 299 views

hello,


I want focus searchbar after adding a new order (+) 

so I change this function :


 renderElement: function(){ 
var self = this;
this._super();
    this.$('.order-button.select-order').click(function(event){
        self.order_click_handler(event,$(this)); });
     this.$('.neworder-button').click(function(event){
        self.neworder_click_handler(event,$(this)); });
    this.$('.deleteorder-button').click(function(event){
        self.deleteorder_click_handler(event,$(this)); });
//add this part
    this.$('.searchbox input').focus();
},

but, I suppose that  this.$('.searchbox input') is indefined in chrome


please, help me

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: 3/11/16, 11:09 AM
Seen: 299 times
Last updated: 3/11/16, 1:34 PM