Connect bahmni to cloud odoo9 server

Hi, I have migrated bahmni openerp module to odoo 9 . now i am trying to connect cloud odoo 9 server to bahmni in vagrant box. what changes or modifcation are required in configuration file that enable odoo9 to connect with openmrs ,openelis & also enable atom feed services.

Thanks

Hi @mahesh, Can you see if this helps.

Thanks @swathivarkala

I want to connect bahmni to cloud odoo server which one is not localhost:8069
bahmni is configured to openerp 7 which one is localhost , In which properties files we will change the openerp path and db name.

Hi @mahesh, you have to change erpElement.href value in /var/www/html/index.html file to point to your cloud odoo server. Once you get the login page you can see the list of available databases in the dropdown list. Hope this helps.

1 Like

thanks @binduak I modified /var/www/html/index.html & replace with my cloud server IP in erpElement.href . it directs me on my cloud server. but when i add data like drugs , patient registration and orders in bahmni. Atom feed is not Syncing with my cloud odoo server . is there any other modification is required?

Can you check yours markers? Please follow Bahmni WIKI for troubleshooting.

@mahesh: You will be the first person to try and use Bahmni with Odoo v9. We haven’t yet tested / certified Bahmni for Odoo 9. It is in the roadmap for 2017 (Platform Upgrades). https://bahmni.atlassian.net/wiki/display/BAH/Roadmap

Not yet sure when will we pick this up. So, request you to be prepared for some difficulties if you are going to try this out on your own. Thanks!

thank @gsluthra i know this one is difficult but can you guide me to configure atom feed services for cloud odoo server. in which file i have to change localhost:8069 to my cloud_ip:8069 ??

Do you have bahmni-erp-connect service installed? If yes, Can you please check markers table in openerp database to see if the markers are point to correct openmrs ip?

Hello, I dont know why you guys are not understanding a very simple Question. We have bahmni installed in a Vagrant Box and want to connect to Odoo version 9 which is installed on Amazon EC2 server (http://104.197.131.201:8069/) . Here is the IP. I want to connect to this IP from our vagrant Box. Please help and reply at your earliest.

I think what @mahesh here is saying… that he wants to know

a) Is it possible for the Atom Feed Sync to sync to a remote server (where OpenERP is on the cloud machine while all the rest of Bahmni is on local machine in Vagrant).

b) If possible, which configuration file should he mention the IP address in of the Cloud server, so that sync can send events to Odoo in the cloud AWS server?

Thanks @gsluthra . You are right. Please help us.

Hi @mahesh, Some theory first:

  1. When a drug order/encounter/patient is created in openmrs, there are records created in event_records table. MRS exposes these events as atom feeds. Encounter feed - https://192.168.33.10/openmrs/ws/atomfeed/encounter/recent - ERP uses this to create Sale Order Patient Feed - https://192.168.33.10/openmrs/ws/atomfeed/patient/recent - ERP uses this to create customer Drug Feed - https://192.168.33.10/openmrs/ws/atomfeed/drug/recent - ERP uses this to create products

  2. We have a service called bahmni-erp-connect that constantly reads these feeds and issues create requests to OpenERP. This service needs to be running all the time and it polls the feeds for new entries. Once it finds a new patient (or any entity), we send a request to openerp. The format of request to openerp is tested on openerp 7 but not Odoo. You can look at source code that is used for constructing the message.

To answer your question now, there might be multiple possibilities of why it is not working

  1. bahmni-erp-connect has to talk to openerp (or odoo). The configuration is available at the location /opt/bahmni-erp-connect/bahmni-erp-connect/WEB-INF/classes/atomfeed.properties. Please set a valid openerp.host, openerp.port. Ensure that these host and port are accessible from your vagrant box.
  2. Also ensure that the bahmni-erp-connect is running and that the requests that are sent to Odoo 9 are creating customer, product or sales order. If not, then there can be compatibility issues.

Hope this helps.

/opt/bahmni-erp-connect/bahmni-erp-connect/WEB-INF/classes/atomfeed.properties

after I updated atomfeed configuration withmy host,port and database

and reloaded the vagrant box and started all services but now the ui is not getting loaded only spinner is available and https://192.168.0.17/bahmni/home/#/dashboard even it is not redirecting to login page tried to grunt command F:\Projects\bahmni\openmrs-module-bahmniapps\ui and getting error as

Any changes are done to Gruntfile.js? Gruntfile.js will have the below lines. If you look at it, there is a option called ‘dir’. Can you confirm if you have it?

If you have openmrs-module-bahmniapps/ui/coverage directory created please delete it and run.

atomfeed.properties.txt (1.4 KB)

Hello @bharatak I have attached the properties file and want to connect to odoo cloud. I have restarted all the services but still patient records are not being created from bahmni. Please check and let me know if there is any other configuration needed to connect to odoo version 9 which is installed on my google cloud.

Hi @mahesh,

customer.feed.generator.uri=http://139.59.62.44:8050/openmrs/ws/atomfeed/patient/recent
saleorder.feed.generator.uri=http://localhost:8050/openmrs/ws/atomfeed/encounter/recent
drug.feed.generator.uri=http://localhost:8050/openmrs/ws/atomfeed/drug/recent
lab.feed.generator.uri=http://localhost:8050/openmrs/ws/atomfeed/lab/recent
openmrs.auth.uri=http://localhost:8050/openmrs/ws/rest/v1/session

Is there any reason to give 139.59.62.44 IP for patient feeds and localhost for all other feeds in your atomfeed.properties file??

Hello @binduak, We changed it to localhost , but its still not creating records in Odoo. Please assist

Hi @mahesh, Can you please share the latest atomfeed.properties file.

atomfeed.properties.txt (1.4 KB)

@binduak File is attached after changing IP to localhost . Please let me know steps to connect to cloud Odoo. We are just wasting time in this communication , can we arrange a small call to degub this issue with @sravanthi17 on skype. I have already added her on skype