with_doc issue fixes
This commit is contained in:
parent
3e6586f58d
commit
b7e91ee95e
@ -62,7 +62,7 @@ cur_frm.add_fetch("item", "stock_uom", "uom");
|
|||||||
|
|
||||||
cur_frm.cscript.workstation = function(doc,dt,dn) {
|
cur_frm.cscript.workstation = function(doc,dt,dn) {
|
||||||
var d = locals[dt][dn];
|
var d = locals[dt][dn];
|
||||||
frappe.model.with_doc("Workstation", d.workstation, function(i, r) {
|
frappe.model.with_doc("Workstation", d.workstation, function(name, r) {
|
||||||
d.hour_rate = r.docs[0].hour_rate;
|
d.hour_rate = r.docs[0].hour_rate;
|
||||||
refresh_field("hour_rate", dn, "bom_operations");
|
refresh_field("hour_rate", dn, "bom_operations");
|
||||||
erpnext.bom.calculate_op_cost(doc);
|
erpnext.bom.calculate_op_cost(doc);
|
||||||
|
@ -169,14 +169,12 @@ cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query =
|
|||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.copy_from_item_group = function(doc) {
|
cur_frm.cscript.copy_from_item_group = function(doc) {
|
||||||
frappe.model.with_doc("Item Group", doc.item_group, function() {
|
frappe.model.with_doc("Item Group", doc.item_group, function(name, r) {
|
||||||
$.each((doc.item_website_specifications || []), function(i, d) {
|
$.each((r.docs[0].item_website_specifications || []), function(i, d) {
|
||||||
var n = frappe.model.add_child(doc, "Item Website Specification",
|
var n = frappe.model.add_child(doc, "Item Website Specification", "item_website_specifications");
|
||||||
"item_website_specifications");
|
n.label = d.label;
|
||||||
n.label = d.label;
|
n.description = d.description;
|
||||||
n.description = d.description;
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user