fix: do not update PE title during data import

Related issue: ISS-20-21-10132
This commit is contained in:
Ankush Menat 2021-03-04 18:56:00 +05:30
parent 82c6223196
commit cc46866cd9
No known key found for this signature in database
GPG Key ID: 8EA82E09BBD13AAF

View File

@ -455,6 +455,10 @@ class PaymentEntry(AccountsController):
.format(total_negative_outstanding), InvalidPaymentEntry)
def set_title(self):
if frappe.flags.in_import and self.title:
# do not set title dynamically if title exists during data import.
return
if self.payment_type in ("Receive", "Pay"):
self.title = self.party
else: