Upgrading postgre sql database

(kwaku mensah) #1

Hi guys,

Is it possible to upgrade the Postgre database that OpenERP uses from the default version 9.2 to say version 9.3 (or ideally version 9.5)?

I’m trying to integrate my Bahmni system with a third-party application which expects a REST api. I haven’t found any REST api module for openerp v7 so my plan is to create my own rest api using PostgREST. Unfortunately PostgREST requires at least postgre verions 9.3.

(Angshuman Sarkar) #2

If you want to open up some APIs for an external system, I am not sure I understand the reason for postgres upgrade. I would rather advice you just build a module or even an independent service to serve the API

  1. build an ERP module using python
  2. build an external microservice (e.g. using java), that uses either the XML-RPC api of ERP (suggested) or interact with database directly (if you know the datamodel and not intend to do anything invasive)

(kwaku mensah) #3

Thanks @angshuonline for the ideas. What i actually plan to do is like your second idea. That is to create a service that interacts directly with the database. I need to provide a third-party payment collection system a rest json api that they can call to know the bill for a given patient and to update the patients record the amount paid. So my plan was to generate a REST API for the ERP database and only expose the endpoints that are needed to retrieve a bill and update a bill. PostgREST automatically generates a rest api for a postgre database but unfortunately it works for postgre version 9.3 and upwards. This is why i asked if it was possible to upgrade the postgre from version 9.2 to 9.3.

I’m very new to Bahmni can you point me to links where i can get info on how to create an ERP module. Will i be able to produce a REST API for the third-party to consume?

I don’t have control over the third-party and they may change their system whenever they wish. So they just want me to give them rest api endpoints that they can use to get the bill of a patient and to update the patients bill with any amount that they collect.

(Angshuman Sarkar) #4

For Custom ERP modules, you can check here