mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
[fix] status update - update qty after int float not null change
This commit is contained in:
1
erpnext/patches/v6_10/__init__.py
Normal file
1
erpnext/patches/v6_10/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from __future__ import unicode_literals
|
||||
17
erpnext/patches/v6_10/fix_ordered_received_billed.py
Normal file
17
erpnext/patches/v6_10/fix_ordered_received_billed.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
not_null_patch_date = frappe.db.sql("""select date(creation) from `tabPatch Log` where patch='frappe.patches.v6_9.int_float_not_null'""")
|
||||
if not not_null_patch_date:
|
||||
return
|
||||
|
||||
not_null_patch_date = not_null_patch_date[0][0]
|
||||
|
||||
for doctype in ("Purchase Invoice", "Sales Invoice", "Purchase Order", "Delivery Note", "Installation Note", "Delivery Note", "Purchase Receipt"):
|
||||
for name in frappe.db.sql_list("""select name from `tab{doctype}`
|
||||
where docstatus > 0 and (date(creation) >= %(patch_date)s or date(modified) >= %(patch_date)s)""".format(doctype=doctype),
|
||||
{"patch_date": not_null_patch_date}):
|
||||
|
||||
doc = frappe.get_doc(doctype, name)
|
||||
doc.update_qty(change_modified=False)
|
||||
Reference in New Issue
Block a user