Odoo Help

Welcome!

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.

0

How to search for products from an external database?

By
michel Guénard
on 12/3/14, 12:28 PM 651 views

A large part of the products which we can purchase and sell are present into an external database with more than 600 000 skus.

We can access to the database (located on our local infrastructure) only with user rights (login and password)

How would it be possible to search for products in this local database from our Odoo instance (Saas from Odoo)?

for instance before creating a new product in Odoo.

 

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/3/14, 8:29 PM

I haven't tried this personally, but here is what I would try if I need to include foreign database into Odoo.  PostgreSQL has an extension called Foreign-Data Wrapper (http://www.postgresql.org/docs/9.3/static/postgres-fdw.html)  which essentially allows you to connect to remote server and create a link to a remote table.  With that you should be able to do query to that table using cr.execute.  If you want to use ORM, then you might need to create a View on top of that table and add and emulate the necessary columns (notably id) so that the ORM model can be created.

Now, having said that I don't have exeperience in Odoo's SaaS as well.  So I'm not sure whether it would allow you to install the extension, connect to remote database, etc.

Thanks for this guidance which I will consider if I can get access privileges to the tables of the foreign database. Right now I can only access it thru a proprietary application.

AD LIBITOM, michel Guénard
on 12/4/14, 4:35 AM

Looks like you need to resort to export import since you mentioned that it is only accessible through proprietary application. That is if there is such a tools (or report) in that application that can be used to dump the data. If you are really desperate to get it in automatic way, you might want to consider screen scrapping.

Ivan
on 12/4/14, 5:19 AM

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)

Stats

Asked: 12/3/14, 12:28 PM
Seen: 651 times
Last updated: 3/16/15, 8:10 AM