Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036621Openbravo ERPZ. Otherspublic2017-08-07 15:072017-08-07 15:52
markmm82 
Triage Omni OMS 
normalminoralways
newopen 
5
 
 
Core
No
0036621: It is possible to use UOM conversions of other clients in some callouts.
It is possible to use UOM conversions of other clients in some callouts.

UOM conversions can be defined with different rates according the client using them. For instance, for a client one Bag can be defined as 100 Kg, but to other client one Bag could be 100.25 Kg.

Currently, some callouts are using the multiplyRate and divideRate of SL_Invoice_Conversion_data.xsql, these methods are not taking into account the session's client and it is causing that can be used incorrect conversions.


It is necessary to filter by client when searching for UOM conversions to avoid use an incorrect conversion.
You will find this bug in the following callouts:
- SL_CreateFromMultiple_Conversion
- SL_CreateLines_Conversion_UOM
- SL_GlobalUse_Conversion
- SL_InOut_Conversion
- SL_Internal_Consumption_Conversion
- SL_Inventory_Conversion
- SL_Invoice_Conversion
- SL_Movement_Conversion
- SL_Order_Conversion
- SL_Production_Conversion
- SL_SequenceProduct_Conversion
Login as System Admin Role
- Mark as displayed = Yes fields
  - Sales Invoice Lines: Order Quantity, Order Uom
  - Purchase Invoice Lines: Order Quantity, Order Uom
- Enable tabs related with Second UOM
  - Product Window | UOM tab
  - Unit of Measure | Conversion Tab
- Log Out and Login as QA Testing Admin.
- Create a new Product QA Product.
- Assign 2nd UOM Kilogram to previously created product (QA Product) in the UOM Tab
- Create a Sales Invoice
- Add a line and select the QA Product
- Select Kilogram in Order Uom and enter Order Quantity as 10
- Realize that message is shown as
    "Info
     No UOM Conversion Rate between UOMs found"
- Cancel Sales Invoice Line
- Navigate to Kilogram Unit of Measure and add conversion as
    - To Uom : Unit
      Multiple Rate by: 10
- Go to back to previous Sales Invoice
- Add a line and select the QA Product.
- Select Kilogram in Order Uom and enter Order Quantity as 10
- Realize that no message is shown and Invoiced Quantity is set as 100

- Log Out and Login as F&B Group Admin.
- Create a new Product FB Product.
- Assign 2nd UOM Kilogram to previously created product (FB Product) in the UOM Tab
- Go to Unit of Measure window and select Kilogram unit. Realize there are not conversions defined to it.
- Go to Unit of Measure window and select Unit. Notice there are not conversions defined to it.
- Create a Sales Invoice
- Add a line and select the FB Product
- Select Kilogram in Order Uom and enter Order Quantity as 10
- Realize that no message is shown and Invoiced Quantity is set as 100. Although there are not conversions defined between Unit and Kilogram it is using the conversion defined in QA client. An informative message should be shown as
    "Info
     No UOM Conversion Rate between UOMs found"
- Cancel Sales Invoice Line
- Navigate to Kilogram Unit of Measure and add conversion as
    - To Uom : Unit
      Multiple Rate by: 20
- Go to back to previous Sales Invoice
- Add a line and select the Test Product.
- Select Kilogram in Order Uom and enter Order Quantity as 10
- Realize that no message is shown and Invoiced Quantity is set as 200. Now it is using the right conversion rate.

- Log Out and Login as QA Testing Admin again. Now different conversions are defined for the same units in QA and F&B clients.
- Navigate to Kilogram Unit of Measure and realize exists the previously created conversion to Unit as
    - To Uom : Unit
      Multiple Rate by: 10
- Create a Sales Invoice
- Add a line and select the QA Product
- Select Kilogram in Order Uom and enter Order Quantity as 10
- Realize that no message is shown and Invoiced Quantity is set as 200.
  Notice that it is used Multiply Rate = 20, that it is defined in the F&B client. It is wrong and should be used the defined for the QA client with rate = 10.
Filter by client when getting the UOM conversion.

Attached you will find a proposed patch for affected callouts.
No tags attached.
related to design defect 0036067 closed markmm82 old callouts should be refactored to implement SimpleCallout 
diff 36621.diff (15,213) 2017-08-07 15:08
https://issues.openbravo.com/file_download.php?file_id=10976&type=bug
Issue History
2017-08-07 15:07markmm82New Issue
2017-08-07 15:07markmm82Assigned To => Triage Finance
2017-08-07 15:07markmm82Modules => Core
2017-08-07 15:07markmm82Triggers an Emergency Pack => No
2017-08-07 15:08markmm82File Added: 36621.diff
2017-08-07 15:20markmm82Description Updatedbug_revision_view_page.php?rev_id=15616#r15616
2017-08-07 15:43markmm82Steps to Reproduce Updatedbug_revision_view_page.php?rev_id=15618#r15618
2017-08-07 15:43markmm82Proposed Solution updated
2017-08-07 15:48markmm82Relationship addeddepends on 0036067
2017-08-07 15:52markmm82Relationship deleteddepends on 0036067
2017-08-07 15:52markmm82Relationship addedrelated to 0036067

There are no notes attached to this issue.