Extend Model Class Idempiere plugin

384 views
Skip to first unread message

Pritesh Shah

unread,
Apr 23, 2014, 6:40:59 AM4/23/14
to idem...@googlegroups.com
Hello All,

I am working iDempiere and I am new to it and working on LiberoHR Payroll module. For one requirement I have to customize MHRProcess class.
Can anybody help me to setup extension environment for plugins ?
Can anybody please guide me how can I extend MHRProcess class from LiberoHR plugin ?

Please reply me its really urgent for me..
Thanks in Advance!!!!

Thanks,
Pritesh

Hiep Lq

unread,
Apr 23, 2014, 11:23:26 AM4/23/14
to idem...@googlegroups.com
1. Can anybody help me to setup extension environment for plugins ?

=> just fork LiberoHR and import this project into idempiere workspace
LiberoHR is convert to idempiere plugin by red1, you can fork at
https://bitbucket.org/red1/liberohr also have a document from red1 about this plug-in
or from dcs, compare to know what's difference (a bit)
https://bitbucket.org/dcs_bitbucket/liberohr_ve

2. Can anybody please guide me how can I extend MHRProcess class from LiberoHR plugin ?

=> in your fork you can modified direct this class. or make class extends this class (must change config some config in AD). 

3. about plugin project, you can search guideline in wiki,
you also can find some info in this group about LiberoHR

Pritesh Shah

unread,
Apr 23, 2014, 12:04:31 PM4/23/14
to idem...@googlegroups.com
Hello Hiep,

Thank you for the prompt reply.

My question is what is the standard procedure to have extension environment to extends plugins class and files ?
Suppose if want to extend MHRProcess by creating new plugin with new custom class and extending MHRProcess from LiberoHR plugin, what would be my steps to do so ?

Thanks,
Pritesh

Hiep Lq

unread,
Apr 23, 2014, 12:22:59 PM4/23/14
to idem...@googlegroups.com
by my know-how.

+ you make a plug-in to override something in core because core export it (export by service, extension point. you can read document of osgi for this)
so, if a plug-in don't export a service, you can't extends by standard way of osgi plug-in

+ with current LiberoHR i think it not public any service, you can modified this.
for easy you should fork it and make your extends process in fork project.
because when owner update LiberoHR of him, you can easy update.

redhuan d. oon

unread,
Apr 23, 2014, 8:57:08 PM4/23/14
to idem...@googlegroups.com
Good question. Use POWrapper as demonstrated in my latest PDFs. Find the last two here should contain examples: http://sourceforge.net/projects/red1/files/ADempiere%20PDFs/

redhuan d. oon

unread,
Apr 23, 2014, 9:10:10 PM4/23/14
to idem...@googlegroups.com
That's for extending Model class in IDempiere involving new elements in its I_classes. If extending the Process class, just change the methods within. You can have it as a different process and rename in the plugin.XML.

redhuan d. oon

unread,
Apr 23, 2014, 9:24:24 PM4/23/14
to idem...@googlegroups.com
Good way to describe the fundamental power of OSGi used in iDempiere but the original contributors such as Joerg Viola and Heng Sin already contributed such extensions commonly used by quite all processes. Only new stuff that you find unable to be done by them then you create new services to better design. If you describe your new usage we can advice if it's so.

Pritesh Shah

unread,
Apr 28, 2014, 12:43:39 AM4/28/14
to idem...@googlegroups.com
Thank Your Redhuan.

My requirement is to modify MHRProcess to add custom method to be called from Rule.
There are other requirements too, but as of now this is on priority for customization.

I need one more information in terms of functional, in Libero HR Payroll, when calculating taxes applied to employee salary, taxes to be deducted from employee salary is fine we can create rule and have your deduction logic implemented and create concepts for the same with Account sign as credits for those taxes. But taxes which employer pays to government which are not deducted from employee salary but employer has to pay to govt, what to do with those. I want those to be created as movements but when generating vendor invoice those shouldn't be calculated in calculating invoice amount

Can you please help in above scenario ? Please let me know in case you need more info on above scenario too.

Thanks for all your support!! :)

Thanks,
Pritesh

redhuan d. oon

unread,
Apr 29, 2014, 12:03:54 PM4/29/14
to idem...@googlegroups.com
I only provide code and functional review to contributions as this is an open source project and not a commercial one. if you have commercial inquiry you can request for quote on professional service from others. Thank you for your understanding.
Reply all
Reply to author
Forward
0 new messages