[aii] [patches] minor fixes

This commit is contained in:
Anand Doshi
2013-03-29 20:40:23 +05:30
parent 96a5f1dda0
commit 19acce9fa1
9 changed files with 42 additions and 11 deletions

View File

@@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes.model.bean import getlist
from webnotes import msgprint
from webnotes import msgprint, _
from webnotes.utils.nestedset import DocTypeNestedSet
@@ -37,6 +37,8 @@ class DocType(DocTypeNestedSet):
if self.doc.cost_center_name != 'Root' and not self.doc.parent_cost_center:
msgprint("Please enter parent cost center", raise_exception=1)
elif self.doc.cost_center_name == "Root" and self.doc.parent_cost_center:
msgprint(_("Root cannot have a parent cost center"), raise_exception=1)
def convert_group_to_ledger(self):
if self.check_if_child_exists():

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-03-26 11:03:08",
"creation": "2013-03-29 18:21:58",
"docstatus": 0,
"modified": "2013-03-28 15:42:14",
"modified": "2013-03-29 19:32:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -223,7 +223,7 @@
"fieldname": "cost_center",
"fieldtype": "Link",
"in_filter": 1,
"label": "Sales Cost Center",
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",