Subversion Repositories SmartDukaan

Rev

Rev 18450 | Rev 18595 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18450 Rev 18569
Line 605... Line 605...
605
    '''
605
    '''
606
    content_complete_status = status.CONTENT_COMPLETE
606
    content_complete_status = status.CONTENT_COMPLETE
607
    items = Item.query.filter_by(catalog_item_id=entity_id).all()
607
    items = Item.query.filter_by(catalog_item_id=entity_id).all()
608
    current_timestamp = datetime.datetime.now()
608
    current_timestamp = datetime.datetime.now()
609
    for item in items:
609
    for item in items:
610
        if item.status == status.IN_PROCESS:
610
        if item.status == status.IN_PROCESS or item.status == status.PARTIALLY_ACTIVE:
611
            item.status = content_complete_status
611
            item.status = content_complete_status
-
 
612
            item.status_description = "CONTENT_COMPLETE"
612
            item_change_log = ItemChangeLog()
613
            item_change_log = ItemChangeLog()
613
            item_change_log.old_status = item.status
614
            item_change_log.old_status = item.status
614
            item_change_log.new_status = content_complete_status
615
            item_change_log.new_status = content_complete_status
615
            item_change_log.timestamp = current_timestamp
616
            item_change_log.timestamp = current_timestamp
616
            item_change_log.item = item
617
            item_change_log.item = item
Line 620... Line 621...
620
            #        itemInsurerMapping = ItemInsurerMapping()
621
            #        itemInsurerMapping = ItemInsurerMapping()
621
            #        itemInsurerMapping.itemId = item.id
622
            #        itemInsurerMapping.itemId = item.id
622
            #        itemInsurerMapping.insurerId = 2
623
            #        itemInsurerMapping.insurerId = 2
623
            #        itemInsurerMapping.insurerType = 2
624
            #        itemInsurerMapping.insurerType = 2
624
       
625
       
625
        if item.status == status.PARTIALLY_ACTIVE:
-
 
626
            item.status = status.ACTIVE
-
 
627
        category_object = get_category(category)
626
        category_object = get_category(category)
628
        if category_object is not None:
627
        if category_object is not None:
629
            item.category = category
628
            item.category = category
630
            item.product_group = category_object.display_name
629
            item.product_group = category_object.display_name
631
        else:
630
        else: