Cannot synchronize columns with a Payment Reference

Description

I tested this locally or in https://test.idempiere.org/webui/ with the same result.

Steps to reproduce:

  1. Login as System

  2. Open the Table and Column Window

  3. Open to the C_Order record

  4. Navigate to Columns > Payment Rule

  5. Click the Synchronize Column Window

Expected result
The column synchronizes with a successful message like:

Process completed successfully INSERT INTO t_alter_column values('C_Order','PaymentRule','CHAR(1)',null,'B'); UPDATE C_Order SET PaymentRule='B' WHERE PaymentRule IS NULL 0 INSERT INTO t_alter_column values('C_Order','PaymentRule','CHAR(1)',null,'B') 0 UPDATE C_Order SET PaymentRule='B' WHERE PaymentRule IS NULL

Actual result
An error message is shown:
Error:
org.postgresql.util.PSQLException: ERROR: column "b" does not exist Position: 32
0 ALTER TABLE C_Order MODIFY PaymentRule CHAR(1) DEFAULT B

After debugging the generated SQL is "PaymentRule CHAR(1) DEFAULT B NOT NULL" without single quotes around the B, which causes the issue.

This can also be reproduced by copying a table with a String default logic and running Synchronize column

Environment

None

Activity

Carlos Ruiz 
November 20, 2020 at 11:06 PM

After analyzed the case - the problem seems to be related just to columns with reference Payment

The pull request 398 fixes that.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Created November 18, 2020 at 12:42 PM
Updated January 2, 2021 at 6:29 PM
Resolved November 21, 2020 at 9:08 AM