mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
correct field name
This commit is contained in:
@@ -118,7 +118,7 @@ class TestPurchaseOrder(unittest.TestCase):
|
|||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"supplier" : "_Test Supplier",
|
"supplier" : "_Test Supplier",
|
||||||
"is_subcontracted" : "No",
|
"is_subcontracted" : "No",
|
||||||
"schedule_Date": add_days(nowdate(), 1),
|
"schedule_date": add_days(nowdate(), 1),
|
||||||
"currency" : frappe.db.get_value("Company", "_Test Company", "default_currency"),
|
"currency" : frappe.db.get_value("Company", "_Test Company", "default_currency"),
|
||||||
"conversion_factor" : 1,
|
"conversion_factor" : 1,
|
||||||
"items" : get_same_items(),
|
"items" : get_same_items(),
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ def get_list_context(context=None):
|
|||||||
def make_purchase_order(source_name, target_doc=None):
|
def make_purchase_order(source_name, target_doc=None):
|
||||||
def set_missing_values(source, target):
|
def set_missing_values(source, target):
|
||||||
target.ignore_pricing_rule = 1
|
target.ignore_pricing_rule = 1
|
||||||
target.schedule_Date = add_days(nowdate(), 1)
|
target.schedule_date = add_days(nowdate(), 1)
|
||||||
target.run_method("set_missing_values")
|
target.run_method("set_missing_values")
|
||||||
target.run_method("get_schedule_dates")
|
target.run_method("get_schedule_dates")
|
||||||
target.run_method("calculate_taxes_and_totals")
|
target.run_method("calculate_taxes_and_totals")
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ def update_item(obj, target, source_parent):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_purchase_order(source_name, target_doc=None):
|
def make_purchase_order(source_name, target_doc=None):
|
||||||
def postprocess(source, target_doc):
|
def postprocess(source, target_doc):
|
||||||
target_doc.schedule_Date = add_days(nowdate(), 1)
|
target_doc.schedule_date = add_days(nowdate(), 1)
|
||||||
set_missing_values(source, target_doc)
|
set_missing_values(source, target_doc)
|
||||||
|
|
||||||
doclist = get_mapped_doc("Material Request", source_name, {
|
doclist = get_mapped_doc("Material Request", source_name, {
|
||||||
@@ -288,7 +288,7 @@ def make_purchase_order_based_on_supplier(source_name, target_doc=None):
|
|||||||
|
|
||||||
def postprocess(source, target_doc):
|
def postprocess(source, target_doc):
|
||||||
target_doc.supplier = source_name
|
target_doc.supplier = source_name
|
||||||
target_doc.schedule_Date = add_days(nowdate(), 1)
|
target_doc.schedule_date = add_days(nowdate(), 1)
|
||||||
|
|
||||||
target_doc.set("items", [d for d in target_doc.get("items")
|
target_doc.set("items", [d for d in target_doc.get("items")
|
||||||
if d.get("item_code") in supplier_items and d.get("qty") > 0])
|
if d.get("item_code") in supplier_items and d.get("qty") > 0])
|
||||||
|
|||||||
Reference in New Issue
Block a user