Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034226
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2016-10-17 19:062016-12-16 18:38
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revisione498cedad5a5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034226: Requisition lines with same product are grouped only if their line number is consecutive

DescriptionRequisition lines with same product are grouped only if their line number is consecutive. The solution of the 25114 seems not to be correct
Steps To ReproduceAs group admin role:
   Create a Requisition add a product and complete it
   Create a new Requisition, add the same product and complete it
   Create a new Requisition, add two different products and the same product in the line 30 and complete it
   Go to Requisition To Order window
   Select all the previously created lines and click on Add
   Select all the previously created lines and click on Create
   Check in the created purchase order that the first two requisition lines have been grouped but the line with the same product of the third requisition is on a different purchase order line
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00251143.0PR14Q2 closedAtulOpenbravo Requisition to order process does not maintain the order of the requisition lines 

-  Notes
(0090822)
markmm82 (developer)
2016-10-24 15:31

Test Plan:
As group admin role:
   Create a Requisition to Bebidas Alegres bp.
     Add 10 Units of Agua sin Gas 1L product and complete it (Line 10)
   Create a Requisition to Bebidas Alegres bp.
     Add 20 Units of Agua sin Gas 1L product and complete it (Line 10)
   Create a Requisition to Bebidas Alegres bp.
     Add 10 Units of Cerveza Ale 0,5L product and complete it (Line 10)
     Add 10 Units of Cerveza Lager 0,5Lproduct and complete it (Line 20)
     Add 30 Units of Agua sin Gas 1L product and complete it (Line 30)
   Go to Requisition To Order window
     Notice the order is
       Line 10 of the first Requisition (Agua sin Gas 1L)
       Line 10 of the second Requisition (Agua sin Gas 1L)
       Line 10 of the third Requisition (Cerveza Ale 0,5L)
       Line 20 of the third Requisition (Cerveza Lager 0,5L)
       Line 30 of the third Requisition (Agua sin Gas 1L)
   Select all the previously created lines and click on Add
     Notice the order of lines remain the same
   Select all the previously created lines and click on Create
   Check in the created purchase order that lines left as:
     Line 10: 60 Units of Agua sin Gas 1L (Grouped the 3 lines of requisitions)
     Line 20: 10 Units of Cerveza Ale 0,5L
     Line 30: 10 Units of Cerveza Lager 0,5L
     Lines with the same product of the third requisition have been grouped in the first purchase order line and the order remains.

Test Plan 2 (related to issue 25114)
As group admin role:
   Create a Requisition to Bebidas Alegres bp.
     Add 1 Units of Vino Tinto 0,75L product and complete it (Line 10)
     Add 1 Units of Cerveza Lager 0,5L product and complete it (Line 20)
     Add 1 Units of Agua sin Gas 1L product and complete it (Line 30)
     Add 1 Units of Cerveza Ale 0,5L product and complete it (Line 40)
     Add 1 Units of Cola de Cereza 0,5L product and complete it (Line 50)
   Complete it.
   Go to Requisition To Order window
     Notice the order of lines is the same than the requisition.
   Select all the previously created lines and click on Add
     Notice the order of lines remain the same.
   Select all the previously created lines and click on Create
   Check in the created purchase order and notice that the process does maintain the original order.
(0091218)
hgbot (developer)
2016-11-08 09:31

Repository: erp/devel/pi
Changeset: e498cedad5a54fc68f06a51b3837fd3d24487820
Author: Mark <markmm82 <at> gmail.com>
Date: Fri Nov 04 18:58:07 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/e498cedad5a54fc68f06a51b3837fd3d24487820 [^]

Fixes issue 34226: Requisition lines with same product are correctly grouped

Selection of lines in Requisition to Order process always try to maintain the
original order of the lines where the order is created from.
To do that, it first order by line number and then by product, this guarantees
the order but lines with same attributes set (product, attribute, description,
price and UOM) could be no consecutives and not correctly grouped.

To make a correct grouping, was changed the logic of always expect consecutive
products. Before creating the new purchase order line all existing lines
with same attribute set are grouped into a unique line with the total of the
order quantities in a Hash Map object. Then, purchase order lines are created
from the Hash Map containing lines with totals of the originals lines with same
attributes set.

---
M src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java
---
(0091219)
hgbot (developer)
2016-11-08 09:31

Repository: erp/devel/pi
Changeset: 0be9fca7e99562cbf98a40b9fd67849f07769ad2
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Nov 07 20:40:24 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0be9fca7e99562cbf98a40b9fd67849f07769ad2 [^]

Related to issue 34226: Code review improvements

Remove second unneeded loop. For each line, if it has a valid key in the hash map, existing order line will be updated, otherwise, a new order line will be inserted.

---
M src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.java
M src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql
---
(0091220)
aferraz (manager)
2016-11-08 09:35

Code review + Testing OK
(0092598)
hudsonbot (developer)
2016-12-16 18:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test
(0092599)
hudsonbot (developer)
2016-12-16 18:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-10-17 19:06 ngarcia New Issue
2016-10-17 19:06 ngarcia Assigned To => Triage Finance
2016-10-17 19:06 ngarcia Modules => Core
2016-10-17 19:06 ngarcia Resolution time => 1478473200
2016-10-17 19:06 ngarcia Triggers an Emergency Pack => No
2016-10-17 19:06 ngarcia Relationship added related to 0025114
2016-10-17 19:06 ngarcia Issue Monitored: networkb
2016-10-20 19:19 aferraz Assigned To Triage Finance => markmm82
2016-10-20 20:26 markmm82 Status new => scheduled
2016-10-24 15:31 markmm82 Note Added: 0090822
2016-11-08 09:31 hgbot Checkin
2016-11-08 09:31 hgbot Note Added: 0091218
2016-11-08 09:31 hgbot Status scheduled => resolved
2016-11-08 09:31 hgbot Resolution open => fixed
2016-11-08 09:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e498cedad5a54fc68f06a51b3837fd3d24487820 [^]
2016-11-08 09:31 hgbot Checkin
2016-11-08 09:31 hgbot Note Added: 0091219
2016-11-08 09:35 aferraz Review Assigned To => aferraz
2016-11-08 09:35 aferraz Note Added: 0091220
2016-11-08 09:35 aferraz Status resolved => closed
2016-11-08 09:35 aferraz Fixed in Version => 3.0PR17Q1
2016-12-16 18:38 hudsonbot Checkin
2016-12-16 18:38 hudsonbot Note Added: 0092598
2016-12-16 18:38 hudsonbot Checkin
2016-12-16 18:38 hudsonbot Note Added: 0092599


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker