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

Extension of view_form.js

By
Shivam Goyal
on 4/25/14, 10:47 AM 1,083 views

Hello People i am stuck yet again i want this js code to work

openerp.project_management = function (instance) {
    openerp.project_management.quickadd(instance);
    var _t = instance.web._t,
        _lt = instance.web._lt;
    var QWeb = instance.web.qweb;
    instance.web.project_management = instance.web.project_management || {};

instance.web.views.add('form_project_task', 'instance.web.project_management.mailprojecttask');

instance.web.project_management.mailprojecttask = instance.web.FormView.extend({
    init: function() {
        this._super.apply(this, arguments);
    },
    start: function() {
        var self = this;
        console.log("Something");
    },

});

};

What i want basically is when the person clicks on create button in project.task the above code should be execute and the console.log("Something") should be execeuted.

Also for this in the form view i defined the as follows -:

  <form_project_task string="Form view" version = "7.0">
            <field name = ""/>
          <field name = ""/>
          <field name = ""/>
           <field name = ""/>
</form_project_task>

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

0 follower(s)

Stats

Asked: 4/25/14, 10:47 AM
Seen: 1083 times
Last updated: 3/16/15, 8:10 AM