Subversion Repositories SmartDukaan

Rev

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

Rev 12620 Rev 12640
Line 464... Line 464...
464
        if similar_item is None or similar_item.catalog_item_id is None:
464
        if similar_item is None or similar_item.catalog_item_id is None:
465
            # If there is no similar item in the database from before,
465
            # If there is no similar item in the database from before,
466
            # use the entity_id_generator
466
            # use the entity_id_generator
467
            entity_id = EntityIDGenerator.query.first()
467
            entity_id = EntityIDGenerator.query.first()
468
            ds_item.catalog_item_id = entity_id.id + 1
468
            ds_item.catalog_item_id = entity_id.id + 1
-
 
469
            if item.status:
-
 
470
                ds_item.status = item.status
-
 
471
                ds_item.status_description = status._VALUES_TO_NAMES(item.stats)
-
 
472
            else:
469
            ds_item.status = status.IN_PROCESS
473
                ds_item.status = status.IN_PROCESS
470
            ds_item.status_description = "This item is in process."
474
                ds_item.status_description = "This item is in process."
471
            entity_id.id = entity_id.id  + 1
475
            entity_id.id = entity_id.id  + 1
472
            if similar_item is not None and similar_item.catalog_item_id is None:
476
            if similar_item is not None and similar_item.catalog_item_id is None:
473
                similar_item.catalog_item_id = entity_id.id
477
                similar_item.catalog_item_id = entity_id.id
474
        else:
478
        else:
475
            #If a similar item already exists for a product group, brand and model_number, set it as same.
479
            #If a similar item already exists for a product group, brand and model_number, set it as same.