Odoo Help

0

¿What automate the import process?

By
Francisco Tobar
on 12/11/15, 3:34 PM 782 views

Hello, I want to automate the Import process. I am trying to modify the base_import module.

But I dont know when the csv file is passed to this module.

I found in the controller.py file  the "set_file" function, but i dont found where this function is called and which parameters  may i pass.

Thanks

0
Axel Mendoza
On 12/11/15, 11:09 PM

@Francisco Tobar

That function set_file is called using the url like: http://localhost:8069/base_import/set_file
defined in the route decorator like:

@route('/base_import/set_file')
def set_file(self, req, file, import_id, jsonp='callback'):

and used in the base_import/static/src/js/import.js

//- File & settings change section

onfile_loaded: function () {

this.$('.oe_import_button, .oe_import_file_reload')

.prop('disabled', true);

if (!this.$('input.oe_import_file').val()) { return; }

this.$el.removeClass('oe_import_preview oe_import_error');

jsonp(this.$el, {

url: '/base_import/set_file'

}, this.proxy('settings_changed'));

},

Hope that will help you

Thanks for your answer. But i dont know where the parameters are passed. I need to know where the csv file is loaded. Thanks

Francisco Tobar
on 12/14/15, 9:30 AM

The csv is loaded in the import form

Axel Mendoza
on 12/22/15, 3:14 PM

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.

Register

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)

Stats

Asked: 12/11/15, 3:34 PM
Seen: 782 times
Last updated: 12/11/15, 11:09 PM