Skip to content

[29.x] ErrorWhenCreatePurchaseOrderFromSaleOrderIncludingDROPShipmentInitial commit - #10947

Open
Shikhverma wants to merge 2 commits into
releases/29.xfrom
bugs/Bug-648697--29.x]ErrorWhenCreatePurchaseOrderFromSaleOrderIncludingDROPShipment
Open

[29.x] ErrorWhenCreatePurchaseOrderFromSaleOrderIncludingDROPShipmentInitial commit#10947
Shikhverma wants to merge 2 commits into
releases/29.xfrom
bugs/Bug-648697--29.x]ErrorWhenCreatePurchaseOrderFromSaleOrderIncludingDROPShipment

Conversation

@Shikhverma

@Shikhverma Shikhverma commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Bug 648697: [29.x [ALL-E] "Item tracking is defined for item 1000 in the Requisition Line. You must delete the existing item tracking before modifying or deleting the Requisition line" when creating a Purchase Order from a Sales Order including DROP Shipment

Fixes AB#648697

@github-actions github-actions Bot added the Team: SCM GitHub request for SCM area label Sep 2, 2026
@github-actions github-actions Bot added this to the Version 29.1 milestone Sep 2, 2026
@Shikhverma Shikhverma changed the title Initial commit [29.x] ErrorWhenCreatePurchaseOrderFromSaleOrderIncludingDROPShipmentInitial commit Sep 7, 2026
@Shikhverma
Shikhverma marked this pull request as ready for review September 7, 2026 13:04
@Shikhverma
Shikhverma requested a review from a team September 7, 2026 13:04
@Shikhverma
Shikhverma requested a review from a team as a code owner September 7, 2026 13:04
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

This change tries to copy item tracking after order planning recalculates the requisition line, and adds a regression test for a lot-tracked drop-shipment sales order. The timing is the right direction, but the old copy still runs before Calculate, so item tracking is copied twice and the unsafe pre-Calculate path remains. The fix should move the publisher call, not duplicate it.

Problem-solution fit

Fit: Partial

The bug scenario is clear and the test models it. The implementation only adds the later copy and leaves the earlier copy in place, so it does not fully match the expected behavior.

Suggestions

S1 (🔴 High): Move item tracking copy instead of duplicating it
Delete the earlier OnInsertDemandLinesOnCopyItemTracking call before PlanningLineMgt.Calculate and keep this new call after it. The old call still creates tracking on the requisition line before Calculate modifies the line. This can keep the reported error path and can also create wrong reservation entries.

Risk assessment and necessity

Risk: This code is in order planning for sales demand and affects item tracking copied into requisition and purchase lines. A wrong sequence can block purchase order creation or leave incorrect reservation entries. The event surface is unchanged.

Necessity: The scenario is important because a valid drop-shipment purchase order should be created with lot tracking. The change is necessary, but it should be the same narrow move of the call to after calculation.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10947 round=1 by=alexei-dobriansky at=2026-09-07T18:21:18Z lastSha=9c0c3cedc087dd83b3ce43d774690852292e5d28 reviewKey=90279a71cd6d9497d463eab022d7a6ed3196eceb62e37ac4aa3ad61bd8c155a3 suggestions=S1@2cdefb4d

@alexei-dobriansky alexei-dobriansky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a backport, do the same corrections in the master branch.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 2

Recommendation: Accept

What this PR does

The new commit removes the earlier item-tracking copy and leaves the shared publisher after PlanningLineMgt.Calculate. This now makes the change a move instead of a duplicate call, so the requisition line is calculated before tracking is copied. The added test covers the lot-tracked drop-shipment purchase order flow and checks that tracking exists on the created purchase line.

Status of previous suggestions
ID Title Status Author response
S1 Move item tracking copy instead of duplicating it Addressed Code removes the earlier call.
New observations (commits since round 1)

None - changes only addressed prior suggestions.

Risk assessment and necessity

Risk: Low. The touched code is in order planning and affects item tracking copied from demand lines into requisition and purchase lines. The publisher still exists, its signature is unchanged, and the timing is now after calculation.

Necessity: The change is needed because purchase order creation from a lot-tracked drop-shipment sales order should succeed and preserve tracking.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10947 round=2 by=alexei-dobriansky at=2026-09-08T12:03:36Z lastSha=7f14dfdd11a9631ac7e9377f5070061f416b8a19 reviewKey=0b2cdd75b5f94284b871c922b642984d7d3b46ca95e2c2ab22cf522b2522b325 suggestions=S1@2cdefb4d:addressed parentRound=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants