mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Update update_total_qty_field.py
This commit is contained in:
@@ -20,9 +20,9 @@ def execute():
|
|||||||
parent, SUM(qty) as qty
|
parent, SUM(qty) as qty
|
||||||
FROM
|
FROM
|
||||||
`tab{0} Item`
|
`tab{0} Item`
|
||||||
where parenttype = %s
|
where parenttype = '{0}'
|
||||||
GROUP BY parent
|
GROUP BY parent
|
||||||
'''.format(doctype), doctype, as_dict = True)
|
'''.format(doctype), as_dict = True)
|
||||||
|
|
||||||
# Query to update total_qty might become too big, Update in batches
|
# Query to update total_qty might become too big, Update in batches
|
||||||
# batch_size is chosen arbitrarily, Don't try too hard to reason about it
|
# batch_size is chosen arbitrarily, Don't try too hard to reason about it
|
||||||
|
|||||||
Reference in New Issue
Block a user