fix(price list): change the field name

This commit is contained in:
Mangesh-Khairnar 2019-06-24 17:28:47 +05:30
parent b99f53f410
commit 558a5c199f
4 changed files with 17 additions and 7 deletions

View File

@ -90,7 +90,7 @@ class TestBOM(unittest.TestCase):
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)

View File

@ -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",

View File

@ -7,7 +7,7 @@ QUnit.test("test price list with uom dependancy", function(assert) {
() => 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(),

View File

@ -888,12 +888,12 @@ def get_price_list_currency(price_list):
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):