-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Unlink PO on cancelling SO #27609
fix: Unlink PO on cancelling SO #27609
Conversation
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within a week if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
@@ -815,6 +816,57 @@ def on_cancel(self): | |||
if frappe.db.get_single_value('Accounts Settings', 'unlink_advance_payment_on_cancelation_of_order'): | |||
unlink_ref_doc_from_payment_entries(self) | |||
|
|||
if self.doctype == "Sales Order": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also create Purchase Order from Sales Order as well. Shouldn't this be other way round as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
print("SO Items: ", so_items) | ||
|
||
linked_po = frappe.get_all( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, set_value
only updates one record at a time, can you try with multiple items as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it worked perfectly when I tried it on the console, which is why this is so baffling.
Codecov Report
@@ Coverage Diff @@
## develop #27609 +/- ##
===========================================
+ Coverage 46.50% 55.41% +8.90%
===========================================
Files 1248 1248
Lines 67681 67691 +10
===========================================
+ Hits 31475 37508 +6033
+ Misses 36206 30183 -6023
|
@Mergifyio backport version-13-hotfix |
✅ Backports have been created
|
…-27609 fix: Unlink PO on cancelling SO (backport #27609)
…fix/pr-27609 fix: Unlink PO on cancelling SO (backport frappe#27609)
Problem:
Fix: