Exemplo n.º 1
0
def create_drc_corp_product():
    p = Product(key_name='DRC_CORP')
    p.price = 4166
    p.default_count = 12
    p.possible_counts = [12]
    p.is_subscription = True
    p.visible = True
    p.organization_types = []
    p.module_set = 'ALL'
    p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID
    p.is_multilanguage = False
    p.default_comment_translation_key = u'Abonnement annuel Ville Connect\xe9e pour les entreprises'
    p.description_translation_key = u'Abonnement Ville Connect\xe9e pour entreprises'
    return p
Exemplo n.º 2
0
def create_drc_hefl_product():
    p = Product(key_name='DRC_HEFL')
    p.price = 2000
    p.default_count = 1
    p.possible_counts = [1, 12]
    p.is_subscription = True
    p.visible = True
    p.organization_types = []
    p.module_set = 'ALL'
    p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID
    p.is_multilanguage = False
    p.default_comment_translation_key = u'Abonnement mensuel Ville Connect\xe9e pour les entreprises travaillant \xe0 domicile, entrepreneur ou pigistes'
    p.description_translation_key = u'Abonnement pour les entreprises travaillant \xe0 domicile, entrepreneur ou pigistes'
    return p
Exemplo n.º 3
0
def create_drc_stud_product():
    p = Product(key_name='DRC_STUD')
    p.price = 1000
    p.default_count = 1
    p.possible_counts = [1, 12]
    p.is_subscription = True
    p.visible = True
    p.organization_types = []
    p.module_set = 'ALL'
    p.legal_entity_id = MC_TELECOM_LEGAL_ENTITY_ID
    p.is_multilanguage = False
    p.default_comment_translation_key = u'Abonnement mensuel Ville Connect\xe9e pour \xe9tudiants'
    p.description_translation_key = u'Abonnement Ville Connect\xe9e pour \xe9tudiants'
    return p
Exemplo n.º 4
0
def create_xtrb_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'XTRB')
    p.price = 10000
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 101)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    p.description_translation_key = 'XTRA.description'
    p.default_comment_translation_key = 'XTRA.default_comment'
    return p
Exemplo n.º 5
0
def create_msub_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'MSUB')
    p.price = 25000
    p.default_count = 12
    p.default = False
    p.possible_counts = [1, 12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    p.description_translation_key = 'MSUP.description'
    p.default_comment_translation_key = 'MSSU.default_comment'
    return p
Exemplo n.º 6
0
def create_pres_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'PRES')
    p.price = 30000
    p.default_count = 4
    p.default = False
    p.possible_counts = range(1, 101)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = []
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 7
0
def create_ssup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SSUP')
    p.price = 1000
    p.default_count = 12
    p.default = False
    p.possible_counts = [12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_NON_PROFIT]
    p.product_dependencies = []
    p.visible = False
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = 'MSSU.default_comment'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 8
0
def create_msud_product(legal_entity_id, code_prefix='', default_count=12):
    p = Product(key_name=code_prefix + 'MSUD')
    p.price = -5000
    p.default_count = default_count
    p.default = True
    p.possible_counts = [1, 12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP']
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 9
0
def create_xtra_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'XTRA')
    p.price = 7500
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 101)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 10
0
def create_free_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_FREE_SUBSCRIPTION)
    p.price = 0
    p.default_count = 1
    p.default = False
    p.possible_counts = []
    p.is_subscription = True
    p.organization_types = []
    p.product_dependencies = []
    p.visible = True
    p.legal_entity_id = legal_entity_id
    p.module_set = 'ALL'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 11
0
def create_setd_product(legal_entity_id, code_prefix='', price=-7500):
    p = Product(key_name=code_prefix + 'SETD')
    p.price = price
    p.default_count = 1
    p.default = True
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'SETU']
    p.visible = True
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 12
0
def create_csux_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'CSUX')
    p.price = 0
    p.default_count = 12
    p.default = False
    p.possible_counts = [12]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = 'CSUB.default_comment'
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 13
0
def create_demo_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'DEMO')
    p.price = 0
    p.default_count = 3
    p.default = False
    p.possible_counts = [3]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 14
0
def create_mssu_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'MSSU')
    p.price = 1000
    p.default_count = 12
    p.default = False
    p.possible_counts = [6, 12, 24, 36]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'STATIC_MODULES'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 15
0
def create_cred_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix +
                Product.PRODUCT_ONE_TIME_CREDIT_CARD_PAYMENT_DISCOUNT)
    p.price = -1000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 16
0
def create_setx_product(legal_entity_id,
                        code_prefix=''):  # Used for the platinum subscription
    p = Product(key_name=code_prefix + 'SETX')
    p.price = 0
    p.default_count = 1
    p.default = True
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 17
0
def create_ocap_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_FREE_PRESENCE)
    p.price = 0
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = True
    p.is_subscription_discount = False
    p.module_set = 'STATIC_MODULES'
    p.organization_types = []
    p.product_dependencies = []
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.default_comment_translation_key = ''
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p
Exemplo n.º 18
0
def create_sxdm_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SXDM')
    p.price = 0
    p.default_count = 36
    p.default = False
    p.possible_counts = [36]
    p.is_subscription = False
    p.is_subscription_discount = True
    p.module_set = 'ALL'
    p.organization_types = []
    p.product_dependencies = [
        '%(code_prefix)sMSUP|%(code_prefix)sMSSU|%(code_prefix)sSSUP|%(code_prefix)sSSZP'
        % dict(code_prefix=code_prefix)
    ]
    p.visible = False
    p.extra_subscription_months = 12
    p.legal_entity_id = legal_entity_id
    p.default_comment_translation_key = ''
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
    return p
Exemplo n.º 19
0
def create_sgup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'SGUP')
    p.price = 49500
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.module_set = 'ALL'
    p.organization_types = [ServiceProfile.ORGANIZATION_TYPE_CITY]
    p.product_dependencies = [
        '%(code_prefix)sCSUB:-1|%(code_prefix)sMSUP:-1' %
        dict(code_prefix=code_prefix)
    ]
    p.visible = bool(
        code_prefix)  # only for legal entities other than mobicage
    p.legal_entity_id = legal_entity_id
    if code_prefix:
        p.description_translation_key = p.code[len(code_prefix
                                                   ):] + '.description'
        p.default_comment_translation_key = p.code[len(code_prefix
                                                       ):] + '.default_comment'
    return p