1. Login as system administrator, create different quick entry fields on the "Invoice (Customer)" and "Invoice (Vendor)" windows.
Now, login as GardenAdmin,
2. go to "Payment" window.
2.1 select Payment with Document Type=AR Receipt. This is a sales transaction. right click on the "invoice" field. select "update" of contextual menu. this shows the quick entry for "Invoice (Customer)"
2.2 now, select Payment with Document Type=AP Payment. This is not a sales transaction. right click on the "invoice" field. select "update" of contextual menu. this shows the quick entry for "Invoice (Customer)".
step 2.2 should show quick entry for "Invoice (Vendor)" instead of "Invoice (Customer)"
Pending to check comment:
Hi Heng Sin, this patch is OK when entering the payment.
Richard found yesterday that the IsSOTrx variable is just loaded on CalloutPayment.docType
So, this patch is opening the correct PO window just if the doctype has been touched, otherwise (i.e. just opening the window or navigating to an AP Payment) it still opens the SO window.
I remember several ideas to implement an "on-load-record" callout - but don't remember if it has been implemented. I think some time ago we had the idea of implementing on-load-record callout if the callout is set to the _ID column of the window, but Richard tested yesterday that approach and seems it's not implemented.
Triaged by Diego Ruiz,
The issue described in the description is solved but the one described in the above comment is still present.
Steps to reproduce.
Login as GardeWorld Admin
Create a Payment with Document Type 'AP Payment'
Close the tab
Open the just created record from recent items
Right-click on invoice → Update
Invoice(Vendor) quick entry window is shown
Invoice(Customer) quick entry window is shown
Set to minor because it has a workaround of interacting again with the Document Type field
hi , would a computed field IsSOTrx resolve it ?
Hi Heng Sin,
I think it would, the issue happens on New and Update when the Invoice field is empty. When there is a selected invoice it opens the correct Quick Entry window.
When it is empty it gets the isSOTrx value from DB.isSOTrx line 1791 which seems to returns always true for Payment
The onNavigateCallout capability is already implemented in iDempiere (defining a callout on the ID column of the table) - so I think that can be a possible solution for this and other tables having IsSOTrx - but as it can be with any table - and also with new tables with IsSOTrx maybe a generic solution filling that column on navigate would be better.