From 081c3ec47606788bd32764d009b3a9e51fb7b76c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 9 Mar 2015 15:11:34 +0530 Subject: [PATCH] c-form message issue --- erpnext/accounts/doctype/c_form/c_form.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py index c18d28ad845..7d879e4d92d 100644 --- a/erpnext/accounts/doctype/c_form/c_form.py +++ b/erpnext/accounts/doctype/c_form/c_form.py @@ -18,17 +18,17 @@ class CForm(Document): `tabSales Invoice` where name = %s and docstatus = 1""", d.invoice_no) if inv and inv[0][0] != 'Yes': - frappe.throw("C-form is not applicable for Invoice: %s" % d.invoice_no) + frappe.throw("C-form is not applicable for Invoice: {0}".format(d.invoice_no)) elif inv and inv[0][1] and inv[0][1] != self.name: - frappe.throw("""Invoice %s is tagged in another C-form: %s. + frappe.throw("""Invoice {0} is tagged in another C-form: {1}. If you want to change C-form no for this invoice, - please remove invoice no from the previous c-form and then try again""" % - (d.invoice_no, inv[0][1])) + please remove invoice no from the previous c-form and then try again"""\ + .format(d.invoice_no, inv[0][1])) elif not inv: - frappe.throw("Row %s: Invoice %s is invalid, it might be cancelled / does not exist. \ - Please enter a valid Invoice" % d.idx, d.invoice_no) + frappe.throw("Row {0}: Invoice {1} is invalid, it might be cancelled / does not exist. \ + Please enter a valid Invoice".format(d.idx, d.invoice_no)) def on_update(self): """ Update C-Form No on invoices"""