Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043205Openbravo ERPA. Platformpublic2020-02-13 08:412020-02-13 18:23
vmromanos 
platform 
normalminorsometimes
closedduplicate 
5
 
 
Core
No
0043205: Check constraint message is not shown sometimes
In my local environment with latest PI (13/Feb/2020) when I save a record that makes a check constraint to fail, the error message is a generic one instead of the expected one using the correspondent AD_Message:

Error
Saving failed. ERROR: el nuevo registro para la relación «c_bpartner» viola la restricción «check» «c_bpartner_invoicerule_chk» Detail: La fila que falla contiene (AE80121C72324F65B1EAE7F4EFDBAE5E, 1122A0294F274C538343CACE832508F6, 0, Y, 2020-02-13 08:26:01.225, 100, 2020-02-13 08:32:05.409, 100, sdfas, sdfsa, null, null, N, A469224DD36C41D28AAB546C18848814, N, N, N, Y, N, N, null, null, null, en_US, null, N, null, null, null, null, null, null, 0, 0, 0, null, null, 0, 0, null, null, N, null, null, null, null, null, null, null, S, null, null, null, null, O, null, Y, 000000000000000, null, null, null, N, null, null, null, 1000, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, N, N, N, Y, Y, Y, Y, Y, Y, N, N, N, null, null, null, N, 1, N, null, null, null, null, null, N).


However in live builds, in neither PI nor any of the available published versions, I'm able to reproduce it.
It seems to be something related to my java/PG version that is not properly controlled by OB.
Login in Openbravo backend
Go to Business Partner window.
Select Alimentos y Supermercados.
Go to Customer tab.
Set Invoice Terms = "Customer Schedule After Delivery" and do not set the Invoice Schedule.
Try to save.
A nice error message is expected (Saving failed. You have selected Customer Schedule after Delivery as Invoice Rule . This specific option requires a corresponding Invoice Schedule), however an ugly message is returned in my local instance.
No tags attached.
duplicate of design defect 0041866 acknowledged Triage Platform Base Error messages for check constrains are not generated if PosgreSQL is in Spanish 
Issue History
2020-02-13 08:41vmromanosNew Issue
2020-02-13 08:41vmromanosAssigned To => platform
2020-02-13 08:41vmromanosModules => Core
2020-02-13 08:41vmromanosTriggers an Emergency Pack => No
2020-02-13 11:36alostaleRelationship addedduplicate of 0041866
2020-02-13 11:36alostaleStatusnew => closed
2020-02-13 11:36alostaleResolutionopen => duplicate
2020-02-13 18:23Mery AneloNote Added: 0117759

Notes
(0117759)
Mery Anelo   
2020-02-13 18:23   
In addition to those already mentioned by vmromanos, I have been able to verify that this also happens in the versions:
Java 11 and Postgres 9.5.20 (19T4.1)
Java 7 and Postgres 9.5.20 (17Q21.2)
Reproducible in local environments but not on servers.


Details of the PostgreSQL version with its respective OS:
- PostgreSQL 9.5.20 on x86_64-pc-linux-gnu (Ubuntu 9.5.20-1.pgdg19.10+1), compiled by gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008, 64-bit
- PostgreSQL 10.11 (Debian 10.11-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit