Exemplo n.º 1
0
def create_xcty_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_EXTRA_CITY)
    p.price = 1000
    p.default_count = 1
    p.default = False
    p.possible_counts = range(1, 37)
    p.is_subscription = False
    p.is_subscription_discount = False
    p.is_subscription_extension = True
    p.organization_types = []
    p.product_dependencies = [
        '|'.join([
            '%s%s:-1' % (code_prefix, product_code)
            for product_code in ('MSUP', 'MSSU', 'SSUP', 'SSZP', 'CSUB',
                                 Product.PRODUCT_FREE_PRESENCE,
                                 Product.PRODUCT_FREE_SUBSCRIPTION)
        ])
    ]
    p.picture_url = ""
    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.º 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_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.º 4
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.º 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_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.º 7
0
def create_klup_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'KLUP')
    p.price = -18000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'LSUP', code_prefix + 'KSUP:-1']
    p.visible = False
    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.º 8
0
def create_news_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_NEWS_PROMOTION)
    p.price = 1
    p.default_count = 1
    p.default = False
    p.possible_counts = []
    p.is_subscription = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False  # Only orderable via dashboard when creating a newsfeed item
    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.º 9
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.º 10
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.º 11
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.º 12
0
def create_visi_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'VISI')
    p.price = 30
    p.default_count = 250
    p.default = False
    p.possible_counts = [250, 500, 750]
    p.is_subscription = False
    p.is_subscription_discount = False
    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.º 13
0
def create_loya_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'LOYA')
    p.price = 30000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP:-1']
    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_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.º 15
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.º 16
0
def create_updi_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'UPDI')
    p.price = -1000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
    p.is_subscription = False
    p.is_subscription_discount = False
    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_appl_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'APPL')
    p.price = 10000
    p.default_count = 1
    p.default = False
    p.possible_counts = [1]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.is_subscription_extension = True
    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'
    p.charge_interval = 12
    return p
Exemplo n.º 18
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.º 19
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.º 20
0
def create_kspp_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + 'KSPP')
    p.price = -1500
    p.default_count = 36
    p.default = True
    p.possible_counts = [12, 24, 36]
    p.is_subscription = False
    p.is_subscription_discount = True
    p.organization_types = []
    p.product_dependencies = [code_prefix + 'MSUP']
    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.º 21
0
def create_beac_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_BEACON)
    p.price = 3500
    p.default_count = 1
    p.default = False
    p.possible_counts = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = True
    p.picture_url = "/static/images/solutions/flex/BEACON_PRESENTATIE.jpg"
    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.º 22
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.º 23
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.º 24
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.º 25
0
def create_posm_product(legal_entity_id, code_prefix=''):
    p = Product(key_name=code_prefix + Product.PRODUCT_FLYERS)
    p.price = 6
    p.default_count = 250  # 15 euro per 250
    p.default = False
    p.possible_counts = [
        250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500
    ]
    p.is_subscription = False
    p.is_subscription_discount = False
    p.organization_types = []
    p.product_dependencies = []
    p.visible = False
    p.picture_url = "/static/images/solutions/flex/FLYERS_PRESENTATIE.jpg"
    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.º 26
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