Odoo Help


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.


Redefine import method to change file type

Cristian Salamea
on 2/7/13, 11:02 PM 990 views

Hello, its possible redefine the import core method to extend file type support, may users use Excel to create tables and manage data. What extendable is load method?


Nicolas Bessi

--Nicolas Bessi--
| 5 7 8
Lausanne, Switzerland
--Nicolas Bessi--
Nicolas Bessi
On 2/8/13, 3:39 AM


This is possible as now majority of know how is located in server, there is some controller function to get header structure and fields/content validation like parse_preview.

ir.import is a Transient Model defined in base import so it will be easier to modify it.

if you can prepare data format compatible with def load(self, cr, uid, fields, data, context=None) (a list of field and a list of list) of orm that is "mapped" by def do(self, cr, uid, id, fields, options, dryrun=False, context=None) of base_import it should work.

But it is quite a work. Maybe you should look to port community module that do advance import and already support XLS.

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)


Asked: 2/7/13, 11:02 PM
Seen: 990 times
Last updated: 3/16/15, 8:10 AM