[fix] sales order status for maintenance
This commit is contained in:
parent
22d0d586ab
commit
86125b2b9f
@ -34,6 +34,7 @@ status_map = {
|
||||
["To Bill", "eval:self.per_delivered == 100 and self.per_billed < 100 and self.docstatus == 1"],
|
||||
["To Deliver", "eval:self.per_delivered < 100 and self.per_billed == 100 and self.docstatus == 1"],
|
||||
["Completed", "eval:self.per_delivered == 100 and self.per_billed == 100 and self.docstatus == 1"],
|
||||
["Completed", "eval:self.order_type == 'Maintenance' and self.per_billed == 100 and self.docstatus == 1"],
|
||||
["Stopped", "eval:self.status=='Stopped'"],
|
||||
["Cancelled", "eval:self.docstatus==2"],
|
||||
],
|
||||
|
@ -217,3 +217,4 @@ erpnext.patches.v6_4.fix_journal_entries_due_to_reconciliation
|
||||
erpnext.patches.v6_4.fix_status_in_sales_and_purchase_order
|
||||
erpnext.patches.v6_4.fix_modified_in_sales_order_and_purchase_order
|
||||
erpnext.patches.v6_4.fix_duplicate_bins
|
||||
erpnext.patches.v6_4.fix_sales_order_maintenance_status
|
||||
|
@ -0,0 +1,7 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
for doc in frappe.get_all("Sales Order", filters={"docstatus": 1,
|
||||
"order_type": "Maintenance"}):
|
||||
doc = frappe.get_doc("Sales Order", doc.name)
|
||||
doc.set_status(update=True)
|
Loading…
Reference in New Issue
Block a user