Payment Entry title, party and party_name usage

When making a Payment Entry with a cust_master_name set as Naming Series, the title of the payment entry is hardcoded by backend to be the value of party, is there a setting that makes the title to be set to the value of party_name?

This behavior could be in many places within ERPNext when cust_master_name is set to Naming Series.

Hi @Ismail_Tabtabai

it is dynamic and can be set as following;

Hello @ahsantareen ,

Thanks. I came across that solution, but does it carry on in case of upgrade? Imagine how many settings one has to take into consideration when upgrading to a major release.

Do you think it is worth submitting a patch to solve it?

“““ Current “““

def set_title(self):
    if self.payment_type in ("Receive", "Pay"):
        self.title = self.party
    else:
        self.title = self.paid_from + " - " + self.paid_to

“““ Could be “““

def set_title(self):
    if self.payment_type in ("Receive", "Pay"):
        if self.party_name and self.party_name != self.party:
            self.title = f"{self.party_name} ({self.party})"
        else:
            self.title = self.party
    else:
        self.title = self.paid_from + " - " + self.paid_to

That would solve the issue without messing around with ERPNext settings.

Hi @Ismail_Tabtabai

There is no need for any code as customizing doctype has dynamically setting Title as shown in screenshot.

1 Like