Skip to content

Commit 2ed653f

Browse files
fix(price list): change the field name
1 parent 3cab94f commit 2ed653f

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

erpnext/manufacturing/doctype/bom/test_bom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_bom_cost(self):
9090
self.assertEqual(bom.base_total_cost, 486000)
9191

9292
def test_bom_cost_multi_uom_multi_currency_based_on_price_list(self):
93-
frappe.db.set_value("Price List", "_Test Price List", "price_not_uom_dependant", 1)
93+
frappe.db.set_value("Price List", "_Test Price List", "price_not_uom_dependent", 1)
9494
for item_code, rate in (("_Test Item", 3600), ("_Test Item Home Desktop Manufactured", 3000)):
9595
frappe.db.sql("delete from `tabItem Price` where price_list='_Test Price List' and item_code=%s",
9696
item_code)

erpnext/stock/doctype/price_list/price_list.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"allow_copy": 0,
3+
"allow_events_in_timeline": 0,
34
"allow_guest_to_view": 0,
45
"allow_import": 1,
56
"allow_rename": 1,
@@ -22,6 +23,7 @@
2223
"collapsible": 0,
2324
"columns": 0,
2425
"default": "1",
26+
"fetch_if_empty": 0,
2527
"fieldname": "enabled",
2628
"fieldtype": "Check",
2729
"hidden": 0,
@@ -53,6 +55,7 @@
5355
"bold": 0,
5456
"collapsible": 0,
5557
"columns": 0,
58+
"fetch_if_empty": 0,
5659
"fieldname": "sb_1",
5760
"fieldtype": "Section Break",
5861
"hidden": 0,
@@ -83,6 +86,7 @@
8386
"bold": 0,
8487
"collapsible": 0,
8588
"columns": 0,
89+
"fetch_if_empty": 0,
8690
"fieldname": "price_list_name",
8791
"fieldtype": "Data",
8892
"hidden": 0,
@@ -116,6 +120,7 @@
116120
"bold": 0,
117121
"collapsible": 0,
118122
"columns": 0,
123+
"fetch_if_empty": 0,
119124
"fieldname": "currency",
120125
"fieldtype": "Link",
121126
"hidden": 0,
@@ -148,6 +153,7 @@
148153
"bold": 0,
149154
"collapsible": 0,
150155
"columns": 0,
156+
"fetch_if_empty": 0,
151157
"fieldname": "buying",
152158
"fieldtype": "Check",
153159
"hidden": 0,
@@ -179,6 +185,7 @@
179185
"bold": 0,
180186
"collapsible": 0,
181187
"columns": 0,
188+
"fetch_if_empty": 0,
182189
"fieldname": "selling",
183190
"fieldtype": "Check",
184191
"hidden": 0,
@@ -210,7 +217,8 @@
210217
"bold": 0,
211218
"collapsible": 0,
212219
"columns": 0,
213-
"fieldname": "price_not_uom_dependant",
220+
"fetch_if_empty": 0,
221+
"fieldname": "price_not_uom_dependent",
214222
"fieldtype": "Check",
215223
"hidden": 0,
216224
"ignore_user_permissions": 0,
@@ -219,7 +227,7 @@
219227
"in_global_search": 0,
220228
"in_list_view": 0,
221229
"in_standard_filter": 0,
222-
"label": "Price Not UOM Dependant",
230+
"label": "Price Not UOM Dependent",
223231
"length": 0,
224232
"no_copy": 0,
225233
"permlevel": 0,
@@ -242,6 +250,7 @@
242250
"bold": 0,
243251
"collapsible": 0,
244252
"columns": 0,
253+
"fetch_if_empty": 0,
245254
"fieldname": "column_break_3",
246255
"fieldtype": "Column Break",
247256
"hidden": 0,
@@ -272,6 +281,7 @@
272281
"bold": 0,
273282
"collapsible": 0,
274283
"columns": 0,
284+
"fetch_if_empty": 0,
275285
"fieldname": "countries",
276286
"fieldtype": "Table",
277287
"hidden": 0,
@@ -310,7 +320,7 @@
310320
"issingle": 0,
311321
"istable": 0,
312322
"max_attachments": 1,
313-
"modified": "2018-08-29 06:35:16.546274",
323+
"modified": "2019-06-24 17:16:28.027302",
314324
"modified_by": "Administrator",
315325
"module": "Stock",
316326
"name": "Price List",

erpnext/stock/doctype/price_list/test_price_list_uom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ QUnit.test("test price list with uom dependancy", function(assert) {
77

88
() => frappe.set_route('Form', 'Price List', 'Standard Buying'),
99
() => {
10-
cur_frm.set_value('price_not_uom_dependant','1');
10+
cur_frm.set_value('price_not_uom_dependent','1');
1111
frappe.timeout(1);
1212
},
1313
() => cur_frm.save(),

erpnext/stock/get_item_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,12 @@ def get_price_list_currency(price_list):
834834
def get_price_list_uom_dependant(price_list):
835835
if price_list:
836836
result = frappe.db.get_value("Price List", {"name": price_list,
837-
"enabled": 1}, ["name", "price_not_uom_dependant"], as_dict=True)
837+
"enabled": 1}, ["name", "price_not_uom_dependent"], as_dict=True)
838838

839839
if not result:
840840
throw(_("Price List {0} is disabled or does not exist").format(price_list))
841841

842-
return not result.price_not_uom_dependant
842+
return not result.price_not_uom_dependent
843843

844844

845845
def get_price_list_currency_and_exchange_rate(args):

0 commit comments

Comments
 (0)