Changeset 77102fb in theo


Ignore:
Timestamp:
07/05/20 22:23:04 (6 weeks ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
433ab27
Parents:
dd4226f
Message:

Improve integration for Catapult somewhat

custom schema, importers, web views

Location:
theo
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • theo/config.py

    rdd4226f r77102fb  
    3939        config.setdefault('rattail', 'app_title', "Theo")
    4040
    41         # Theo may define a custom data model
    42         if integrate_corepos(config):
    43             config.setdefault('rattail', 'model', 'theo.db.model_corepos')
    44 
    4541        # Theo comes with its own menu for web app
    4642        config.setdefault('tailbone', 'menus', 'theo.web.menus')
     43
     44        # do we integrate w/ Catapult?
     45        if integrate_catapult(config):
     46            config.setdefault('rattail', 'model', 'theo.db.model_catapult')
     47            config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_catapult:FromTheoToTheoVersions')
     48
     49        # do we integrate w/ CORE-POS?
     50        elif integrate_corepos(config):
     51            config.setdefault('rattail', 'model', 'theo.db.model_corepos')
    4752
    4853
  • theo/web/menus.py

    rdd4226f r77102fb  
    112112                'url': url('vendors'),
    113113                'perm': 'vendors.list',
     114            },
     115            {
     116                'title': "Taxes",
     117                'url': url('taxes'),
     118                'perm': 'taxes.list',
    114119            },
    115120        ],
  • theo/web/views/__init__.py

    rdd4226f r77102fb  
    3939
    4040    # main table views
    41     config.include('tailbone.views.brands')
    42     config.include('tailbone.views.customers')
    4341    config.include('tailbone.views.customergroups')
    4442    config.include('tailbone.views.custorders')
    4543    config.include('tailbone.views.datasync')
    46     config.include('tailbone.views.departments')
    4744    config.include('tailbone.views.email')
    48     config.include('tailbone.views.employees')
    4945    config.include('tailbone.views.messages')
    5046    config.include('tailbone.views.people')
    51     config.include('tailbone.views.products')
    5247    config.include('tailbone.views.reportcodes')
    5348    config.include('tailbone.views.roles')
    5449    config.include('tailbone.views.settings')
    55     config.include('tailbone.views.stores')
    5650    config.include('tailbone.views.subdepartments')
    5751    config.include('tailbone.views.users')
    58     config.include('tailbone.views.vendors')
    5952
    60     # catapult views
     53    # do we integrate w/ Catapult?
    6154    if integrate_catapult(rattail_config):
    62         config.include('tailbone_onager.views')
     55        config.include('tailbone_onager.views.stores')
     56        config.include('tailbone_onager.views.customers')
     57        config.include('tailbone_onager.views.employees')
     58        config.include('tailbone_onager.views.taxes')
     59        config.include('tailbone_onager.views.departments')
     60        config.include('tailbone_onager.views.brands')
     61        config.include('tailbone_onager.views.vendors')
     62        config.include('tailbone_onager.views.products')
     63        config.include('tailbone_onager.views.catapult')
    6364
    64     # corepos views
    65     if integrate_corepos(rattail_config):
    66         config.include('tailbone_corepos.views')
     65    # do we integrate w/ CORE-POS?
     66    elif integrate_corepos(rattail_config):
     67        config.include('tailbone.views.stores')
     68        config.include('tailbone.views.customers')
     69        config.include('tailbone.views.employees')
     70        config.include('tailbone.views.taxes')
     71        config.include('tailbone.views.departments')
     72        config.include('tailbone.views.brands')
     73        config.include('tailbone.views.vendors')
     74        config.include('tailbone.views.products')
     75        config.include('tailbone_corepos.views.corepos')
     76
     77    else: # no POS integration
     78        config.include('tailbone.views.stores')
     79        config.include('tailbone.views.customers')
     80        config.include('tailbone.views.employees')
     81        config.include('tailbone.views.taxes')
     82        config.include('tailbone.views.departments')
     83        config.include('tailbone.views.brands')
     84        config.include('tailbone.views.vendors')
     85        config.include('tailbone.views.products')
Note: See TracChangeset for help on using the changeset viewer.