mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 11:55:11 +00:00
fix: ignore is overridden by transaction.js upon clicking cancel
which overrides with 'Serial and Batch Bundle'
(cherry picked from commit cf70147c0d)
This commit is contained in:
@@ -12,7 +12,6 @@ erpnext.buying.setup_buying_controller();
|
|||||||
|
|
||||||
frappe.ui.form.on("Purchase Order", {
|
frappe.ui.form.on("Purchase Order", {
|
||||||
setup: function (frm) {
|
setup: function (frm) {
|
||||||
frm.ignore_doctypes_on_cancel_all = ["Unreconcile Payment", "Unreconcile Payment Entries"];
|
|
||||||
if (frm.doc.is_old_subcontracting_flow) {
|
if (frm.doc.is_old_subcontracting_flow) {
|
||||||
frm.set_query("reserve_warehouse", "supplied_items", function () {
|
frm.set_query("reserve_warehouse", "supplied_items", function () {
|
||||||
return {
|
return {
|
||||||
@@ -140,6 +139,10 @@ frappe.ui.form.on("Purchase Order", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onload: function (frm) {
|
onload: function (frm) {
|
||||||
|
var ignore_list = ["Unreconcile Payment", "Unreconcile Payment Entries"];
|
||||||
|
frm.ignore_doctypes_on_cancel_all = Object.hasOwn(frm, "ignore_doctypes_on_cancel_all")
|
||||||
|
? frm.ignore_doctypes_on_cancel_all.concat(ignore_list)
|
||||||
|
: ignore_list;
|
||||||
set_schedule_date(frm);
|
set_schedule_date(frm);
|
||||||
if (!frm.doc.transaction_date) {
|
if (!frm.doc.transaction_date) {
|
||||||
frm.set_value("transaction_date", frappe.datetime.get_today());
|
frm.set_value("transaction_date", frappe.datetime.get_today());
|
||||||
|
|||||||
Reference in New Issue
Block a user