Merge pull request #3937 from rmehta/purchase-order-fix

[hot] make_stock_entry button in purchase order
This commit is contained in:
Anand Doshi 2015-08-24 14:41:40 +05:30
commit d092fd918a
4 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@ frappe.query_reports["Accounts Payable"] = {
},
{
"fieldname":"report_date",
"label": __("Date"),
"label": __("As on Date"),
"fieldtype": "Date",
"default": get_today()
},

View File

@ -18,7 +18,7 @@ frappe.query_reports["Accounts Receivable"] = {
},
{
"fieldname":"report_date",
"label": __("Date"),
"label": __("As on Date"),
"fieldtype": "Date",
"default": get_today()
},

View File

@ -32,7 +32,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
if(doc.is_subcontracted==="Yes") {
cur_frm.add_custom_button(__('Transfer Material to Supplier'), this.make_stock_entry);
cur_frm.add_custom_button(__('Transfer Material to Supplier'),
function() { me.make_stock_entry(); });
}
}

View File

@ -12,7 +12,7 @@ def make_sample_data():
to help the user get started"""
selling_items = frappe.get_all("Item", filters = {"is_sales_item": 1})
buying_items = frappe.get_all("Item", filters = {"is_sales_item": 0})
buying_items = frappe.get_all("Item", filters = {"is_purchase_item": 1})
if selling_items:
for i in range(3):