Contributors mailing list archives

contributors@odoo-community.org

Avatar

RE: Async import external employee data from db view to Odoo.

by
Bilbonet, Jesús Ramiro Martinez
- 03/03/2021 17:56:41

Yes Kitti,

It would be nice to see it in OCA.

I tried to migrate it inside OCA, but I couldn't :-(.

I didn't have enough time and skills to achieve it.

 

De: Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
Enviado el: miércoles, 3 de marzo de 2021 18:02
Para: Contributors <contributors@odoo-community.org>
Asunto: Re: Async import external employee data from db view to Odoo.

 

Jesus.R.M.

 

In fact, the module "base_external_import" is quite interesting. It is minimal and straight to the point for case external data -> odoo data.

 

I found some history of this module in OCA/server-tools, https://github.com/OCA/server-tools/pull/1188 . Would be nice to see this module in OCA also.

 

On Mon, Mar 1, 2021 at 11:37 PM Jesus.R.M (bilbonet.NET) <jesus@bilbonet.net> wrote:

Nice modules :-)

 

In Odoo 12, I currently using very small modules for importing from MSSQL.

https://github.com/Bilbonet/external-dbsource

 

In Odoo 13 I will start to use these modules and help if is possible.

 

Thank you!

 

De: Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
Enviado el: lunes, 1 de marzo de 2021 10:07
Para: Contributors <contributors@odoo-community.org>
Asunto: Re: Async import external employee data from db view to Odoo.

 

Thank you very much Simone, for the helpful hint.

 

I guess I will do "connector_importer_external_dbsource". 

 

Thank you!

 

On Mon, Mar 1, 2021 at 3:06 PM Simone Orsi <simahawk@gmail.com> wrote:

On Mon, Mar 1, 2021 at 7:47 AM Kitti Upariphutthiphong <kittiu@ecosoft.co.th> wrote:

Thank you Simon! I could help to write more readme afterwards :)

 

I checked it and it looks like what we wanted to do, except it only deal with .CSV file at the moment. So I will need to create the new import component handler for MSSQL, right?

 

As you mentioned, you did it for Oracle DB?

 

Yes, but it's quite easy.

 

Each step of the import machinery it's separated. What you have to do is to create your own source model which provides a `_get_lines` method which returns a list of dict. The rest of the system does not care where you pick data from.

 

Here you see an example using another Odoo instance as source (I've used it to migrate records from an old v9 to a new v11 live).

 

Then depending on the complexity of your import you'll have to define one or mappers. It's unlikely that you have to define specific importers, especially if you use https://github.com/OCA/connector-interfaces/pull/76 (which might benefit from some reviews ;) ).

 

 

 

Kitti U.

 

On Sun, Feb 28, 2021 at 6:11 PM Simone Orsi <simahawk@gmail.com> wrote:

Hi Kitti,

 

connector_importer was born exactly for this reason: recurring imports.

 

I've used it for importing employees and users and more (even from Oracle DB).

 

Docs are missing so if you have questions, don't hesitate to ask.

 

Cheers,

S.

 

On Sun, Feb 28, 2021 at 9:52 AM Kitti Upariphutthiphong <kittiu@ecosoft.co.th> wrote:

Dear Community,

 

We need to get data from external HR applications (they will provide an mssql database view), for users and employee data into Odoo.

 

It seems to be quite a generic use case, to become an addon, so I want to check with community, would be nice to know how you normally cope with this.

 

I checked OCA and plan to use the followings as starting point.

Thank you!

Kitti U.

 

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--

Simone Orsi

 

Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--

Simone Orsi

 

Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference