erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

bug: Stock Entry from Work Order failing if Work Order and Stock Entry are cancelled and recreated

Open nameduser0 opened this issue 3 years ago • 5 comments

Description of the issue

The result of this bug is that a new Work Order cannot be recreated and finished because the finish button does not appear because material_transferred_for_manufacturing is not increased from zero.

The responsible code I believe is in: erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry

Context information (for bug reports)

Output of bench version

13.6

Steps to reproduce the issue

  1. Work order has been created from production plan and Started, stock entry for materials created and submitted
  2. Stock Entry cancelled and Job Cards deleted
  3. Work Order Cancelled
  4. Validate material_transferred_for_manufacturing=0
  5. New Work Order created from Production Plan
  6. Press Start on the Work Order

Observed result

Message: "All items have already been transferred for this Work Order." Stock entry is not populated

Expected result

Continues as a fresh Work Order

nameduser0 avatar Jul 12 '21 12:07 nameduser0

@yadavyk what was the value of material_transferred_for_manufacturing on the Work Order at step 5 ?

nameduser0 avatar Jul 20 '21 17:07 nameduser0

@casesolved-co-uk the value of material_transferred_for_manufacturing on Work Order at step 5 was set to 5.

yadavyk avatar Jul 21 '21 06:07 yadavyk

@yadavyk If you can reproduce this so that material_transferred_for_manufacturing returns to zero, you'll see the bug

nameduser0 avatar Jul 29 '21 23:07 nameduser0

This issue has been automatically marked as inactive because it has not had recent activity and it wasn't validated by maintainer team. It will be closed within a week if no further activity occurs.

stale[bot] avatar Feb 08 '22 07:02 stale[bot]

This issue has been automatically marked as inactive because it has not had recent activity and it wasn't validated by maintainer team. It will be closed within a week if no further activity occurs.

stale[bot] avatar Apr 09 '22 09:04 stale[bot]

We no longer provide support for version 13 or older.

Kindly upgrade to version 14 or 15, then refresh and check again because lots of bugs fixed in the new version.

Everything is working fine. No problems were encountered in the latest versions 14 and 15. If the issue occurs then please create a new issue according to the latest version (14 or 15) with a video document if possible.

Version EOL Branch
Version 12 End of 2022 version-12
Version 13 End of 2023 version-13
Version 14 End of 2024 (planned) version-14
Version 15 End of 2026 (planned) version-15
Bleeding edge N/A develop

For more information, please refer to the guidelines.

Thank You!

Nihantra-Patel avatar Mar 19 '24 08:03 Nihantra-Patel