Odoo Help


Catch any anchor click event in sales order form in openerp (odoo) 8

on 6/7/15, 7:07 AM 763 views

I want to get the anchor click event in sales order form in openerp I tried these


openerp.website_sale_extended = function(instance){

console.log('My module has been initialized'); //worked

var module = instance.website_sale_extended || {};

//-not working module.CustomWidget = instance.web.form.FieldChar.extend({

//-not working module.CustomWidget = instance.web.form.FormWidget.extend(instance.web.form.ReinitializeWidgetMixin, {

module.CustomWidget = instance.web.Widget.extend({ //not working

events: {

'click a': 'rename_file',

'change input': function (e) {




rename_file : function () {


/*var $anchor = $(this);

var data-field = $anchor.parent().attr('data-field');


if(data-field == 'attachment'){

var html = $anchor.parent().parent().find(':td[data-field="answer_id"]').html();








Not working with


instance.web.form.FormWidget.extend(instance.web.form.ReinitializeWidgetMixin, {


So how can we bind a anchor click event in openerp (odoo ) 8 via javascript.

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


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)


Asked: 6/7/15, 7:07 AM
Seen: 763 times
Last updated: 6/7/15, 7:07 AM