website fixes

This commit is contained in:
Rushabh Mehta
2012-02-06 13:09:08 +01:00
parent e651648b1b
commit cc54fd46bc
4 changed files with 36 additions and 22 deletions

View File

@@ -1,3 +1,5 @@
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
@@ -24,4 +26,14 @@ class DocType:
website.utils.add_guest_access_to_page(p.name)
self.doc.page_name = p.name
del self.doc.fields['long_description_html']
del self.doc.fields['long_description_html']
self.make_item_group_active()
def make_item_group_active(self):
"""show item group in website"""
if self.doc.published:
from webnotes.model.doc import Document
ig = Document('Item Group', webnotes.conn.get_value('Item', self.doc.item, 'item_group'))
ig.show_in_website = 1
ig.save()