Hi Guys ,
I am really struck with the stock entry module please help me , I am trying to achieve two things
-
Production order field in the stock entry doc should work even when transferring materials from one warehouse to the other .
-
Production order field in the stock entry doc should work even when the manufacturing gets completed .
To accomplish this I tried these things without success , please help
First I included the
> Material Issue
> Material Receipt
> Material Transfer
in the stock entry purpose field
then edited the stock_entry.js file as below ,
> clean_up: function() {
// Clear Production Order record from locals, because it is updated via Stock Entry if(this.frm.doc.production_order && in_list(["Manufacture", "Material Transfer for Manufacture","Material Transfer","Material Issue","Material Receipt"], this.frm.doc.purpose)) { frappe.model.remove_from_locals("Production Order", this.frm.doc.production_order);
then , I edited as below to remove the validation and to auto populate the items table when selecting the production order ,
get_items: function() {
var me = this;
if(!this.frm.doc.fg_completed_qty || !this.frm.doc.bom_no)
{
// if production order / bom is mentioned, get items
return this.frm.call({
doc: me.frm.doc,
method: "get_items",
callback: function(r) {
if(!r.exc) refresh_field("items");
}
});
}
},
but if I select the production order the field vanishes while saving , also the item_code and qty are not getting auto-populated when I select the production order , instead I am getting a message that manufacturing qty is mandatory .
Guys I am really frustrated , I tried all the possible things I could do .
Please help
Thanks