minor changes
This commit is contained in:
parent
7cbf5b4e67
commit
a4e0a1c061
@ -10,9 +10,6 @@ from webnotes.model.bean import copy_doclist
|
|||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
from webnotes import msgprint
|
from webnotes import msgprint
|
||||||
|
|
||||||
|
|
||||||
# ----------
|
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
def __init__(self, doc, doclist=[]):
|
def __init__(self, doc, doclist=[]):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes import _
|
from webnotes import throw, _
|
||||||
|
|
||||||
class ItemPriceDuplicateItem(webnotes.ValidationError): pass
|
class ItemPriceDuplicateItem(webnotes.ValidationError): pass
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ class DocType:
|
|||||||
if webnotes.conn.sql("""select name from `tabItem Price`
|
if webnotes.conn.sql("""select name from `tabItem Price`
|
||||||
where item_code=%s and price_list=%s and name!=%s""",
|
where item_code=%s and price_list=%s and name!=%s""",
|
||||||
(self.doc.item_code, self.doc.price_list, self.doc.name)):
|
(self.doc.item_code, self.doc.price_list, self.doc.name)):
|
||||||
webnotes.throw("{duplicate_item}: {item_code}, {already}: {price_list}".format(**{
|
throw("{duplicate_item}: {item_code}, {already}: {price_list}".format(**{
|
||||||
"duplicate_item": _("Duplicate Item"),
|
"duplicate_item": _("Duplicate Item"),
|
||||||
"item_code": self.doc.item_code,
|
"item_code": self.doc.item_code,
|
||||||
"already": _("already available in Price List"),
|
"already": _("already available in Price List"),
|
||||||
|
@ -7,7 +7,7 @@ import webnotes, json
|
|||||||
from webnotes.utils import nowdate, cstr
|
from webnotes.utils import nowdate, cstr
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
from webnotes.model.doc import Document
|
from webnotes.model.doc import Document
|
||||||
from webnotes import msgprint
|
from webnotes import msgprint, throw, _
|
||||||
from webnotes.model.bean import getlist, copy_doclist
|
from webnotes.model.bean import getlist, copy_doclist
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
@ -26,7 +26,7 @@ class DocType:
|
|||||||
validated_receiver_list.append(d)
|
validated_receiver_list.append(d)
|
||||||
|
|
||||||
if not validated_receiver_list:
|
if not validated_receiver_list:
|
||||||
msgprint("Please enter valid mobile nos", raise_exception=1)
|
throw(_("Please enter valid mobile nos"))
|
||||||
|
|
||||||
return validated_receiver_list
|
return validated_receiver_list
|
||||||
|
|
||||||
@ -37,12 +37,12 @@ class DocType:
|
|||||||
'ERPNXT'
|
'ERPNXT'
|
||||||
if len(sender_name) > 6 and \
|
if len(sender_name) > 6 and \
|
||||||
webnotes.conn.get_value("Control Panel", None, "country") == "India":
|
webnotes.conn.get_value("Control Panel", None, "country") == "India":
|
||||||
msgprint("""
|
throw(_("""
|
||||||
As per TRAI rule, sender name must be exactly 6 characters.
|
As per TRAI rule, sender name must be exactly 6 characters.
|
||||||
Kindly change sender name in Setup --> Global Defaults.
|
Kindly change sender name in Setup --> Global Defaults.
|
||||||
|
|
||||||
Note: Hyphen, space, numeric digit, special characters are not allowed.
|
Note: Hyphen, space, numeric digit, special characters are not allowed.
|
||||||
""", raise_exception=1)
|
"""))
|
||||||
return sender_name
|
return sender_name
|
||||||
|
|
||||||
def get_contact_number(self, arg):
|
def get_contact_number(self, arg):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user