How can I create or modify the entry built by a document when posting it?
Under the src/org/openbravo/erpCommon/ad_forms path, you can find every document type, such us DocInvoice, and their entry build process implemented. It may be useful to have a look at the documentation about the entries created by each document type, at http://downloads.sourceforge.net/openbravo/Accounting_Entries.