Contributors mailing list archives
Re: Async import external employee data from db view to Odoo.by
Camptocamp SA, Simone Orsi
On Mon, Mar 1, 2021 at 7:47 AM Kitti Upariphutthiphong <firstname.lastname@example.org> 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 <email@example.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 <firstname.lastname@example.org> 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.
--Simone OrsiFull stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.
Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.
Ecosoft Co. Ltd., Kitti Upariphutthiphong