# Registration Fee Sync with ERP - Interim Implementation

**URL:** <https://talk.openmrs.org/t/registration-fee-sync-with-erp-interim-implementation/13977>\
**Category:** Bahmni\
**Created:** [November 1, 2017, 8:44pm UTC](https://talk.openmrs.org/t/registration-fee-sync-with-erp-interim-implementation/13977 "2017-11-01T20:44:40Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![ghimirey](https://talk.openmrs.org/letter_avatar/ghimirey/32/6_449c533f586939b6e5f246632a46421f.png) [@ghimirey](https://talk.openmrs.org/u/ghimirey)\
**Post date:** [April 24, 2019, 5:46am UTC](https://talk.openmrs.org/t/registration-fee-sync-with-erp-interim-implementation/13977/20 "2019-04-24T05:46:53Z")

</div>

Hi, I am able to sync Registration Fee with OpenERP. Please find below quick implementation.

**Registration Fee Sync with OpenERP**

**OpenMRS Settings**

Create a new concept class name "RegFee".

Create concept name “Charge Registration” (or any name) of datatype Boolean, class “Radiology” and attach to “Fee Information” concept. Saving this should sync concept got created as product in OpenERP. Once synced with ERP change the class to “RegFee”.

**OpenERP Settings**

Add order type “Registration Fee” in Sales- Configuration- Order Type - Shop Mapping section in OpenERP.

Create a suitable product category for “Charge Registration”.

Set the price and newly created product category for “Charge Registration”.

**bahmni-erp-connect\openerp-atomfeed-service**

Checkout java side code from

git clone [https://github.com/Pasayadaan/openerp-atomfeed-service.git](https://github.com/Pasayadaan/openerp-atomfeed-service.git)

Assign checked out folder read write access

eg: sudo chmod 777 -R foldername

Make sure maven is installed

Make sure java jdk is installed

Go to the folder where pom.xml file resides which is inside root folder and outside scripts folder.

Run mvn clean install -DskipTests

This will generate all classes and war file inside \target folder.

openerp-atomfeed-service\openerp-atomfeed-service\target\openerp-atomfeed-service.war

openerp-atomfeed-service\openerp-atomfeed-service\target\openerp-atomfeed-service\WEB-INF

Replace openerp-atomfeed-service.war file from /opt/bahmni-erp-connect/etc/

Replace WEB-INF folder from /opt/bahmni-erp-connect/bahmni-erp-connect/

**bahmni-erp\openerp-modules\bahmni\_atom\_feed**

Add "event handler" in process\_event function inside /usr/lib/python2.6/site-packages/openerp-7.0\_20130301\_002301-py2.6.egg/openerp/addons/bahmni\_atom\_feed/atom\_feed\_client.py

if(category == "update.attributes"):

self.pool.get(‘order.save.service’).create\_orders(cr,uid,vals,context)

Then restart openerp service

sudo service openerp restart

**Logout and try creating patient from Bahmni**

---

_[View the full topic](https://talk.openmrs.org/t/registration-fee-sync-with-erp-interim-implementation/13977)._
