Notes |
|
(0118875)
|
vmromanos
|
2020-03-30 14:02
(edited on: 2020-03-31 13:00) |
|
Cloned to 0043608 and assigned to Platform as I think it is a generic problem.
However, I keep opened this issue to allow the Create Lines From to properly show the exception's message raised from the trigger, as right now it won't work.
|
|
|
|
Test plan I:
Login as F&B group admin
Go to Purchase Invoice window and create a new record for "Norte" organization and "Bebidas Alegres" business partner.
Press Create Lines From Order.
Select any line. Press Done.
Verify the process is completed successfully and the line has been inserted in the invoice Lines tab.
Test plan II:
Login as F&B group admin
Go to Purchase Invoice window and create a new record for "Norte" organization and "Bebidas Alegres" business partner.
Press Create Lines From Order.
Do not select any line. Press Done
Verify the error is shown in the message bar: "There are not lines selected."
Test plan III:
Apply the attached patch.
Login as F&B group admin
Go to Purchase Invoice window and create a new record for "Norte" organization and "Bebidas Alegres" business partner.
Press Create Lines From Order.
Select any line. Press Done.
Verify the error is shown in the message bar: "ERROR: The invoice line of a re-activated invoice that is linked to a Landed Cost cannot be modified. Where: función PL/pgSQL c_invoiceline_trg() en la línea 34 en RAISE"
|
|
|
(0118892)
|
hgbot
|
2020-03-31 13:10
|
|
Repository: erp/devel/pi
Changeset: ca7ef98a3db96f7ed94083b57a9efbcb31fdbfae
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Mar 31 12:58:39 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ca7ef98a3db96f7ed94083b57a9efbcb31fdbfae [^]
fixed BUG-43581: Create Lines From support for trigger exceptions
In case of errors during the process we rollback and close the current transaction. This is a general improvement that makes sense to the process.
In the JSONObject returned to the UI in case of exceptions, we try to get the message text to display to the end user. This is only possible because the previous locked transaction is closed, so DAL opens a new one to retrieve the error message.
Note that this code works for both db and java exceptions
---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromHandler.java
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromProcess.java
---
|
|
|
|
|
|
(0118940)
|
hgbot
|
2020-04-06 09:25
|
|
Repository: erp/devel/pi
Changeset: 67445d6d353d73d35a60b50303d4840ee4fd7ceb
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Apr 06 09:11:11 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/67445d6d353d73d35a60b50303d4840ee4fd7ceb [^]
Related to BUG-43581: Use OBMessageUtils.translateError()
This method provides better support for db related exceptions, so the error message is nicer
---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromHandler.java
---
|
|
|
(0118941)
|
hgbot
|
2020-04-06 09:25
|
|
Repository: erp/backports/3.0PR20Q2
Changeset: 9dc2aada8f02e43f975abea330de77c01c43c9f1
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Apr 06 09:11:11 2020 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR20Q2/rev/9dc2aada8f02e43f975abea330de77c01c43c9f1 [^]
Related to BUG-43581: Use OBMessageUtils.translateError()
This method provides better support for db related exceptions, so the error message is nicer
---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromHandler.java
---
|
|
|
(0118980)
|
hgbot
|
2020-04-06 11:54
|
|
Repository: erp/devel/pi
Changeset: 9586c212a90a00eecfa52f9fe5d84cbc6c593496
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Mar 31 12:58:39 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9586c212a90a00eecfa52f9fe5d84cbc6c593496 [^]
fixed BUG-43581: Create Lines From support for trigger exceptions
In case of errors during the process we rollback and close the current transaction. This is a general improvement that makes sense to the process.
In the JSONObject returned to the UI in case of exceptions, we try to get the message text to display to the end user. This is only possible because the previous locked transaction is closed, so DAL opens a new one to retrieve the error message.
Note that this code works for both db and java exceptions
---
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromHandler.java
M src/org/openbravo/common/actionhandler/createlinesfromprocess/CreateInvoiceLinesFromProcess.java
---
|
|
|
|
|