Odoo Help


Java script create method override and show message

on 8/22/14, 9:44 AM 2,296 views

Openerp 7 Custom Module Form View show success message after creating new record. 

Based on the requirement core module below highlighted code is added. (The below code is working without any issue).

File: addons/web/static/js/view_form.js

    on_button_save: function() {
        var self = this;
        return this.save().done(function(result) {
            self.trigger("save", result);
            /* The Below code is added for Cusom Module */
            if (self.model=='Module Name')
              self.do_notify("Emp", "Record ID " + result + " Successfully Created");
            /* End */

        }).then(function(result) {
            var parent = self.ViewManager.ActionManager.getParent();

The above code how to inherit in Custom Module custom_module/static/src/js/custom.js. I tried instance.web.FormView inherit with extend and include keyword but failed to get output.  please guide me the same.

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: 8/22/14, 9:44 AM
Seen: 2296 times
Last updated: 3/16/15, 8:10 AM