fix(selling): cancel sales order with cancelled PE

Allow cancelling sales order with cancelled payment entry. Ignoring GL
entries while cancelling the document is required to cancel it, reverse
entries are created by accounts controller.

Related issue: ISS-20-21-09586
This commit is contained in:
Ankush Menat 2021-02-16 18:46:32 +05:30 committed by Nabin Hait
parent 3508ed176b
commit d9c84dff0f

View File

@ -180,6 +180,7 @@ class SalesOrder(SellingController):
update_coupon_code_count(self.coupon_code,'used')
def on_cancel(self):
self.ignore_linked_doctypes = ('GL Entry', 'Stock Ledger Entry')
super(SalesOrder, self).on_cancel()
# Cannot cancel closed SO