Exemplo n.º 1
0
		def _invalidate_cache():
			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"})]
Exemplo n.º 2
0
    def on_update(self):
        super(DocType, self).on_update()

        self.validate_name_with_item()

        from selling.utils.product import invalidate_cache_for

        if self.doc.show_in_website:
            from webnotes.webutils import update_page_name
            # webpage updates
            page_name = self.doc.name
            update_page_name(self.doc, page_name)
            invalidate_cache_for(self.doc.name)

        elif self.doc.page_name:
            # if unchecked show in website

            from webnotes.webutils import delete_page_cache
            delete_page_cache(self.doc.page_name)

            invalidate_cache_for(self.doc.name)

            webnotes.conn.set(self.doc, "page_name", None)

        self.validate_one_root()
Exemplo n.º 3
0
	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)
Exemplo n.º 4
0
        def _invalidate_cache():
            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"})]
Exemplo n.º 5
0
	def on_update(self):
		super(DocType, self).on_update()
		
		self.validate_name_with_item()
		
		from selling.utils.product import invalidate_cache_for
		
		if self.doc.show_in_website:
			from webnotes.webutils import update_page_name
			# webpage updates
			page_name = self.doc.name
			update_page_name(self.doc, page_name)
			invalidate_cache_for(self.doc.name)

		elif self.doc.page_name:
			# if unchecked show in website
			
			from webnotes.webutils import delete_page_cache
			delete_page_cache(self.doc.page_name)
			
			invalidate_cache_for(self.doc.name)
			
			webnotes.conn.set(self.doc, "page_name", None)
		
		self.validate_one_root()
Exemplo n.º 6
0
    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)
Exemplo n.º 7
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()
Exemplo n.º 8
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()