From 5b7e9a1c944b2d3f0c365c86f1fa2137a599ebf3 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 15 Oct 2015 17:27:46 +0530 Subject: [PATCH] [minor fixes] --- erpnext/buying/doctype/purchase_order/purchase_order.json | 3 ++- erpnext/controllers/selling_controller.py | 2 +- erpnext/selling/doctype/sales_order/sales_order.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index d0b454ef1cd..98dbfbe1167 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -151,6 +151,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "depends_on": "eval:doc.drop_ship==1", "fieldname": "customer", "fieldtype": "Link", "hidden": 0, @@ -174,7 +175,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "depends_on": "eval:doc.order_type==\"Drop Shipment\"", + "depends_on": "eval:doc.drop_ship==1", "fieldname": "customer_name", "fieldtype": "Data", "hidden": 0, diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index d7f287be490..b087b8a8843 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -143,7 +143,7 @@ class SellingController(StockController): throw(_("Total allocated percentage for sales team should be 100")) def validate_order_type(self): - valid_types = ["Sales", "Maintenance", "Shopping Cart", "Drop Shipment"] + valid_types = ["Sales", "Maintenance", "Shopping Cart"] if not self.order_type: self.order_type = "Sales" elif self.order_type not in valid_types: diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 25c8182649e..c9cda387564 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -499,6 +499,7 @@ def make_drop_shipment(source_name, target_doc=None): target.contact_display = "" target.contact_mobile = "" target.contact_email = "" + target.contact_person = "" target.ignore_pricing_rule = 1 target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals")