Plugin: Currency Convert Type More Info

From iDempiere en
Jump to navigation Jump to search

Currency Convert Type More Info


  1. In payment window, when user select a different currency from currency in AccountSchema or different invoice currency, user also choose a convert type. You can now see the convert rate. This plugin uses WEditor to achieve this effect.



How to use

1. apply below patch to your idempiere code.

2. install this plug-in as normal

How to I implement it and how to you can flexible use it

1. This plug-in make a WEditor extend from WTableDir editor. it add a label near combobox to display currency rate.

2. currency rate depend to some data at some where:

  • convert type at this editor
  • currency from other field as currency field at payment window
  • currency from account schema (set to environment context)
  • currency from invoice, select at payment window.


currency maybe at anywhere, it's hard to all things dance with together.

3. after try some method. i decide use Env context as center data.

When source of currency from is change, it must update context value of CURRENCY_FROM_ENV

when source of currency to is change, it must update context value of CURRENCY_TO_ENV

4. now i need a method to notify Editor when context change to update its label.

5. I add ability raise event for Env each time Context update (for now i only raise when context relate window update).

6. for performance, i will group listener by window because when raise event, Env must get session, desktop info.

but Env don't know about web. I use WebEnvUpdateListener as forwarder.

7. WebEnvUpdateListener listener event from Env and forward it to other. My editor will registry listener event from WebEnvUpdateListener

now everything is can dance with together.

item 5, 6, 7 is implement by patch i mean above.

item 3 is implement by callout in my plug-in.


add ability configuration "currency from" and "currency to" for callout.

If you want to provide additional comments, please use the Discussion page.