Deleting cancelled Delivery Note

Hi all,

I am on frappe cloud and am currently facing an issue when deleting a delivery note that has already been cancelled.

It says that the item is linked to a Serial and Batch Bundle.

So I went over to Serial and Batch Bundle, cancelled the linked item and when deleting, it gives this message below.

My issue now is that to delete the delivery note, i have to delete the serial and batch bundle item first. At the same time, to delete the serial and batch bundle item, I have to delete the delivery note first.

Does anyone have any idea on what I could check on to rectify this?

Thanks

Hello, @Zafrulla_Kamil

I replicated the same scenario in my instance, but my delivery note was deleted along with the Item Reposting document and the Serial and Batch Number document.

Hello !! @Zafrulla_Kamil Try to find that is there any linked field in those 2 doctypes in fields section.

There is a link field in the Serial and Batch Bundle to the Delivery Note here

Is that core filed or custom field??

If it is custom field, delete that one and try to delete those things.

That’s a core field though

@Zafrulla_Kamil If both those docs are cancelled and if you are sure if deleting those docs won’t affect any other docs then you could delete those using frappe database api.

For more reference to frappe database api refer:
https://frappeframework.com/docs/user/en/api/database#frappe-db-delete

*Update

I assume it was a specific scenario that caused the bug and managed to get a fix from the frappe team through the support ticket and was told that it will be updated in the next fix. :sweat_smile:

To those that replied to this post and the Frappe team, thank you!