[fix] sales order status for maintenance

This commit is contained in:
Rushabh Mehta 2015-10-13 11:48:08 +05:30
parent 22d0d586ab
commit 86125b2b9f
3 changed files with 10 additions and 1 deletions

View File

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

View File

@ -216,4 +216,5 @@ erpnext.patches.v6_4.repost_gle_for_journal_entries_where_reference_name_missing
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_duplicate_bins
erpnext.patches.v6_4.fix_sales_order_maintenance_status

View File

@ -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)