fix: Removed submitted status from Quotation (#18055)

* fix: Change in list view and status updater

* fix: Change status in doctype

* fix: Patch for submitted status
This commit is contained in:
Deepesh Garg 2019-06-26 11:05:51 +05:30 committed by Nabin Hait
parent 07aae76bbf
commit ea0574679f
5 changed files with 904 additions and 3342 deletions

View File

@ -27,7 +27,7 @@ status_map = {
],
"Quotation": [
["Draft", None],
["Submitted", "eval:self.docstatus==1"],
["Open", "eval:self.docstatus==1"],
["Lost", "eval:self.status=='Lost'"],
["Ordered", "has_sales_order"],
["Cancelled", "eval:self.docstatus==2"],

View File

@ -604,4 +604,5 @@ execute:frappe.delete_doc("Report", "Inactive Items")
erpnext.patches.v11_1.delete_scheduling_tool
erpnext.patches.v12_0.make_custom_fields_for_bank_remittance #14-06-2019
execute:frappe.delete_doc_if_exists("Page", "support-analytics")
erpnext.patches.v12_0.make_item_manufacturer
erpnext.patches.v12_0.make_item_manufacturer
erpnext.patches.v12_0.set_quotation_status

View File

@ -0,0 +1,7 @@
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql(""" UPDATE `tabQuotation` set status = 'Open'
where docstatus = 1 and status = 'Submitted' """)

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,11 @@ frappe.listview_settings['Quotation'] = {
add_fields: ["customer_name", "base_grand_total", "status",
"company", "currency", 'valid_till'],
get_indicator: function(doc) {
if(doc.status==="Submitted") {
if(doc.status==="Open") {
if (doc.valid_till && doc.valid_till < frappe.datetime.nowdate()) {
return [__("Expired"), "darkgrey", "valid_till,<," + frappe.datetime.nowdate()];
} else {
return [__("Submitted"), "blue", "status,=,Submitted"];
return [__("Open"), "orange", "status,=,Open"];
}
} else if(doc.status==="Ordered") {
return [__("Ordered"), "green", "status,=,Ordered"];