예제 #1
0
파일: item.py 프로젝트: XWARIOSWX/erpnext
	def update_website(self):
		from selling.utils.product import invalidate_cache_for
		invalidate_cache_for(self.doc.item_group)
		[invalidate_cache_for(d.item_group) for d in \
			self.doclist.get({"doctype":"Website Item Group"})]

		WebsiteGenerator.on_update(self)
예제 #2
0
파일: item.py 프로젝트: pdvyas/erpnext
    def update_website(self):
        from selling.utils.product import invalidate_cache_for
        invalidate_cache_for(self.doc.item_group)
        [invalidate_cache_for(d.item_group) for d in \
         self.doclist.get({"doctype":"Website Item Group"})]

        WebsiteGenerator.on_update(self)
예제 #3
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		
		# clear all cache if it has toc
		if self.doclist.get({"parentfield": "toc"}):
			from webnotes.webutils import clear_cache
			clear_cache()
예제 #4
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		self.if_home_clear_cache()
		
		# clear all cache if it has toc
		if self.doclist.get({"parentfield": "toc"}):
			from webnotes.webutils import clear_cache
			clear_cache()
예제 #5
0
	def on_update(self):
		DocTypeNestedSet.on_update(self)
		WebsiteGenerator.on_update(self)
		
		self.validate_name_with_item()
		
		from selling.utils.product import invalidate_cache_for
		invalidate_cache_for(self.doc.name)
				
		self.validate_one_root()
예제 #6
0
    def on_update(self):
        DocTypeNestedSet.on_update(self)
        WebsiteGenerator.on_update(self)

        self.validate_name_with_item()

        from selling.utils.product import invalidate_cache_for
        invalidate_cache_for(self.doc.name)

        self.validate_one_root()
예제 #7
0
	def on_trash(self):
		# delete entry from Table of Contents of other pages
		WebsiteGenerator.on_trash(self)
		
		webnotes.conn.sql("""delete from `tabTable of Contents`
			where web_page=%s""", self.doc.name)
		
		# clear all cache if it has toc
		if self.doclist.get({"parentfield": "toc"}):
			from webnotes.webutils import clear_cache
			clear_cache()
예제 #8
0
	def if_home_clear_cache(self):
		"""if home page, clear cache"""
		if webnotes.conn.get_value("Website Settings", None, "home_page")==self.doc.name:
			if webnotes.conn.exists("Website Sitemap", "index"):
				webnotes.delete_doc("Website Sitemap", "index", ignore_permissions=True)
			WebsiteGenerator.on_update(self, page_name="index")

			from webnotes.sessions import clear_cache
			clear_cache('Guest')
			
			from webnotes.webutils import clear_cache
			clear_cache(self.doc.page_name)
			clear_cache('index')
예제 #9
0
파일: item.py 프로젝트: XWARIOSWX/erpnext
	def on_trash(self):
		webnotes.conn.sql("""delete from tabBin where item_code=%s""", self.doc.item_code)
		WebsiteGenerator.on_trash(self)
예제 #10
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		webnotes.webutils.delete_page_cache("writers")
예제 #11
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		if self.doc.page_name:
			clear_cache("partners")
예제 #12
0
파일: item.py 프로젝트: pdvyas/erpnext
 def on_trash(self):
     webnotes.conn.sql("""delete from tabBin where item_code=%s""",
                       self.doc.item_code)
     WebsiteGenerator.on_trash(self)
예제 #13
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		clear_cache("writers")