Subversion Repositories SmartDukaan

Rev

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

Rev 6637 Rev 6643
Line 1332... Line 1332...
1332
                                  'provider' : provider.name,
1332
                                  'provider' : provider.name,
1333
                                  'product' : str(order.lineitems[0]),
1333
                                  'product' : str(order.lineitems[0]),
1334
                                  'payMode' : payMode,
1334
                                  'payMode' : payMode,
1335
                                  'note'    : note
1335
                                  'note'    : note
1336
                                  }
1336
                                  }
1337
    to_addresses = [store.email, store.bdmEmail, 'sandeep.sachdeva@shop2020.in', 'suraj.sharma@shop2020.in', 'manoj.kumar@shop2020.in']
1337
    to_addresses = [store.email, store.bdmEmail, 'sandeep.sachdeva@shop2020.in', 'amit.sirohi@shop2020.in', 'manoj.kumar@shop2020.in']
1338
    cc = ['khushal.bhatia@spiceretail.co.in']
1338
    cc = ['khushal.bhatia@spiceretail.co.in']
1339
    bcc = ['rajneesh.arora@spiceretail.co.in']
1339
    bcc = ['rajneesh.arora@spiceretail.co.in']
1340
    mail(mail_user, mail_password, to_addresses, subject, message, [], cc, bcc)
1340
    mail(mail_user, mail_password, to_addresses, subject, message, [], cc, bcc)
1341
        
1341
        
1342
def mark_orders_as_returned_from_store(providerId, orderIds, awbs):
1342
def mark_orders_as_returned_from_store(providerId, orderIds, awbs):
Line 1834... Line 1834...
1834
                                          'order_weight' : str(order.total_weight),
1834
                                          'order_weight' : str(order.total_weight),
1835
                                          'customer_address' : __get_order_address(order),
1835
                                          'customer_address' : __get_order_address(order),
1836
                                          'warehouse_executive' : executive,
1836
                                          'warehouse_executive' : executive,
1837
                                          'warehouse_address' : warehouse.location,
1837
                                          'warehouse_address' : warehouse.location,
1838
                                          'warehouse_pin' : warehouse.pincode}
1838
                                          'warehouse_pin' : warehouse.pincode}
1839
        to_addresses = [to_addr, 'gaurabh.verma@shop2020.in', 'suraj.sharma@shop2020.in']
1839
        to_addresses = [to_addr, 'amit.sirohi@shop2020.in']
1840
        
1840
        
1841
        mail(mail_user, mail_password, to_addresses, subject, message)
1841
        mail(mail_user, mail_password, to_addresses, subject, message)
1842
        if order.status == OrderStatus.RET_REQUEST_AUTHORIZED:
1842
        if order.status == OrderStatus.RET_REQUEST_AUTHORIZED:
1843
            order.status = OrderStatus.RET_PICKUP_REQUEST_RAISED
1843
            order.status = OrderStatus.RET_PICKUP_REQUEST_RAISED
1844
            order.statusDescription = "Pick up requested for RETURN"
1844
            order.statusDescription = "Pick up requested for RETURN"
Line 3645... Line 3645...
3645
        else:
3645
        else:
3646
            provider = get_provider_by_code(providerCode)
3646
            provider = get_provider_by_code(providerCode)
3647
            providerId = provider.id
3647
            providerId = provider.id
3648
    except:
3648
    except:
3649
        providerId = -1
3649
        providerId = -1
-
 
3650
        operatorCircle = ""
3650
        
3651
        
3651
    deviceNumberInfo = DeviceNumberInfo()
3652
    deviceNumberInfo = DeviceNumberInfo()
3652
    deviceNumberInfo.circleCode = operatorCircle
3653
    deviceNumberInfo.circleCode = operatorCircle
3653
    deviceNumberInfo.operatorId = providerId
3654
    deviceNumberInfo.operatorId = providerId
3654
    if provider:
3655
    if provider:
Line 3895... Line 3896...
3895
    email_header = Template(html_header).substitute(dict(order_id = display_order_id, order_date = formated_order_date, email = email, source_url = source_url, order_amount = recharge_order.totalAmount, order_status = status, device_number = deviceNumber, service_provider = providerName, failureReason = failureReason))
3896
    email_header = Template(html_header).substitute(dict(order_id = display_order_id, order_date = formated_order_date, email = email, source_url = source_url, order_amount = recharge_order.totalAmount, order_status = status, device_number = deviceNumber, service_provider = providerName, failureReason = failureReason))
3896
    email_footer = Template(html_footer).substitute(dict(source_url = source_url, source_name = source_name))
3897
    email_footer = Template(html_footer).substitute(dict(source_url = source_url, source_name = source_name))
3897
    
3898
    
3898
    try:
3899
    try:
3899
        helper_client = HelperClient().get_client()
3900
        helper_client = HelperClient().get_client()
3900
        helper_client.saveUserEmailForSending([email], "", source_name + " - Recharge Order Details", email_header + email_footer, str(recharge_order.id), "RechargeInfo", [], ['anupam.singh@shop2020.in', 'rajneesh.arora@shop2020.in', 'abhishek.mathur@shop2020.in', 'suraj.sharma@shop2020.in', 'rajveer.singh@shop2020.in'])
3901
        helper_client.saveUserEmailForSending([email], "", source_name + " - Recharge Order Details", email_header + email_footer, str(recharge_order.id), "RechargeInfo", [], ['anupam.singh@shop2020.in', 'rajneesh.arora@shop2020.in', 'abhishek.mathur@shop2020.in', 'amit.sirohi@shop2020.in', 'rajveer.singh@shop2020.in'])
3901
        return True
3902
        return True
3902
    except Exception as e:
3903
    except Exception as e:
3903
        print e
3904
        print e
3904
        return False
3905
        return False
3905
 
3906