[minor] fix to purchase receipt button, make_demo

This commit is contained in:
Rushabh Mehta 2013-08-21 11:19:15 +05:30
parent fe14f69e71
commit 82e54c8293
2 changed files with 15 additions and 17 deletions

View File

@ -23,24 +23,23 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
this.show_stock_ledger();
this.show_general_ledger();
} else {
cur_frm.add_custom_button(wn._('From Purchase Order'),
function() {
wn.model.map_current_doc({
method: "buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
source_doctype: "Purchase Order",
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Stopped"],
per_received: ["<", 99.99],
company: cur_frm.doc.company
}
})
});
}
cur_frm.add_custom_button(wn._('From Purchase Order'),
function() {
wn.model.map_current_doc({
method: "buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
source_doctype: "Purchase Order",
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Stopped"],
per_received: ["<", 99.99],
company: cur_frm.doc.company
}
})
});
if(wn.boot.control_panel.country == 'India') {
unhide_field(['challan_no', 'challan_date']);
}

View File

@ -216,7 +216,6 @@ def make_stock_entry_from_pro(pro_id, purpose, current_date):
st.doc.fiscal_year = "2010"
st.doc.expense_adjustment_account = "Stock in Hand - WP"
try:
st.run_method("get_items")
st.insert()
webnotes.conn.commit()
st.submit()