Example #1
0
class User(hc_models.HerokuConnectModel):
    sf_object_name = 'User'

    username = hc_models.Text(sf_field_name='Username', max_length=80)
    email = hc_models.Email(sf_field_name='Email')
    department = hc_models.Text(sf_field_name='Department', max_length=80)
    title = hc_models.Text(sf_field_name='Title', max_length=80)
Example #2
0
class kpi_client_visit(hc_models.HerokuConnectModel):
    sf_object_name = 'KPI_Client_Visit__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    client = hc_models.Text(sf_field_name='Client__c', max_length=80)
    vendor = hc_models.Text(sf_field_name='Vendor__c', max_length=80)
    date_received = hc_models.Date(sf_field_name='Received_Date__c')
    received_from_connect = hc_models.AnyType(sf_field_name='Received_from_connect__c', max_length=80)
Example #3
0
class product_price(hc_models.HerokuConnectModel):
    sf_object_name = 'Product_price__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    price = hc_models.Number(sf_field_name='Price__c', max_digits=8, decimal_places=0)
    pricebook = hc_models.Text(sf_field_name='Price_Book__c',  max_length=80)
    product = hc_models.related.Lookup(sf_field_name='Product__c', to='product', to_field='sf_id', on_delete=models.CASCADE)
    size = hc_models.Number(sf_field_name='Package_Size__c', max_digits=8, decimal_places=4)
Example #4
0
class agent(hc_models.HerokuConnectModel):
    sf_object_name = 'BA__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    code = hc_models.Text(sf_field_name='Agent_Code__c', max_length=80, unique=True)
    zone = hc_models.Text(sf_field_name='Zone__c', max_length=80)
    active = hc_models.AnyType(sf_field_name='Active__c', max_length=80)
    record_type = hc_models.Text(sf_field_name='RecordTypeId',  max_length=80)
Example #5
0
class sms(hc_models.HerokuConnectModel):
    sf_object_name = 'SMS__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    vendor = hc_models.Text(sf_field_name='Vendor__c',  max_length=80)
    client = hc_models.related.Lookup(sf_field_name='Client__c', to='client', to_field='sf_id', on_delete=models.CASCADE)
    amount = hc_models.Currency(sf_field_name='Amount__c', decimal_places=2, max_digits=10)
    allocated = hc_models.AnyType(sf_field_name='Allocated__c', max_length=80)
    date_received = hc_models.Date(sf_field_name='Date_Received_Date_Only_date_format__c')
    voucher_code = hc_models.Text(sf_field_name='Voucher_code_connect__c', max_length=20)
    season = hc_models.Text(sf_field_name='Season__c', max_length=20)
    season_active = hc_models.AnyType(sf_field_name='Season_Active__c', max_length=80)
    allocated_by_audit = hc_models.AnyType(sf_field_name='Allocated_by_Audit__c', max_length=80)

    def __str__(self):
        return self.name
Example #6
0
class zone(hc_models.HerokuConnectModel):
    sf_object_name = 'Zone__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    country = hc_models.related.Lookup(sf_field_name='Country_new__c', to='country', to_field='sf_id', on_delete=models.CASCADE)
    name = hc_models.Text(sf_field_name='name', max_length=80)
    active_villages = hc_models.Number(sf_field_name='Active_villages__c', decimal_places=0, max_digits=8)
    active_vendors = hc_models.Number(sf_field_name='Active_vendors__c', decimal_places=0, max_digits=8)
    vendors_meeting_enrollment_target = hc_models.Number(sf_field_name='Vendors_meeting_enrollment_target__c', decimal_places=0, max_digits=8)
    vendors_meeting_enrollment_target_ratio = hc_models.Number(sf_field_name='vendors_meeting_enrollment_target_ratio__c', decimal_places=0, max_digits=3)
    total_clients_enrolled = hc_models.Number(sf_field_name='Total_Clients_Enrolled__c', decimal_places=0, max_digits=8)
    target_clients_enrolled = hc_models.Number(sf_field_name='Target_Total_Clients_Enrolled__c', decimal_places=0, max_digits=8)
    progress_clients_enrolled = hc_models.Percent(sf_field_name='Progress_Clients_Enrolled__c', decimal_places=0, max_digits=3)
    enrolled_but_inactive = hc_models.Number(sf_field_name='Zone_Clients_enrolled_but_inactive__c', decimal_places=0, max_digits=8)
    ratio_enrolled_but_inactive = hc_models.Percent(sf_field_name='ratio_clients_enrolled_but_inactive__c', decimal_places=0, max_digits=3)
    model = hc_models.Text(sf_field_name='This_Season_Model__c', max_length=80)

    def __str__(self):
        return self.name
Example #7
0
class goalitems(hc_models.HerokuConnectModel):
    sf_object_name = 'Goal_items__c'

    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    enrollment_date = hc_models.Date(sf_field_name='Goal_Item_Enrollment_Date__c')
    product = hc_models.related.Lookup(sf_field_name='Product__c', to='product', to_field='sf_id', on_delete=models.CASCADE)
    product_name = hc_models.Text(sf_field_name='Product_name__c', max_length=80)
    product_type = hc_models.related.Lookup(sf_field_name='Product_type__c', to='product_type', to_field='sf_id', on_delete=models.CASCADE)
    desired_hectares = hc_models.Number(sf_field_name='Desired_Units__c', max_digits=3, decimal_places=2)
    dropped = hc_models.AnyType(sf_field_name='Dropped__c', max_length=80)
    savings_goal = hc_models.Text(sf_field_name='Savings_Goal__c', max_length=80)
    client_code = hc_models.Text(sf_field_name='Client_code__c', max_length=80)
    client_ID = hc_models.related.Lookup(sf_field_name='Client_ID__c', to='client', to_field='sf_id', on_delete=models.CASCADE)
    year = hc_models.Number(sf_field_name='Goal_Item_Year__c', max_digits=4, decimal_places=0)
    price = hc_models.Number(sf_field_name='Goal_Item_Price__c', decimal_places=0, max_digits=8)

    def __str__(self):
        return self.name
Example #8
0
class ve(hc_models.HerokuConnectModel):
    sf_object_name = 'Vendor__c'

    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    code = hc_models.Text(sf_field_name='Vendor_Code__c', max_length=80, unique=True)
    zone = hc_models.related.Lookup(sf_field_name='Zone__c', to='zone', to_field='sf_id', on_delete=models.CASCADE)
    active = hc_models.AnyType(sf_field_name='Active__c', max_length=80)
    active_days_this_week = hc_models.Number(sf_field_name='Active_Days_This_Week__c', max_digits=1, decimal_places=0)
    active_days_last_week = hc_models.Number(sf_field_name='Active_Days_Last_Week__c', max_digits=1, decimal_places=0)
    total_clients_enrolled = hc_models.Number(sf_field_name='Vendor_Total_Clients_Enrolled__c', max_digits=6, decimal_places=0)
    target_clients_enrolled = hc_models.Number(sf_field_name='Village_Target_Total_Clients_Enrolled__c', max_digits=6, decimal_places=0)
    progress_clients_enrolled = hc_models.Number(sf_field_name='Progress_Clients_Enrolled__c', max_digits=2, decimal_places=0)
    clients_less_2000 = hc_models.Number(sf_field_name='Clients_less_2000__c', max_digits=6, decimal_places=0)
    clients_2000_or_more_ratio = hc_models.Number(sf_field_name='Clients_2000_or_more_ratio__c', max_digits=2, decimal_places=2)
    clients_2000_or_more = hc_models.Number(sf_field_name='Clients_with_2000_or_more_CFA__c', max_digits=6, decimal_places=0)
    savings_this_season = hc_models.Number(sf_field_name='Savings_This_Season__c', max_digits=8, decimal_places=0)
    model_type = hc_models.Text(sf_field_name='Model_Type__c', max_length=80)

    def __str__(self):
        return self.name
Example #9
0
class village(hc_models.HerokuConnectModel):
    sf_object_name = 'Village__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name', max_length=80)
    country = hc_models.Text(sf_field_name='Country_new__c', max_length=80) #there's no country.ID reference in the village object, have to pick contry name
    zone = hc_models.related.Lookup(sf_field_name='Zone__c', to='zone', to_field='sf_id', on_delete=models.CASCADE)
    current_vendor = hc_models.Text(sf_field_name='Current_vendor_lookup__c', max_length=80)
    current_vendor_name = hc_models.Text(sf_field_name='Current_vendor__c', max_length=80)
    current_vendor_code = hc_models.Text(sf_field_name='Current_Vendor_Code__c', max_length=80)
    village_model = hc_models.Text(sf_field_name='This_Season_Model__c', max_length=80)
    this_season_clients_total = hc_models.Number(sf_field_name='This_Season_Clients_Total__c', decimal_places=0, max_digits=8)
    this_season_clients_finished = hc_models.Number(sf_field_name='This_Season_Clients_100_Finished__c', decimal_places=0, max_digits=8)
  
    def __str__(self):
        return self.name

    def get_absolute_url(self):
        return reverse('clientlist', args=[str(self.sf_id)]) 
Example #10
0
        class NameMixin(models.Model):
            name = hc_models.Text(sf_field_name='Name')

            class Meta:
                app_label = 'test'
                abstract = True
Example #11
0
class client(hc_models.HerokuConnectModel):
    sf_object_name = 'Client__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    client_code = hc_models.Text(sf_field_name='Name', max_length=80)
    sex = hc_models.Text(sf_field_name='Sex__c', max_length=80)
    phone = hc_models.AnyType(sf_field_name='Phone__c', max_length=80)
    country = hc_models.Text(sf_field_name='Country_new__c', max_length=80)
    zone = hc_models.Text(sf_field_name='Zone__c', max_length=80)
    village = hc_models.related.Lookup(sf_field_name='Village_Object__c', to='village', to_field='sf_id', on_delete=models.CASCADE)
    lastname = hc_models.Text(sf_field_name='Last_name__c', max_length=80)
    firstname = hc_models.Text(sf_field_name='First_name__c', max_length=80)
    lastname = hc_models.Text(sf_field_name='Last_name__c', max_length=80)
    last_voucher_date = hc_models.Date(sf_field_name='Last_Voucher_Date__c')
    fullname = hc_models.Text(sf_field_name='Full_name__c', max_length=80)
    saving_group_name = hc_models.Text(sf_field_name='Current_Savings_Group_Name__c', max_length=80)
    all_enrollment = hc_models.Number(sf_field_name='All_Enrollment_this_Season__c', decimal_places=0, max_digits=16)
    balance =  hc_models.Number(sf_field_name='Savings_This_Season_All__c', decimal_places=0, max_digits=16)
    remaining_to_pay = hc_models.Number(sf_field_name='This_season_remaining_to_pay__c', decimal_places=0, max_digits=16)
    completion = hc_models.Percent(sf_field_name='Completion_This_Season_All__c', decimal_places=0, max_digits=1)
    min_package = hc_models.Text(sf_field_name='Paid_Min_Packet_Price_this_Season__c', max_length=80)
    record_type = hc_models.Text(sf_field_name='RecordTypeId', max_length=80)
    external_id = hc_models.Text(sf_field_name='Client_Code_External__c', max_length=80, unique=True)
    enrolled_but_inactive = hc_models.AnyType(sf_field_name='Enrolled_but_inactive__c', max_length=80)
    last_kpi_visit = hc_models.Date(sf_field_name='Last_KPI_Client_Visit__c')
    days_since_last_kpi_visit = hc_models.Number(sf_field_name='Days_Since_Last_KPI_Visit__c', decimal_places=0, max_digits=16)

    def __str__(self):
        return self.client_code
Example #12
0
class product_type(hc_models.HerokuConnectModel):
    sf_object_name = 'Product_type__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    pricebook = hc_models.Text(sf_field_name='Price_book__c',  max_length=80)
    product = hc_models.related.Lookup(sf_field_name='Product__c', to='product', to_field='sf_id', on_delete=models.CASCADE)
Example #13
0
class product(hc_models.HerokuConnectModel):
    sf_object_name = 'Product__c'
    sf_id = hc_models.fields.ID(db_column='sfid', db_index=True, editable=False, max_length=18, sf_field_name='ID', unique=True, upsert=False)
    name = hc_models.Text(sf_field_name='Name',  max_length=80)
    def __str__(self):
        return self.name
Example #14
0
        class NameMixin(models.Model):
            name = hc_models.Text(sf_field_name="Name")

            class Meta:
                app_label = "test"
                abstract = True