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 add a new record to dataset of wizard list view via javascript

By
paul
on 8/29/14, 8:46 AM 1,214 views

ISSUE: How to add a new record to dataset of wizard list view via javascript

Version 7

What I am trying to Accomplish

  • Using javascript in a web module I am trying to progamatically add/edit the records in the stock.picking.in receiving wizard
  • But I am having no success in accessing the javascript object that represents the list view with the dataset
  • I have created a web module with a javascript file that attempts to inherit the instance.web.ListView of the wizard form but none of my custom events are able to access the dataset of the wizard form

code example from my javascript file:

openerp.test_access = function(instance) {
    var _t = instance.web._t,
        _lt = instance.web._lt;
    var QWeb = instance.web.qweb;

    instance.test_access = {};

    instance.web.views.add('test_access', 'instance.test_access.wizard');

    instance.test_access.wizard = instance.web.ListView.extend({
        init: function() {
            this._super.apply(this, arguments);
        },
        start: function() {
            var tmp = this._super.apply(this, arguments);
            var self = this;
            return tmp;            
        },
}

 

ok, I have figured out how to add a new record using the function do_add_record(). But I am still unable to programmatically populate the values for this new record.

paul
on 9/3/14, 6:10 PM

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: 8/29/14, 8:46 AM
Seen: 1214 times
Last updated: 3/16/15, 8:10 AM