fixed conflict

This commit is contained in:
Nabin Hait
2012-12-19 12:18:15 +05:30
28 changed files with 393 additions and 433 deletions

View File

@@ -158,12 +158,12 @@ class DocType:
""" Uncheck others if current one is selected as default,
update default bom in item master
"""
webnotes.conn.set(self.doc, "is_default", cint(self.doc.is_default))
if self.doc.is_default and self.doc.is_active:
from webnotes.model.utils import set_default
set_default(self.doc, "item")
webnotes.conn.set_value("Item", self.doc.item, "default_bom", self.doc.name)
else:
if not self.doc.is_active:
webnotes.conn.set(self.doc, "is_default", 0)
@@ -383,4 +383,4 @@ class DocType:
and t2.docstatus = 1 and t1.docstatus =1 """, self.doc.name)
if act_pbom and act_pbom[0][0]:
msgprint("""Sorry cannot inactivate as BOM: %s is child
of one or many other active parent BOMs""" % self.doc.name, raise_exception=1)
of one or many other active parent BOMs""" % self.doc.name, raise_exception=1)