コード例 #1
0
def delete_supplier():
    if request.method == 'POST':
        name = request.form['supplier-name']

        suppliers_instance = Suppliers()
        suppliers_instance.delete_supplier(name)
        return redirect('/suppliers')
    else:
        return render_template('delete_supplier.html')
コード例 #2
0
ファイル: shop.py プロジェクト: hforge/shop
 def _make_resource(cls, folder, name, *args, **kw):
     root = ShopFolder._make_resource(cls, folder, name, **kw)
     # Payments module
     cls.payments_class._make_resource(cls.payments_class, folder,
                             '%s/payments' % name,
                             title={'en': u'Payment module'})
     # Modules
     Modules._make_resource(Modules, folder,
                   '%s/modules' % name, title={'en': u'Modules'})
     # Suppliers
     Suppliers._make_resource(Suppliers, folder,
                   '%s/suppliers' % name, title={'en': u'Suppliers'})
     # Customers
     Customers._make_resource(Customers, folder,
                   '%s/customers' % name, title={'en': u'Customers'})
     # Product Models
     ProductModels._make_resource(ProductModels, folder, '%s/products-models' % name,
                                 title={'en': u'Product Models'})
     # Orders
     Orders._make_resource(Orders, folder, '%s/orders' % name,
                           title={'en': u'Orders'})
     # ShopUser_Groups
     ShopUser_Groups._make_resource(ShopUser_Groups, folder, '%s/groups' % name,
                                     title={'en': u'User groups'})
     # Addresses
     Addresses._make_resource(Addresses, folder, '%s/addresses' % name,
                              title={'en': u'Addresses'})
     # Countries
     Countries._make_resource(Countries, folder, '%s/countries' % name,
                              title={'en': u'countries'})
     # Countries zone
     CountriesZones._make_resource(CountriesZones, folder,
             '%s/countries-zones' % name, title={'en': u'Countries Zones'})
     # EnumeratesFolder
     EnumeratesFolder._make_resource(EnumeratesFolder, folder,
                                 '%s/enumerates' % name, title={'en': u'Enumerates'})
     # Shipping
     Shippings._make_resource(Shippings, folder, '%s/shippings' % name,
                              title={'en': u'Shipping'})
     # Conditions of users
     WebPage._make_resource(WebPage, folder, '%s/terms-and-conditions-of-use' % name,
                             **{'title': {'fr': u'Conditions Générales de ventes',
                                          'en': u'Terms and conditions of user'},
                                'state': 'public'})
     # Default cross Selling configuration
     CrossSellingTable._make_resource(CrossSellingTable, folder,
                                      '%s/cross-selling' % name,
                                      title={'en': u'Cross selling'})
     # Taxes
     Taxes_TableResource._make_resource(Taxes_TableResource, folder, '%s/taxes' % name,
                             **{'title': {'fr': u'TVA',
                                          'en': u'Taxes'}})
     table = Taxes_TableHandler()
     table.add_record({'value': '19.6'})
     folder.set_handler('%s/taxes' % name, table)
コード例 #3
0
def add_new_supplier():
    if request.method == 'POST':
        name = request.form['supplier-name']
        contact_name = request.form['supplier-contact-name']
        contact_phone = request.form['supplier-contact-phone']

        suppliers_instance = Suppliers()
        suppliers_instance.add_supplier(name, contact_name, contact_phone)
        return redirect('/suppliers')
    else:
        return render_template('add_new_supplier.html')
コード例 #4
0
from employees import Employees
from notifications import Notification
from purchase_request import PurchaseRequest
from abstract_of_canvass import AbstractOfCanvass
from suppliers import Suppliers
from property_acc_receipt import PropertyAcceptanceReceipt
from key_positions import KeyPositions

f = Functions()
u = User()
l = Log()
e = Employees()
n = Notification()
preq = PurchaseRequest()
abc = AbstractOfCanvass()
supp = Suppliers()
prop = PropertyAcceptanceReceipt()
kp = KeyPositions()


def index(request):

    loopRef = genLoopRangeString(5, [('rr', 'tt', 'yy', 'uu'),
                                     ('ii', 'qq', 'ww'), ('ss', 'dd')])
    return setReponse(request, 'non_requisitioner/index.html',
                      [('rr', 'tt', 'yy', 'uu'), ('ii', 'qq', 'ww'),
                       ('ss', 'dd')], [
                           (loopRef, ),
                       ], [], [], [], {})

コード例 #5
0
from abstract_of_canvass import AbstractOfCanvass

f = Functions()
u = User()
l = Log()
e = Employees()
n = Notification()
ins = InsepectionAndAcceptanceReceipt()
pOrd = PurchaseOrder()
preq = PurchaseRequest()
propAR = PropertyAcceptanceReceipt()
reqQ = RequestForQuotation()
pord = PurchaseOrder()
off = Offices()
kp = KeyPositions()
suppl = Suppliers()
itemC = Items()
equip = Equipment()
ris_Class = RequisitionAndIssuanceSlip()
supplyC = Supply()
waste_Class = Waste()
abc = AbstractOfCanvass()

templateFolder = 'inventory_office'
urlHead = '/inventory_office_sup_off'


def index(request):
    return setReponse(request, templateFolder + '/home_new_again.html', [], [],
                      [], [], [
                          ('inventory_office/base.html', ),
コード例 #6
0
 def _make_resource(cls, folder, name, *args, **kw):
     root = ShopFolder._make_resource(cls, folder, name, **kw)
     # Payments module
     cls.payments_class._make_resource(cls.payments_class,
                                       folder,
                                       '%s/payments' % name,
                                       title={'en': u'Payment module'})
     # Modules
     Modules._make_resource(Modules,
                            folder,
                            '%s/modules' % name,
                            title={'en': u'Modules'})
     # Suppliers
     Suppliers._make_resource(Suppliers,
                              folder,
                              '%s/suppliers' % name,
                              title={'en': u'Suppliers'})
     # Customers
     Customers._make_resource(Customers,
                              folder,
                              '%s/customers' % name,
                              title={'en': u'Customers'})
     # Product Models
     ProductModels._make_resource(ProductModels,
                                  folder,
                                  '%s/products-models' % name,
                                  title={'en': u'Product Models'})
     # Orders
     Orders._make_resource(Orders,
                           folder,
                           '%s/orders' % name,
                           title={'en': u'Orders'})
     # ShopUser_Groups
     ShopUser_Groups._make_resource(ShopUser_Groups,
                                    folder,
                                    '%s/groups' % name,
                                    title={'en': u'User groups'})
     # Addresses
     Addresses._make_resource(Addresses,
                              folder,
                              '%s/addresses' % name,
                              title={'en': u'Addresses'})
     # Countries
     Countries._make_resource(Countries,
                              folder,
                              '%s/countries' % name,
                              title={'en': u'countries'})
     # Countries zone
     CountriesZones._make_resource(CountriesZones,
                                   folder,
                                   '%s/countries-zones' % name,
                                   title={'en': u'Countries Zones'})
     # EnumeratesFolder
     EnumeratesFolder._make_resource(EnumeratesFolder,
                                     folder,
                                     '%s/enumerates' % name,
                                     title={'en': u'Enumerates'})
     # Shipping
     Shippings._make_resource(Shippings,
                              folder,
                              '%s/shippings' % name,
                              title={'en': u'Shipping'})
     # Conditions of users
     WebPage._make_resource(
         WebPage, folder, '%s/terms-and-conditions-of-use' % name, **{
             'title': {
                 'fr': u'Conditions Générales de ventes',
                 'en': u'Terms and conditions of user'
             },
             'state': 'public'
         })
     # Default cross Selling configuration
     CrossSellingTable._make_resource(CrossSellingTable,
                                      folder,
                                      '%s/cross-selling' % name,
                                      title={'en': u'Cross selling'})
     # Taxes
     Taxes_TableResource._make_resource(
         Taxes_TableResource, folder, '%s/taxes' % name,
         **{'title': {
             'fr': u'TVA',
             'en': u'Taxes'
         }})
     table = Taxes_TableHandler()
     table.add_record({'value': '19.6'})
     folder.set_handler('%s/taxes' % name, table)
コード例 #7
0
def suppliers():
    suppliers_instance = Suppliers()
    data = suppliers_instance.get_suppliers()
    return render_template('suppliers.html', suppliers=data)