etendosoftware / etendo_core

Etendo Classic source code
9 stars 10 forks source link

EPL-1505: New field in a table for "create invoices from orders" windows that uses values from an hql query does not work correctly. #397

Closed brunoromerosmf closed 2 months ago

brunoromerosmf commented 3 months ago

Error's description

When you add a new field to the HQL query for the table related to the "create invoices from orders" window, following the step-by-step instructions, the query works correctly if the new field is placed before the FROM clause, having it the last field in the query. However, if the field is positioned elsewhere in the query, it returns incorrect values.

Steps to reproduce the error

  1. Go to tables and colums and search “DJOBS_CreateFromOrders“. This is the table in the window mentioned above
  2. In “HQL Query“ field add a new column en select, for example: ic.salesOrder.businessPartner.searchKey as searchkey. (I recommend first adding it before the from to see how it works and then in another position to reproduce the bug.)
  3. Create column for the field.
  4. After, in the window configuration, create the field that the column. The field must show in the grid.
  5. Run the compile.complete smartbuild because the enviroment need regenerate the window.
  6. Go to “create invoices from orders“ and you will see the new field with value 100 always (isn’t correct)

Required Configurations (if necessary)

If necessary, create a template to be able to edit the mentioned window.

Expected behavior

Return the correct values.

Affected Version

¿Latest/Specific? Yes Version number: 24.1.6

Solution Design (optional)

Other test cases

Given: When: Then: