mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 07:20:26 +00:00
fix: use get_all instead of get_list for child tables
(cherry picked from commit f862339024)
This commit is contained in:
committed by
Ankush Menat
parent
1fce25180c
commit
24c004b537
@@ -88,7 +88,7 @@ def get_bom_stock(filters):
|
||||
GROUP BY bom_item.item_code""".format(qty_field=qty_field, table=table, conditions=conditions, bom=bom), as_dict=1)
|
||||
|
||||
def get_manufacturer_records():
|
||||
details = frappe.get_list('Item Manufacturer', fields = ["manufacturer", "manufacturer_part_no", "parent"])
|
||||
details = frappe.get_all('Item Manufacturer', fields = ["manufacturer", "manufacturer_part_no", "parent"])
|
||||
manufacture_details = frappe._dict()
|
||||
for detail in details:
|
||||
dic = manufacture_details.setdefault(detail.get('parent'), {})
|
||||
|
||||
@@ -104,14 +104,14 @@ def set_address_details(row, special_characters):
|
||||
row.update({'ship_to_state': row.to_state})
|
||||
|
||||
def set_taxes(row, filters):
|
||||
taxes = frappe.get_list("Sales Taxes and Charges",
|
||||
taxes = frappe.get_all("Sales Taxes and Charges",
|
||||
filters={
|
||||
'parent': row.dn_id
|
||||
},
|
||||
fields=('item_wise_tax_detail', 'account_head'))
|
||||
|
||||
account_list = ["cgst_account", "sgst_account", "igst_account", "cess_account"]
|
||||
taxes_list = frappe.get_list("GST Account",
|
||||
taxes_list = frappe.get_all("GST Account",
|
||||
filters={
|
||||
"parent": "GST Settings",
|
||||
"company": filters.company
|
||||
|
||||
@@ -468,7 +468,7 @@ class TestItem(unittest.TestCase):
|
||||
item_doc.save()
|
||||
|
||||
# Check values saved correctly
|
||||
barcodes = frappe.get_list(
|
||||
barcodes = frappe.get_all(
|
||||
'Item Barcode',
|
||||
fields=['barcode', 'barcode_type'],
|
||||
filters={'parent': item_code})
|
||||
|
||||
Reference in New Issue
Block a user