Community mailing list archives

community@mail.odoo.com

Re: mass importing partners. whats the best way?

by
redCOR AG, robert rottermann
- 09/11/2015 02:50:35
sorry, in the previous post I called categories keywords (still fighting with 
odoos nomenclature)

thanks for all the VERY interesting answers.
I really learned a lot.
I did bite the bullet, and started to write a script that manipulates the 
postgres tables directly.
This forces me to scrutinize odoo's db structure. I learned for instance how to 
create categories and link them to a partner.

On 11.09.2015 08:12, Alexandre Fayolle wrote:
> Careful though, not all fields are table columns, so this approach may
> miss a few issues, such as properties.
thanks for the hint.
However, what are properties in this context?
what properties should I mind when creating partners or categories?

thanks again
robert

>
> Alexandre
>
> On 11/09/2015 02:17, José Elcorrobarrutia wrote:
> > If you need to validate the data with the Odoo model similar to the
> > import csv feature, the modules mentioned before should be a good
> > option. Nevertheless, if don't need any odoo validation or you already
> > done it with another procedure, you may only use a bulk load directly to
> > Postgres using a text file using any separator you have. Assuming this
> > is a "one time (first) load", maybe works for you. We've load more than
> > 10 millions of records with that procedure in less than 20 mins with a
> > really tiny infrastructure. For us this is a special case, because it is
> > necessary to load this data often. Obviously it is not an standard
> > procedure, but it worked for this special case.
> >
> > Here is some documentation and an example
> > http://www.postgresql.org/docs/9.0/static/sql-copy.html
> >
> > COPY your_table (field1, field2, field3, fieldn) from 'yourfile.txt'
> > WITH DELIMITER '|' encoding 'LATIN1';
> >
> > Best regards,
> >
> > 	
> >
> > * *
> >
> > *José Elcorrobarrutia*
> > Mail:  jelcorrobarrutia@osse.com.pe <mailto:jelcorrobarrutia@osse.com.pe>
> >
> > Perú  (51) 663-3841
> >
> > Móvil (51) 9-9277-4277
> >
> >
> >
> >
> > Aviso de confidencialidad:
> > Este mensaje de correo electrónico contiene información estrictamente
> > confidencial no susceptible de ser distribuida.Si usted no es el
> > destinatario de este mensaje, por favor no publicarlo, copiarlo o tomar
> > cualquier otro tipo de accion sobre esta transmision. Si recibio este
> > mensaje por error, por favor notifiquenoslo y eliminelo lo antes posible.
> >
> > Warning of confidentiality:
> > This message of electronic mail contains strictly confidential
> > information nonsusceptible to be distributed.If you are not the adressee
> > of this message, please do not publish it, copy it or take any other
> > kind of action on this transmission. If you got this message by mistake,
> > please notify it to us and eliminate it as soon as possible.
> >
> >
> >
> > • Evite imprimir, piense en su compromiso con el Medio Ambiente / Avoid
> > printing, think about your responsability with the Environment
> >
> >
> > 2015-09-10 18:48 GMT-05:00 Luis Felipe Miléo <mileo@kmee.com.br
> > <mailto:mileo@kmee.com.br>>:
> >
> >     Hi,
>
> We import 30k with import_odbc from a Oracle
> >     database.
>
> You can split the import columns in many imports,
> >     like name, address and etc.
>
> Best regards
> >
> >     *- Luis Felipe Miléo*
> >     *Gerência de Implementação*
> >     +55 11 4063-9872  (SP)
> >     +55 21 4063-8872 (RJ)
> >     mileo@kmee.com.br <mailto:ananias@kmee.com.br>
> >     *kmee.com.br*
> >     *Parceiro oficial no Brasil:*
> >
> >
> >     ------------------------------------------------------------------------
> >     *De: *"robert"
> >     *Para: *"Followers of Community" <community@mail.odoo.com
> >     <mailto:community@mail.odoo.com>>
> >     *Enviadas: *Quinta-feira, 10 de setembro de 2015 7:07:32
> >     *Assunto: *mass importing partners. whats the best way?
> >
> >     Hi there,
> >
> >     I would like to import some 60'000 partners from a foreign (mysql) database.
> >     I tried to import them from a csv file.
> >     But this just seems next to impossible in one single lifetime ..
> >
> >     Now my questions:
> >     what is the best way do do so?
> >     I do not mind to write a python script to achieve this.
> >     However I would be gratefull for a kind of sample on how to do it.
> >
> >     thanks
> >     robert
> >
> >     _______________________________________________
> >     Mailing-List: https://www.odoo.com/groups/community-59
> >     Post to: mailto:community@mail.odoo.com <mailto:community@mail.odoo.com>
> >     Unsubscribe: https://www.odoo.com/groups?unsubscribe
> >
> >
> >     _______________________________________________
> >     Mailing-List: https://www.odoo.com/groups/community-59
> >     Post to: mailto:community@mail.odoo.com <mailto:community@mail.odoo.com>
> >     Unsubscribe: https://www.odoo.com/groups?unsubscribe
> >
> >
> > _______________________________________________
> > Mailing-List: https://www.odoo.com/groups/community-59
> > Post to: mailto:community@mail.odoo.com
> > Unsubscribe: https://www.odoo.com/groups?unsubscribe
> >
>
>
> --
> Alexandre Fayolle
> Chef de Projet
> Tel : +33 4 58 48 20 30
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac Cedex
> http://www.camptocamp.com
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>