fix(price list): change the field name
diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py
index e230e59..45a7b93 100644
--- a/erpnext/manufacturing/doctype/bom/test_bom.py
+++ b/erpnext/manufacturing/doctype/bom/test_bom.py
@@ -90,7 +90,7 @@
self.assertEqual(bom.base_total_cost, 486000)
def test_bom_cost_multi_uom_multi_currency_based_on_price_list(self):
- frappe.db.set_value("Price List", "_Test Price List", "price_not_uom_dependant", 1)
+ frappe.db.set_value("Price List", "_Test Price List", "price_not_uom_dependent", 1)
for item_code, rate in (("_Test Item", 3600), ("_Test Item Home Desktop Manufactured", 3000)):
frappe.db.sql("delete from `tabItem Price` where price_list='_Test Price List' and item_code=%s",
item_code)
diff --git a/erpnext/stock/doctype/price_list/price_list.json b/erpnext/stock/doctype/price_list/price_list.json
index 6b447ee..56340fb 100644
--- a/erpnext/stock/doctype/price_list/price_list.json
+++ b/erpnext/stock/doctype/price_list/price_list.json
@@ -1,5 +1,6 @@
{
"allow_copy": 0,
+ "allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
@@ -22,6 +23,7 @@
"collapsible": 0,
"columns": 0,
"default": "1",
+ "fetch_if_empty": 0,
"fieldname": "enabled",
"fieldtype": "Check",
"hidden": 0,
@@ -53,6 +55,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "sb_1",
"fieldtype": "Section Break",
"hidden": 0,
@@ -83,6 +86,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "price_list_name",
"fieldtype": "Data",
"hidden": 0,
@@ -116,6 +120,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 0,
@@ -148,6 +153,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "buying",
"fieldtype": "Check",
"hidden": 0,
@@ -179,6 +185,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "selling",
"fieldtype": "Check",
"hidden": 0,
@@ -210,7 +217,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "price_not_uom_dependant",
+ "fetch_if_empty": 0,
+ "fieldname": "price_not_uom_dependent",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -219,7 +227,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Price Not UOM Dependant",
+ "label": "Price Not UOM Dependent",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -242,6 +250,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
@@ -272,6 +281,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fetch_if_empty": 0,
"fieldname": "countries",
"fieldtype": "Table",
"hidden": 0,
@@ -310,7 +320,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2018-08-29 06:35:16.546274",
+ "modified": "2019-06-24 17:16:28.027302",
"modified_by": "Administrator",
"module": "Stock",
"name": "Price List",
diff --git a/erpnext/stock/doctype/price_list/test_price_list_uom.js b/erpnext/stock/doctype/price_list/test_price_list_uom.js
index 526d0da..7fbce7d 100644
--- a/erpnext/stock/doctype/price_list/test_price_list_uom.js
+++ b/erpnext/stock/doctype/price_list/test_price_list_uom.js
@@ -7,7 +7,7 @@
() => frappe.set_route('Form', 'Price List', 'Standard Buying'),
() => {
- cur_frm.set_value('price_not_uom_dependant','1');
+ cur_frm.set_value('price_not_uom_dependent','1');
frappe.timeout(1);
},
() => cur_frm.save(),
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 6ec5606..fe2e0a4 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -888,12 +888,12 @@
def get_price_list_uom_dependant(price_list):
if price_list:
result = frappe.db.get_value("Price List", {"name": price_list,
- "enabled": 1}, ["name", "price_not_uom_dependant"], as_dict=True)
+ "enabled": 1}, ["name", "price_not_uom_dependent"], as_dict=True)
if not result:
throw(_("Price List {0} is disabled or does not exist").format(price_list))
- return not result.price_not_uom_dependant
+ return not result.price_not_uom_dependent
def get_price_list_currency_and_exchange_rate(args):