Openbravo Issue Tracking System - Modules
View Issue Details
0038352ModulesAdvanced Warehouse Operationspublic2018-04-12 15:132018-05-02 18:47
ngarcia 
vmromanos 
urgentmajoralways
closedfixed 
5
 
 
dmiguelez
0038352: Cannot Issue a partially issued sales order, there are errors with reserved stock
Cannot Issue a partially issued sales order, there are errors with reserved stock
As group admin role:
   Create a sales order for F&B US. Inc.
   Add 10 units of Energy Drink product and book it
   Pick
   Go to created task, set Confirmed Quantity to 5 and confirm it
   Issue (confirm the task if required)
   Confirm the pending task related with picking
   Try to Issue the pending quantity and check an error is shown:
      No Batch of Tasks document was created

   Note: After commenting the following line in IssueSalesOrder_ITTAlgorithmDao.getStockReservationFromConfirmedPickingTasks() function:

and sr.attributeSetValue.id = t.confirmedAttribute.id" + //

The error shown in

There is not enough stock available to create the task Energy Drink - 10 - - DOCK - - 1000055. This error usually means that there is available stock [5] but it's protected in not confirmed yet task(s) [0]
No tags attached.
depends on defect 0038125 closed vmromanos Problems with not deleted reservations with Delta Tasks 
related to defect 0038802 closed dmiguelez Not possible to Issue a DO after a partial Issue has been done first 
related to defect 0038803 closed dmiguelez Not possible to Issue a Sales Order after it has been Boxed (and a Picking has been done first) 
Issue History
2018-04-12 15:13ngarciaNew Issue
2018-04-12 15:13ngarciaAssigned To => dmiguelez
2018-04-12 15:14ngarciaResolution time => 1525298400
2018-04-12 15:14ngarciaAssigned Todmiguelez => vmromanos
2018-04-12 15:14ngarciaIssue Monitored: networkb
2018-04-12 16:55vmromanosStatusnew => acknowledged
2018-04-17 17:56vmromanosRelationship addeddepends on 0038125
2018-04-17 17:56vmromanosStatusacknowledged => scheduled
2018-04-17 18:45vmromanosNote Added: 0103942
2018-04-17 18:47vmromanosReview Assigned To => dmiguelez
2018-04-17 18:58hgbotCheckin
2018-04-17 18:58hgbotNote Added: 0103946
2018-04-17 18:58hgbotStatusscheduled => resolved
2018-04-17 18:58hgbotResolutionopen => fixed
2018-04-17 18:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/4d0873a4f12c8ab965e743f1e943a6589fc779f0 [^]
2018-04-18 17:00hgbotCheckin
2018-04-18 17:00hgbotNote Added: 0103978
2018-04-18 17:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/4d0873a4f12c8ab965e743f1e943a6589fc779f0 [^] => http://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/7d6768788efb9febd100ff350cac3d44ccfdf86d [^]
2018-04-18 17:00hgbotCheckin
2018-04-18 17:00hgbotNote Added: 0103981
2018-04-18 17:00hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/7d6768788efb9febd100ff350cac3d44ccfdf86d [^] => http://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/dcd3ac39bf337d1f02434f3bed4e704f05a39601 [^]
2018-04-18 20:51hgbotCheckin
2018-04-18 20:51hgbotNote Added: 0103983
2018-04-18 20:51hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/dcd3ac39bf337d1f02434f3bed4e704f05a39601 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/218c9aa9c85cf26499c4a5e4a7b7deec9ec2370b [^]
2018-04-18 20:51hgbotCheckin
2018-04-18 20:51hgbotNote Added: 0103984
2018-04-18 20:51hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/218c9aa9c85cf26499c4a5e4a7b7deec9ec2370b [^] => http://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/0c035e665d983743a669b4a17d1e3b9e29d19182 [^]
2018-04-18 20:51hgbotCheckin
2018-04-18 20:51hgbotNote Added: 0103985
2018-04-18 20:51hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/0c035e665d983743a669b4a17d1e3b9e29d19182 [^] => http://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/17db12be17982de1cc13f22bb852eea58fbb2d3a [^]
2018-04-19 13:09hgbotCheckin
2018-04-19 13:09hgbotNote Added: 0103993
2018-04-19 13:09hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/17db12be17982de1cc13f22bb852eea58fbb2d3a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/3a303867fc26c1ae754f2d34e8a97e418076486d [^]
2018-04-19 14:13hgbotCheckin
2018-04-19 14:13hgbotNote Added: 0103995
2018-04-19 14:13hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/3a303867fc26c1ae754f2d34e8a97e418076486d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/52321e3eef8de3f9b7439eb68c71e8c1c1c8dc08 [^]
2018-04-19 14:19hgbotCheckin
2018-04-19 14:19hgbotNote Added: 0103996
2018-04-19 14:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/52321e3eef8de3f9b7439eb68c71e8c1c1c8dc08 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/b01ea7ca54dfe064086a1f5d42d6e6cefd0add2e [^]
2018-05-02 18:47dmiguelezNote Added: 0104218
2018-05-02 18:47dmiguelezStatusresolved => closed
2018-06-21 11:25dmiguelezRelationship addedrelated to 0038802
2018-06-21 11:30dmiguelezRelationship addedrelated to 0038803
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0103942)
vmromanos   
2018-04-17 18:45   
Test plan.

As AWO-QA admin.

Go to Product window and create a new product for West. Name = PA
Do NOT add attributes.
Add any price to General Sales Price List.

Go to Physical Inventory Proposal and create a new record for West org and warehouse.
Add a line for PA product and qty 100.
Process and create task.
Confirm task with 100 units.

Go to Sales Order and create a new record for West org and warehouse and any business partner.
Enter a line for 10 units of product PA.
Book and Pick.
Confirm a task with 4 units and delta same.
Press Issue and confirm created task.
Press Pick. Verify a task for 6 units is created. Confirm it.
Press Issue and confirm created task.
Verify no errors are raised.
(0103946)
hgbot   
2018-04-17 18:58   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 4d0873a4f12c8ab965e743f1e943a6589fc779f0
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Apr 17 18:40:47 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/4d0873a4f12c8ab965e743f1e943a6589fc779f0 [^]

Fixed issue 38352: Partial Issue and Reservations
Related to issue 38125.

Added missed coalesce for attribute in query.
Take into account the released quantity.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
---
(0103978)
hgbot   
2018-04-18 17:00   
Repository: retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 7d6768788efb9febd100ff350cac3d44ccfdf86d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Apr 17 18:40:47 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/7d6768788efb9febd100ff350cac3d44ccfdf86d [^]

Fixed issue 38352: Partial Issue and Reservations
Related to issue 38125.

Added missed coalesce for attribute in query.
Take into account the released quantity.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
---
(0103981)
hgbot   
2018-04-18 17:00   
Repository: retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: dcd3ac39bf337d1f02434f3bed4e704f05a39601
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Apr 17 18:40:47 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/dcd3ac39bf337d1f02434f3bed4e704f05a39601 [^]

Fixed issue 38352: Partial Issue and Reservations
Related to issue 38125.

Added missed coalesce for attribute in query.
Take into account the released quantity.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithm.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
---
(0103983)
hgbot   
2018-04-18 20:51   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 218c9aa9c85cf26499c4a5e4a7b7deec9ec2370b
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 18 20:18:15 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/218c9aa9c85cf26499c4a5e4a7b7deec9ec2370b [^]

Fixed issue 38352: improvements to the fix

Always unlink reservation from task when confirming the Picking Sales Order task (added PickingSalesOrderPostConfirmTaskHook to manage it).
It has no sense to keep that relationship because the reservation stock can be deleted and created again by M_Movement_Post so it's better to always remove the link.
Fix AWOk_DeltaManagement to support this behavior.

IssueSalesOrder_ITTAlgorithmDao: stock reservation must not be linked to any other task in not confirmed status.

PickingSalesOrder_ITTAlgorithmDao: Usage of oBAWOIsCreatedByTask to distinguish standalone issue tasks. There is no need to check they are not included in a movement line (because the user might have moved before).

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOk_DeltaManagement.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/PickingSalesOrder_ITTAlgorithmDao.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/hooks/implementation/PickingSalesOrderPostConfirmTaskHook.java
---
(0103984)
hgbot   
2018-04-18 20:51   
Repository: retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 0c035e665d983743a669b4a17d1e3b9e29d19182
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 18 20:18:15 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR17Q4/org.openbravo.warehouse.advancedwarehouseoperations/rev/0c035e665d983743a669b4a17d1e3b9e29d19182 [^]

Fixed issue 38352: improvements to the fix

Always unlink reservation from task when confirming the Picking Sales Order task (added PickingSalesOrderPostConfirmTaskHook to manage it).
It has no sense to keep that relationship because the reservation stock can be deleted and created again by M_Movement_Post so it's better to always remove the link.
Fix AWOk_DeltaManagement to support this behavior.

IssueSalesOrder_ITTAlgorithmDao: stock reservation must not be linked to any other task in not confirmed status.

PickingSalesOrder_ITTAlgorithmDao: Usage of oBAWOIsCreatedByTask to distinguish standalone issue tasks. There is no need to check they are not included in a movement line (because the user might have moved before).

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOk_DeltaManagement.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/PickingSalesOrder_ITTAlgorithmDao.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/hooks/implementation/PickingSalesOrderPostConfirmTaskHook.java
---
(0103985)
hgbot   
2018-04-18 20:51   
Repository: retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 17db12be17982de1cc13f22bb852eea58fbb2d3a
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Apr 18 20:18:15 2018 +0200
URL: http://code.openbravo.com/retail/backports/AWO/3.0RR18Q1/org.openbravo.warehouse.advancedwarehouseoperations/rev/17db12be17982de1cc13f22bb852eea58fbb2d3a [^]

Fixed issue 38352: improvements to the fix

Always unlink reservation from task when confirming the Picking Sales Order task (added PickingSalesOrderPostConfirmTaskHook to manage it).
It has no sense to keep that relationship because the reservation stock can be deleted and created again by M_Movement_Post so it's better to always remove the link.
Fix AWOk_DeltaManagement to support this behavior.

IssueSalesOrder_ITTAlgorithmDao: stock reservation must not be linked to any other task in not confirmed status.

PickingSalesOrder_ITTAlgorithmDao: Usage of oBAWOIsCreatedByTask to distinguish standalone issue tasks. There is no need to check they are not included in a movement line (because the user might have moved before).

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOk_DeltaManagement.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/IssueSalesOrder_ITTAlgorithmDao.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/ittalgorithm/implementation/PickingSalesOrder_ITTAlgorithmDao.java
A src/org/openbravo/warehouse/advancedwarehouseoperations/hooks/implementation/PickingSalesOrderPostConfirmTaskHook.java
---
(0103993)
hgbot   
2018-04-19 13:09   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders
Changeset: 3a303867fc26c1ae754f2d34e8a97e418076486d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Apr 19 13:06:48 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/3a303867fc26c1ae754f2d34e8a97e418076486d [^]

Fixed issue 38352: take into released qty in DO module

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/ittalgorithm/implementation/IssueDistributionOrderIssue_ITTAlgorithm.java
---
(0103995)
hgbot   
2018-04-19 14:13   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 52321e3eef8de3f9b7439eb68c71e8c1c1c8dc08
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Apr 19 14:12:53 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/52321e3eef8de3f9b7439eb68c71e8c1c1c8dc08 [^]

Fixed issue 38352: improvements to the fix

Unlink reservation in box/unbox to keep consistency

---
A src/org/openbravo/warehouse/advancedwarehouseoperations/hooks/implementation/ReferencedInventoryPostConfirmTaskHook.java
---
(0103996)
hgbot   
2018-04-19 14:19   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders
Changeset: b01ea7ca54dfe064086a1f5d42d6e6cefd0add2e
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Apr 19 14:12:37 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/rev/b01ea7ca54dfe064086a1f5d42d6e6cefd0add2e [^]

Fixed issue 38352: improvements to the fix

Unlink reservation in picking DO to keep consistency

---
A src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/taskhook/PickingDistributionOrderPostConfirmTaskHook.java
---
(0104218)
dmiguelez   
2018-05-02 18:47   
Code Review + Testing Ok