Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043107Openbravo ERPA. Platformpublic2020-02-04 10:062020-02-07 14:21
inigo_lerga 
inigo_lerga 
normalminorhave not tried
closedfixed 
5
 
3.0PR20Q2 
dmiguelez
Core
No
0043107: Apply new HQL Style in LandedCostProcess.java
LandedCostProcess.java has two HQL queries with:
- the HQL is hard to read because of formatting
- and it is mixing txt and i.e PROPERTY_ID constant which is not recommended by default
-
Follow new format as in http://wiki.openbravo.com/wiki/HQL_Coding_Conventions [^]
No tags attached.
related to design defect 0041287 acknowledged Triage Platform Base Tracking issue: Convert HQL to apply new style 
Issue History
2020-02-04 10:06inigo_lergaNew Issue
2020-02-04 10:06inigo_lergaAssigned To => inigo_lerga
2020-02-04 10:06inigo_lergaModules => Core
2020-02-04 10:06inigo_lergaTriggers an Emergency Pack => No
2020-02-04 10:06inigo_lergaRelationship addedrelated to 0041287
2020-02-04 10:07inigo_lergaStatusnew => scheduled
2020-02-04 10:59inigo_lergaNote Added: 0117450
2020-02-07 14:21hgbotCheckin
2020-02-07 14:21hgbotNote Added: 0117574
2020-02-07 14:21hgbotStatusscheduled => resolved
2020-02-07 14:21hgbotResolutionopen => fixed
2020-02-07 14:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/321d0d9d12bede798b8abbd50e9ffd3668a80aa8 [^]
2020-02-07 14:21hgbotCheckin
2020-02-07 14:21hgbotNote Added: 0117575
2020-02-07 14:21dmiguelezReview Assigned To => dmiguelez
2020-02-07 14:21dmiguelezNote Added: 0117576
2020-02-07 14:21dmiguelezStatusresolved => closed
2020-02-07 14:21dmiguelezFixed in Version => 3.0PR20Q2

Notes
(0117450)
inigo_lerga   
2020-02-04 10:59   
Test Plan Mantis HQL queries:
As the F&B International Group Admin role:
    - Go to the Process Request window and select the
      record with "Costing Background process" in the Process
      field. Press the Unschedule Process button and then
      Close button in the popup window.

    - Create a new Process Request in this same window,
      with "F&B International Group" as client and "*" Organization.
      Set the Process to "Costing Background process" and Timing
      "Run Immediately". Save the record.
      
    - Go to the Goods Receipt window and create a new record
      with "Bebidas Alegres, S.L." as Business Partner.
      Go to the Lines Tab and create a new line with "Cerveza Ale 0,5L"
      as Product. Save the record.
      Press the Complete button and OK in the popup window.

    - Go to the Process Request window, select the previously created
      Process request and press the Schedule Process button and then
      Close button in the popup window.

    - Go to the Landed Cost Type window and create a new record. Name it
      TEST. Put "Distribution by Amount" in the Landed Cost Distribution
      Algorithm field and "Capital Social" in the Account field.
      Save the record.

    - Go to the Landed Cost window and create a new record. Leave every
      field as default.
      Go to the Cost Tab and create a new Cost record. Set the previously
      created Landed Cost Type in its field and any desired amount. Make sure
      that the Landed Cost Distribution Algorithm is "Distribution by Amount".
      Go to the Receipt Tab and create a new Receipt record. Set the previously
      created Goods Receipt in th Goods Receipt field, and select the
      "Cerveza Ale 0,5L" line in the Goods Receipt Line.
      Save the record.
      Press the Process button and Done in the popup window.
      
    #In this moment the modified HQLs are executed#
(0117574)
hgbot   
2020-02-07 14:21   
Repository: erp/devel/pi
Changeset: 321d0d9d12bede798b8abbd50e9ffd3668a80aa8
Author: IƱigo Lerga <inigo.lerga <at> openbravo.com>
Date: Tue Feb 04 11:00:33 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/321d0d9d12bede798b8abbd50e9ffd3668a80aa8 [^]

fixes BUG-43107:Applied new HQL Style + finals added

---
M src/org/openbravo/costing/LandedCostProcess.java
---
(0117575)
hgbot   
2020-02-07 14:21   
Repository: erp/devel/pi
Changeset: 8705bc9c753471243ada3365542b5eb99b1b3b13
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Feb 07 14:20:15 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8705bc9c753471243ada3365542b5eb99b1b3b13 [^]

Related to ISSUE-43107: Code Review changes
* Use ids instead of objects in hql query
* Changed names of variables to better reflect
that they refer to ids

---
M src/org/openbravo/costing/LandedCostProcess.java
---
(0117576)
dmiguelez   
2020-02-07 14:21   
Code Review + Testing Ok