Skip to content
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: Currency rates not fetched when creating mapped doc #42246

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
let company_currency = this.get_company_currency();
// Added `load_after_mapping` to determine if document is loading after mapping from another doc
if(this.frm.doc.currency && this.frm.doc.currency !== company_currency
&& !this.frm.doc.__onload?.load_after_mapping) {
&& !(this.frm.doc.__onload?.load_after_mapping && this.frm.cscript.is_onload) ) {

this.get_exchange_rate(transaction_date, this.frm.doc.currency, company_currency,
function(exchange_rate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ def select_item(d):
postprocess,
)

doclist.set_onload("load_after_mapping", False)
return doclist


Expand Down
Loading