fix: item rate not fetching
This commit is contained in:
@@ -1690,6 +1690,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
var me = this;
|
var me = this;
|
||||||
var valid = true;
|
var valid = true;
|
||||||
|
|
||||||
|
if (frappe.flags.ignore_company_party_validation) {
|
||||||
|
return valid;
|
||||||
|
}
|
||||||
|
|
||||||
$.each(["company", "customer"], function(i, fieldname) {
|
$.each(["company", "customer"], function(i, fieldname) {
|
||||||
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname) && !["Purchase Order","Purchase Invoice"].includes(me.frm.doc.doctype)) {
|
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname) && !["Purchase Order","Purchase Invoice"].includes(me.frm.doc.doctype)) {
|
||||||
if (!me.frm.doc[fieldname]) {
|
if (!me.frm.doc[fieldname]) {
|
||||||
|
|||||||
@@ -894,6 +894,12 @@ function open_form(frm, doctype, child_doctype, parentfield) {
|
|||||||
new_child_doc.uom = frm.doc.stock_uom;
|
new_child_doc.uom = frm.doc.stock_uom;
|
||||||
new_child_doc.description = frm.doc.description;
|
new_child_doc.description = frm.doc.description;
|
||||||
|
|
||||||
frappe.ui.form.make_quick_entry(doctype, null, null, new_doc);
|
frappe.run_serially([
|
||||||
|
() => frappe.ui.form.make_quick_entry(doctype, null, null, new_doc),
|
||||||
|
() => {
|
||||||
|
frappe.flags.ignore_company_party_validation = true;
|
||||||
|
frappe.model.trigger("item_code", frm.doc.name, new_child_doc);
|
||||||
|
}
|
||||||
|
])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user