Please note that these are troubleshooting steps and need to be carefully executed especially if you are in a Production Environment!
The below mentioned steps can help in debugging issues in OpenMRS to OpenERP/Odoo sync. Depending on the cause please try the appropriate suggestions:
sudo service bahmni-erp-connect status
sudo service openerp status
# If it is not running then do
sudo service openerp start
sudo service bahmni-erp-connect start
If bahmni-erp-connect service is already running then we need to check OpenERP username and password below and after updating them to required ones we need to restart bahmni-erp-connect service:
openerp.user=admin (default username)
openerp.password=password (default password)
sudo service bahmni-erp-connect restart
# Connect to pgsql client
# See table contents
select * from markers;
# Check if there are any failed events
select * from failed_events;
Verify if columns “last_read_entry_id” and “feed_uri_for_last_read_entry” have the correct entries for corresponding feed_uri.
Postman extension in chrome can you be used to check for the latest atomfeeds or specific atomfeeds.
Need to analyse the entries in failed_events table by reading the contents in “error_message” column in failed_events table and proceed accordingly.
Please refer Atom Feed Based Synchronization in Bahmni for Details on Atom Feed Based Sync.
In OpenERP software check if: Sales --> Configuration --> Order Type Shop – Shop Mapping:
Order Type : Drug Order
Shop : Implementation Specific Shop name
Local Shop : Keep it blank
Location Name : Keep it blank.
Restart openerp service: sudo service openerp restart
In OpenERP software check if: Sales --> Configuration --> Units to be Synced:
- Should have all the Drug Units added whatever is present in Bahmni with the exact names.
e.g : Capsule(s), Tablet(s)
If you still don't find the solution to your problem, please search / post your question on Bahmni OpenMRS Talk.
Atom Feed Synchronization in Bahmni