fix(cart): Don't use window.open as it can be blocked
window.open calls are interpreted as popups by some browsers and are blocked. Also, route to Quotation web view instead of printview.
This commit is contained in:
parent
6687c5a9fc
commit
5f1eebec16
@ -162,8 +162,7 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/orders/' + encodeURIComponent(r.message), '_blank');
|
||||
window.location.reload();
|
||||
window.location.href = '/orders/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -186,8 +185,7 @@ $.extend(shopping_cart, {
|
||||
.html(msg || frappe._("Something went wrong!"))
|
||||
.toggle(true);
|
||||
} else {
|
||||
window.open('/printview?doctype=Quotation&name=' + r.message, '_blank');
|
||||
window.location.reload();
|
||||
window.location.href = '/quotations/' + encodeURIComponent(r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user