frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.19k stars 7.24k forks source link

Lead < Add lead to prospect button does not work #40258

Open codezart opened 7 months ago

codezart commented 7 months ago

Information about bug

image

When on the Lead doctype and adding lead to prospect via the button ("Add to Prospect") shown in the image above.

This button is causing the following error shown in console: ncaught TypeError: Cannot read properties of undefined (reading 'frm') at eval (lead__js:77:17) at Dialog.<anonymous> (messages.js:104:4) at HTMLButtonElement.<anonymous> (dialog.js:192:20) at HTMLButtonElement.dispatch (jquery.js:5135:27) at elemData.handle (jquery.js:4939:28)

The fix for this is to not use me.frm, but use cur_frm instead like the other functions in lead.js

Module

CRM

Version

Frappe version 15 Erpnext version 15

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

`ncaught TypeError: Cannot read properties of undefined (reading 'frm')
    at eval (lead__js:77:17)
    at Dialog.<anonymous> (messages.js:104:4)
    at HTMLButtonElement.<anonymous> (dialog.js:192:20)
    at HTMLButtonElement.dispatch (jquery.js:5135:27)
    at elemData.handle (jquery.js:4939:28)
`
codezart commented 7 months ago

Fix provided here; https://github.com/frappe/erpnext/pull/40259